mongodb

package
v0.0.0-...-352fc9d Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Database          = "tickity"
	EventCollection   = "event"
	ProfileCollection = "profile"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	mongodb.Config
}

type MongoDB

type MongoDB struct {
	*mongodb.DB
	// contains filtered or unexported fields
}

func New

func New(config Config, logger *otelzap.Logger) *MongoDB

func (MongoDB) DeleteEvent

func (m MongoDB) DeleteEvent(ctx context.Context, id string) error

func (MongoDB) GetEvent

func (m MongoDB) GetEvent(ctx context.Context, id string) (*model.Event, error)

func (MongoDB) GetEvents

func (m MongoDB) GetEvents(ctx context.Context, ids []string) ([]model.Event, error)

func (MongoDB) GetInvitation

func (m MongoDB) GetInvitation(ctx context.Context, id string) (*model.Invitation, error)

func (MongoDB) GetProfile

func (m MongoDB) GetProfile(ctx context.Context, id string) (*model.Profile, error)

func (MongoDB) UpsertEvent

func (m MongoDB) UpsertEvent(ctx context.Context, event *model.Event) error

func (MongoDB) UpsertInvitation

func (m MongoDB) UpsertInvitation(ctx context.Context, invitation *model.Invitation) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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