Documentation ¶
Overview ¶
Package dstest contains functionality to help with testing code that relies on the Google Cloud Datastore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Emulator ¶
Emulator starts a Cloud Datastore emulator; see https://cloud.google.com/datastore/docs/tools/datastore-emulator. If the given context has a deadline, it is applied to the entire running time of the emulator process. When the test ends, the returned client is automatically closed and the emulator process is killed. Unless overridden by passing Option arguments, this function will start the emulator in Firestore mode and wait up to 20 seconds for it to start up and stop, respectively.
Types ¶
type Mode ¶
type Mode int
Mode is an Option that determines the mode of the datastore emulator; either Firestore or legacy mode.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an option for Emulator. The current implementations are Mode, StartTimeout, and StopTimeout.
type StartTimeout ¶
StartTimeout is an Option that determines how long to wait for the datastore emulator to start.
type StopTimeout ¶
StopTimeout is an Option that determines how long to wait for the datastore emulator to stop.