service

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0, MIT Imports: 27 Imported by: 2

README

Service

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is service providers.

Functions

func MapBizMenu2Pb

func MapBizMenu2Pb(a *biz.Menu, b *pb.Menu)

func MapCreatePbMenu2Biz

func MapCreatePbMenu2Biz(a *pb.CreateMenuRequest, b *biz.Menu)

func MapUpdatePbMenu2Biz

func MapUpdatePbMenu2Biz(a *pb.UpdateMenu, b *biz.Menu)

Types

type GrpcServerRegister

type GrpcServerRegister server.GrpcServiceRegister

func NewGrpcServerRegister

func NewGrpcServerRegister(menu *MenuService) GrpcServerRegister

type HttpServerRegister

type HttpServerRegister server.HttpServiceRegister

func NewHttpServerRegister

func NewHttpServerRegister(
	menu *MenuService,
	authzSrv authz.Service,
	errEncoder khttp.EncodeErrorFunc,
	factory blob.Factory,
	dataCfg *kconf.Data,
	opt asynq.RedisConnOpt,
) HttpServerRegister
type MenuService struct {
	pb.UnimplementedMenuServiceServer
	// contains filtered or unexported fields
}

func NewMenuService

func NewMenuService(auth authz.Service, repo biz.MenuRepo, logger klog.Logger) *MenuService
func (s *MenuService) CreateMenu(ctx context.Context, req *pb.CreateMenuRequest) (*pb.Menu, error)
func (s *MenuService) DeleteMenu(ctx context.Context, req *pb.DeleteMenuRequest) (*pb.DeleteMenuReply, error)
func (s *MenuService) GetMenu(ctx context.Context, req *pb.GetMenuRequest) (*pb.Menu, error)
func (s *MenuService) ListMenu(ctx context.Context, req *pb.ListMenuRequest) (*pb.ListMenuReply, error)
func (s *MenuService) UpdateMenu(ctx context.Context, req *pb.UpdateMenuRequest) (*pb.Menu, error)

Jump to

Keyboard shortcuts

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