Documentation
¶
Index ¶
- type Mongo
- func (m *Mongo) CheckAreaExists(ctx context.Context, id string) error
- func (m *Mongo) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (m *Mongo) Close(ctx context.Context) error
- func (m *Mongo) GetArea(ctx context.Context, id string) (*models.Area, error)
- func (m *Mongo) GetAreas(ctx context.Context, offset, limit int) (*models.AreasResults, error)
- func (m *Mongo) GetVersion(ctx context.Context, id string, versionID int) (*models.Area, error)
- func (m *Mongo) Init(ctx context.Context, shouldEnableReadConcern, shouldEnableWriteConcern bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct {
Database string
Collection string
Connection *dpMongoDriver.MongoConnection
Username string
Password string
URI string
IsSSL bool
// contains filtered or unexported fields
}
Mongo represents a simplistic MongoDB configuration.
func (*Mongo) CheckAreaExists ¶ added in v0.3.0
CheckAreaExists checks that the area exists
func (*Mongo) Checker ¶
func (m *Mongo) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker is called by the healthcheck library to check the health state of this mongoDB instance
func (*Mongo) GetVersion ¶ added in v0.3.0
GetVersion retrieves a version document for the area
Click to show internal directories.
Click to hide internal directories.