mongo

package
v0.0.0-...-c528fcf Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, c *configs.Config) (store.Store, error)

Types

type Client

type Client struct {
	Database *mongo.Database
}

func (*Client) CreateLocation

func (c *Client) CreateLocation(ctx context.Context, loc types.CreateLocationRequest) (*types.Location, error)

func (*Client) CreateLocationIndexes

func (c *Client) CreateLocationIndexes(ctx context.Context) error

func (*Client) DeleteLocation

func (c *Client) DeleteLocation(ctx context.Context, id string) (int, error)

func (*Client) GetLocationByID

func (c *Client) GetLocationByID(ctx context.Context, id string) (types.Location, error)

func (*Client) GetLocations

func (c *Client) GetLocations(ctx context.Context, query types.FindLocationsRequest) ([]types.Location, int64, error)

func (*Client) LocationsCollection

func (c *Client) LocationsCollection() *mongo.Collection

func (*Client) ReverseGeoCodeLocations

func (c *Client) ReverseGeoCodeLocations(ctx context.Context, query types.LookupLocationRequest) ([]types.Location, error)

Jump to

Keyboard shortcuts

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