Documentation
¶
Index ¶
- func Migrate(ctx context.Context, client *ent.Client) error
- type Config
- type EntStorage
- func (s *EntStorage) Close() error
- func (s *EntStorage) CountRecipes(ctx context.Context, filter recipe.Filter) (int, error)
- func (s *EntStorage) GetEquipment(ctx context.Context, loc string) ([]*recipe.Equipment, error)
- func (s *EntStorage) GetEquipmentBySlug(ctx context.Context, slug string) (*recipe.Equipment, error)
- func (s *EntStorage) GetIngredientBySlug(ctx context.Context, slug string) (*recipe.Ingredient, error)
- func (s *EntStorage) GetIngredients(ctx context.Context, loc string) ([]*recipe.Ingredient, error)
- func (s *EntStorage) GetRecipe(ctx context.Context, id uuid.UUID) (*recipe.Recipe, error)
- func (s *EntStorage) GetRecipeBySlug(ctx context.Context, slug string) (*recipe.Recipe, error)
- func (s *EntStorage) GetRecipes(ctx context.Context, filter recipe.Filter) ([]*recipe.Recipe, error)
- func (s *EntStorage) GetTagBySlug(ctx context.Context, slug string) (*recipe.Tag, error)
- func (s *EntStorage) GetTags(ctx context.Context, loc string) ([]*recipe.Tag, error)
- func (s *EntStorage) SaveRecipe(ctx context.Context, rec *recipe.Recipe) error
- func (s *EntStorage) UpdateCache(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EntStorage ¶
type EntStorage struct {
// contains filtered or unexported fields
}
func NewEntStorage ¶
func NewEntStorage( cfg Config, logger logger.Logger, ) (*EntStorage, error)
func (*EntStorage) Close ¶
func (s *EntStorage) Close() error
func (*EntStorage) CountRecipes ¶
func (*EntStorage) GetEquipment ¶
func (*EntStorage) GetEquipmentBySlug ¶
func (*EntStorage) GetIngredientBySlug ¶
func (s *EntStorage) GetIngredientBySlug(ctx context.Context, slug string) (*recipe.Ingredient, error)
func (*EntStorage) GetIngredients ¶
func (s *EntStorage) GetIngredients(ctx context.Context, loc string) ([]*recipe.Ingredient, error)
func (*EntStorage) GetRecipeBySlug ¶
func (*EntStorage) GetRecipes ¶
func (*EntStorage) GetTagBySlug ¶
func (*EntStorage) SaveRecipe ¶
func (*EntStorage) UpdateCache ¶
func (s *EntStorage) UpdateCache(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.