datastore: support conversion of protobuf ptypes directly #680
Description
Consuming protobufs in an API (gRPC or otherwise) and then storing them in datastore is a really effective pattern, with a catch.
Protobuf supports some interesting ptypes for richer datatypes, such as timestamp, and duration.
These convert directly into similar verbose struct types in golang protobuf, but there exist helper utils to convert to native golang types
https://github.com/golang/protobuf/blob/master/ptypes/duration.go
https://github.com/golang/protobuf/blob/master/ptypes/timestamp.go
A proposal for similar support for structs was rejected
golang/protobuf#370
For these relatively limited number of ptypes, it would be nice if the conversion to golang native type, and then into datastore type was handled more easily, or perhaps an sample showing a protobuf PropertyLoadSaver implementation.