mongo

package
v0.0.0-...-0bfa455 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProfileRepository

func NewProfileRepository(client *Client) imger.ProfileRepository

NewProfileRepository returns a profile mongo repository

Types

type Client

type Client struct {
	*mongo.Client
	Database string
}

Client mongo client

func NewClient

func NewClient(c Configuration) (*Client, error)

NewClient creates a new mongo session

func (*Client) Check

func (c *Client) Check() error

Check mongo health

type Configuration

type Configuration struct {
	//Database name
	Database string

	//MongoURL for mongo
	MongoURL string
}

Configuration for MongoDB

func (*Configuration) Validate

func (c *Configuration) Validate() error

Validate if configuration is valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL