mongodb

package
v0.0.0-...-75767bd Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuoteRepository

func NewQuoteRepository(collection *mongo.Collection) quote.Repository

Types

type MongoStorage

type MongoStorage struct {
	Client *mongo.Client
}

func NewMongoStorage

func NewMongoStorage() (*MongoStorage, error)

type QuoteRepository

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

func (*QuoteRepository) Create

func (r *QuoteRepository) Create(ctx context.Context, q *quote.Quote) error

func (*QuoteRepository) Delete

func (r *QuoteRepository) Delete(ctx context.Context, id string) error

func (*QuoteRepository) GetAll

func (r *QuoteRepository) GetAll(ctx context.Context) ([]quote.Quote, error)

func (*QuoteRepository) GetById

func (r *QuoteRepository) GetById(ctx context.Context, id string) (*quote.Quote, error)

func (*QuoteRepository) Update

func (r *QuoteRepository) Update(ctx context.Context, q *quote.Quote) error

Jump to

Keyboard shortcuts

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