storage

package
v0.0.0-...-6d1ceae Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExists = errors.New("resource already exists")
)

Functions

This section is empty.

Types

type Storage

type Storage interface {
	SaveRecipe(ctx context.Context, recipe *recipe.Recipe) error
	GetRecipe(ctx context.Context, id uuid.UUID) (*recipe.Recipe, error)
	GetRecipeBySlug(ctx context.Context, slug string) (*recipe.Recipe, error)
	GetRecipes(ctx context.Context, filter recipe.Filter) ([]*recipe.Recipe, error)
	CountRecipes(ctx context.Context, filter recipe.Filter) (int, error)

	GetTags(ctx context.Context, locale string) ([]*recipe.Tag, error)
	GetTagBySlug(ctx context.Context, slug string) (*recipe.Tag, error)

	GetIngredients(ctx context.Context, locale string) ([]*recipe.Ingredient, error)
	GetIngredientBySlug(ctx context.Context, slug string) (*recipe.Ingredient, error)

	GetEquipment(ctx context.Context, locale string) ([]*recipe.Equipment, error)
	GetEquipmentBySlug(ctx context.Context, slug string) (*recipe.Equipment, error)

	UpdateCache(ctx context.Context) error
	Close() error
}

Jump to

Keyboard shortcuts

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