Documentation ¶
Index ¶
- type DB
- type Datastore
- func (md *Datastore) Count(ctx context.Context, query *datastore.Query) (int, error)
- func (md *Datastore) Delete(ctx context.Context, key *datastore.Key) error
- func (md *Datastore) Get(ctx context.Context, key *datastore.Key, data interface{}) error
- func (md *Datastore) Put(ctx context.Context, key *datastore.Key, data interface{}) (*datastore.Key, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
Memory map[string]*ale.JenkinsData
}
DB holds a mocked in-memory database
func (*DB) Get ¶
func (db *DB) Get(buildID string) (*ale.JenkinsData, error)
Get retrieves data from the database
type Datastore ¶
type Datastore struct { PutFn func(context.Context, *datastore.Key, interface{}) (*datastore.Key, error) PutFnInvoked bool GetFn func(context.Context, *datastore.Key, interface{}) error GetFnInvoked bool CountFn func(context.Context, *datastore.Query) (int, error) CountFnInvoked bool DeleteFn func(context.Context, *datastore.Key) error DeleteFnInvoked bool // contains filtered or unexported fields }
Datastore is a mock of the Google Cloud Datastore
Click to show internal directories.
Click to hide internal directories.