Documentation ¶
Index ¶
- func ClientFromContext(ctx context.Context) (*mongo.Client, bool)
- func NewClientContext(ctx context.Context, client *mongo.Client) context.Context
- func SaveProperties(ctx context.Context, properties []reps.Property) error
- func SetupClient(ctx context.Context) (context.Context, error)
- func Shutdown(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFromContext ¶
ClientFromContext gets the mongo client from the current context if available
func NewClientContext ¶
NewClientContext creates a new context with a mongo client
func SaveProperties ¶
SaveProperties saves the properties given using the client found in the given context
func SetupClient ¶
SetupClient sets up and connects a mongo client and stores it in a new context derived from the given context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.