service

package
v0.0.0-...-52a3571 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 15 Imported by: 0

README

Service

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is service providers.

Functions

func NewEntClient

func NewEntClient(drv *sql.Driver) *ent.Client

func NewResolver

func NewResolver(drv *sql.Driver) *resolver.Resolver

Types

type AuthService

type AuthService struct {
	pb.UnimplementedAuthServer
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(uc *biz.AuthUsecase) *AuthService

func (*AuthService) CurrentUser

func (s *AuthService) CurrentUser(ctx context.Context, req *emptypb.Empty) (*pb.CurrentUserReply, error)

func (*AuthService) HasRole

func (s *AuthService) HasRole() func(ctx context.Context, obj interface{}, next graphql.Resolver, role model.RoleType, id *string) (res interface{}, err error)

HasRole check role of user (gql directive)

func (*AuthService) ListAuth

func (s *AuthService) ListAuth(ctx context.Context, req *pb.ListAuthRequest) (*pb.ListAuthReply, error)

func (*AuthService) Login

func (s *AuthService) Login(ctx context.Context, req *pb.LoginRequest) (*pb.LoginReply, error)

func (*AuthService) Register

func (s *AuthService) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterReply, error)

type BaseService

type BaseService struct {
	pb.UnimplementedBaseServer
}

func NewBaseService

func NewBaseService() *BaseService

func (*BaseService) Ping

func (s *BaseService) Ping(ctx context.Context, req *emptypb.Empty) (*pb.PingReply, error)

type GreeterService

type GreeterService struct {
	v1.UnimplementedGreeterServer
	// contains filtered or unexported fields
}

GreeterService is a greeter service.

func NewGreeterService

func NewGreeterService(uc *biz.GreeterUsecase) *GreeterService

NewGreeterService new a greeter service.

func (*GreeterService) SayHello

func (s *GreeterService) SayHello(ctx context.Context, in *v1.HelloRequest) (*v1.HelloReply, error)

SayHello implements helloworld.GreeterServer.

Jump to

Keyboard shortcuts

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