Documentation
¶
Index ¶
- type Config
- type DefaultDatasetMetadata
- type MongoClient
- func (c *MongoClient) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (c *MongoClient) Close(ctx context.Context) error
- func (c *MongoClient) Conn() *mongo.MongoConnection
- func (c *MongoClient) GetDefaultDatasetMetadata(ctx context.Context, populationType string) (*DefaultDatasetMetadata, error)
- func (c *MongoClient) GetDefaultDatasetPopulationTypes(ctx context.Context) ([]string, error)
- func (c *MongoClient) PutDefaultDatasetMetadata(ctx context.Context, metadata DefaultDatasetMetadata) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
mongo.MongoDriverConfig
MetadataDatabase string
MetadataCollection string
}
Config holds the config for the mongodb store
type DefaultDatasetMetadata ¶
type MongoClient ¶
type MongoClient struct {
MetadataCollection string
// contains filtered or unexported fields
}
func (*MongoClient) Checker ¶
func (c *MongoClient) 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 (*MongoClient) Close ¶
func (c *MongoClient) Close(ctx context.Context) error
Close represents mongo session closing within the context deadline
func (*MongoClient) Conn ¶
func (c *MongoClient) Conn() *mongo.MongoConnection
Conn returns the underlying mongodb connection.
func (*MongoClient) GetDefaultDatasetMetadata ¶
func (c *MongoClient) GetDefaultDatasetMetadata(ctx context.Context, populationType string) (*DefaultDatasetMetadata, error)
GetDefaultDatasetMetadata gets the metadata stored against a particular population type
func (*MongoClient) GetDefaultDatasetPopulationTypes ¶
func (c *MongoClient) GetDefaultDatasetPopulationTypes(ctx context.Context) ([]string, error)
GetDefaultDatasetPopulationTypes returns a list of population types for which there is default dataset information
func (*MongoClient) PutDefaultDatasetMetadata ¶
func (c *MongoClient) PutDefaultDatasetMetadata(ctx context.Context, metadata DefaultDatasetMetadata) error
PutDefaultDatasetMetadata puts the metadata stored against a particular population type by upserting the PutDefaultDatasetMetadata struct
Click to show internal directories.
Click to hide internal directories.