Documentation ¶
Overview ¶
Package datastore provides a client for Google Cloud Datastore that works both on App Engine and in stand alone applications.
This package is a thin wrapper or compatibility layer for cloud.google.com/go/datastore and google.golang.org/appengine/datastore. The documentation for this project is purposely very light, with a recommendation that you normally should just follow the documentation for https://godoc.org/cloud.google.com/go/datastore.
I have only really created wrappers around the functionality I use, but overtime I expect this to be a complete wrapper. Pull requests are welcomed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { IDKey(kind string, id int64, parent Key) Key IncompleteKey(kind string, parent Key) Key NameKey(kind, name string, parent Key) Key Delete(key Key) error DeleteMulti(keys []Key) error Get(key Key, dst interface{}) error GetAll(q Query, dst interface{}) ([]Key, error) GetMulti(keys []Key, dst interface{}) error Put(key Key, src interface{}) (Key, error) PutMulti(keys []Key, src interface{}) ([]Key, error) Run(query Query) Iterator NewQuery(kind string) Query Close() error }
Client is a client for reading and writing data in a datastore dataset.
func NewCloudClient ¶
NewCloudClient creates a datastore client for use outside of Google App Engine.
func NewGaeClient ¶
NewGaeClient creates a datastore client for use in Google App Engine.
type Query ¶
type Query interface { Ancestor(ancestor Key) Query Distinct() Query EventualConsistency() Query Filter(filterStr string, value interface{}) Query Limit(limit int) Query Offset(offset int) Query Order(fieldName string) Query // contains filtered or unexported methods }
Query represents a datastore query.