mongodb

package
v0.0.0-...-dc51b1b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(uri string) (*Client, error)

func (*Client) Collection

func (c *Client) Collection(collection string) *mongo.Collection

func (*Client) Database

func (c *Client) Database() *mongo.Database

type StorageService

type StorageService struct {
	// contains filtered or unexported fields
}

func NewStorageService

func NewStorageService(mongodbClient *Client) (*StorageService, error)

func (*StorageService) GetMonths

func (*StorageService) Store

func (s *StorageService) Store(date time.Time, state string, data persistence.VaccinationData) error

type VaccineMonthMetricModel

type VaccineMonthMetricModel struct {
	ID    string                         `bson:"_id"`
	State string                         `json:"state"`
	Month string                         `json:"month"`
	Days  []*persistence.VaccinationData `json:"days"`
}

Jump to

Keyboard shortcuts

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