Documentation
¶
Index ¶
- type Mongo
- func (m *Mongo) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (m *Mongo) Close(ctx context.Context) error
- func (m *Mongo) GetRole(ctx context.Context, id string) (*models.Role, error)
- func (m *Mongo) GetRoles(ctx context.Context, offset, limit int) (*models.Roles, error)
- func (m *Mongo) Init(mongoConf config.MongoConfiguration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct {
Session *mgo.Session
Database string
Collection string
// contains filtered or unexported fields
}
Mongo represents a simplistic MongoDB configuration, with session and health client
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
Click to show internal directories.
Click to hide internal directories.