recipes

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

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Permission

func Permission(ctx context.Context) map[string]storage.ResAct

Types

type CoreRecipe

type CoreRecipe interface {
	CreateRecipe(context.Context, storage.Recipe) (string, error)
	GetRecipeByID(context.Context, string) (*storage.Recipe, error)
	UpdateRecipe(context.Context, storage.Recipe) (*storage.Recipe, error)
	ListRecipe(context.Context, storage.ListRecipeFilter) ([]storage.Recipe, error)
	DeleteRecipe(context.Context, string, string) error
}

type Svc

type Svc struct {
	recG.UnimplementedRecipeServiceServer
	// contains filtered or unexported fields
}

func New

func New(store CoreRecipe, logger *logrus.Entry) *Svc

func (*Svc) CreateRecipe

func (s *Svc) CreateRecipe(ctx context.Context, req *recG.CreateRecipeRequest) (*recG.CreateRecipeResponse, error)

func (*Svc) DeleteRecipe

func (s *Svc) DeleteRecipe(ctx context.Context, req *recG.DeleteRecipeRequest) (*emptypb.Empty, error)

func (*Svc) GetRecipe

func (s *Svc) GetRecipe(ctx context.Context, req *recG.GetRecipeRequest) (*recG.GetRecipeResponse, error)

func (*Svc) ListRecipe

func (s *Svc) ListRecipe(ctx context.Context, req *recG.ListRecipeRequest) (*recG.ListRecipeResponse, error)

func (*Svc) RegisterSvc

func (h *Svc) RegisterSvc(srv *grpc.Server) error

// RegisterService with grpc server.

func (*Svc) UpdateRecipe

func (s *Svc) UpdateRecipe(ctx context.Context, req *recG.UpdateRecipeRequest) (*recG.UpdateRecipeResponse, error)

func (*Svc) ValidateRequestedData

func (s *Svc) ValidateRequestedData(ctx context.Context, req storage.Recipe, id string) error

Jump to

Keyboard shortcuts

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