brands

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 CoreBrand

type CoreBrand interface {
	CreateBrand(context.Context, storage.Brand) (string, error)
	GetBrandByID(context.Context, string) (*storage.Brand, error)
	UpdateBrand(context.Context, storage.Brand) (*storage.Brand, error)
	ListBrand(context.Context, storage.ListBrandFilter) ([]storage.Brand, error)
	DeleteBrand(context.Context, string, string) error
}

type Svc

type Svc struct {
	braG.UnimplementedBrandServiceServer
	// contains filtered or unexported fields
}

func New

func New(cb CoreBrand, logger *logrus.Entry) *Svc

func (*Svc) CreateBrand

func (s *Svc) CreateBrand(ctx context.Context, req *braG.CreateBrandRequest) (*braG.CreateBrandResponse, error)

func (*Svc) DeleteBrand

func (s *Svc) DeleteBrand(ctx context.Context, req *braG.DeleteBrandRequest) (*emptypb.Empty, error)

func (*Svc) GetBrand

func (s *Svc) GetBrand(ctx context.Context, req *braG.GetBrandRequest) (*braG.GetBrandResponse, error)

func (*Svc) ListBrand

func (s *Svc) ListBrand(ctx context.Context, req *braG.ListBrandRequest) (*braG.ListBrandResponse, error)

func (*Svc) RegisterSvc

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

// RegisterService with grpc server.

func (*Svc) UpdateBrand

func (s *Svc) UpdateBrand(ctx context.Context, req *braG.UpdateBrandRequest) (*braG.UpdateBrandResponse, error)

func (*Svc) ValidateRequestedData

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

Jump to

Keyboard shortcuts

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