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) CreateBundle(ctx context.Context, bundle *models.Bundle) error
- func (m *Mongo) DeleteBundle(ctx context.Context, id string) (err error)
- func (m *Mongo) GetBundle(ctx context.Context, bundleID string) (*models.Bundle, error)
- func (m *Mongo) Init(ctx context.Context) (err error)
- func (m *Mongo) ListBundles(ctx context.Context, offset, limit int) (bundles []*models.Bundle, totalCount int, err error)
- func (m *Mongo) UpdateBundle(ctx context.Context, id string, update *models.Bundle) (*models.Bundle, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct {
config.MongoConfig
Connection *mongodriver.MongoConnection
// contains filtered or unexported fields
}
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) CreateBundle ¶
CreateBundle inserts a new bundle
func (*Mongo) DeleteBundle ¶
DeleteBundle deletes a bundle by ID
func (*Mongo) Init ¶
Init returns an initialised Mongo object encapsulating a connection to the mongo server/cluster with the given configuration, a health client to check the health of the mongo server/cluster, and a lock client
Click to show internal directories.
Click to hide internal directories.