mongo

package
v0.0.0-...-788e818 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoRecipeRepository

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

func NewMongoRecipeRepository

func NewMongoRecipeRepository(recipesCollection *mongo.Collection) *MongoRecipeRepository

func (*MongoRecipeRepository) AddRecipe

func (repo *MongoRecipeRepository) AddRecipe(ctx context.Context, recipe *core.Recipe) error

func (*MongoRecipeRepository) DeleteRecipe

func (repo *MongoRecipeRepository) DeleteRecipe(ctx context.Context, recipe core.Recipe) error

func (*MongoRecipeRepository) GetRecipeByID

func (repo *MongoRecipeRepository) GetRecipeByID(ctx context.Context, id string) (core.Recipe, error)

func (*MongoRecipeRepository) GetRecipes

func (repo *MongoRecipeRepository) GetRecipes(ctx context.Context) ([]core.Recipe, error)

func (*MongoRecipeRepository) UpdateRecipe

func (repo *MongoRecipeRepository) UpdateRecipe(ctx context.Context, recipe core.Recipe) error

type MongoSourceRepository

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

func NewMongoSourceRepository

func NewMongoSourceRepository(sourcesCollection *mongo.Collection) *MongoSourceRepository

func (*MongoSourceRepository) AddSource

func (repo *MongoSourceRepository) AddSource(ctx context.Context, source *core.Source) error

func (*MongoSourceRepository) DeleteSource

func (repo *MongoSourceRepository) DeleteSource(ctx context.Context, source core.Source) error

func (*MongoSourceRepository) GetSourceByID

func (repo *MongoSourceRepository) GetSourceByID(ctx context.Context, id string) (core.Source, error)

func (*MongoSourceRepository) GetSources

func (repo *MongoSourceRepository) GetSources(ctx context.Context) ([]core.Source, error)

func (*MongoSourceRepository) UpdateSource

func (repo *MongoSourceRepository) UpdateSource(ctx context.Context, source core.Source) error

Jump to

Keyboard shortcuts

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