Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Transaction ¶
type Transaction interface { Get(*datastore.Key, interface{}) error Put(*datastore.Key, interface{}) (*datastore.PendingKey, error) }
Transaction represents a Google Cloud Datastore transaction
type TranslatorClient ¶
type TranslatorClient interface { RunInTransaction(context.Context, func(Transaction) error, ...datastore.TransactionOption) (*datastore.Commit, error) Get(context.Context, *datastore.Key, interface{}) error }
TranslatorClient is a wrapper necessary to write tests around transactions
func NewTranslator ¶
func NewTranslator(client *datastore.Client) TranslatorClient
NewTranslator returns a TranslatorClient
Click to show internal directories.
Click to hide internal directories.