Documentation ¶
Index ¶
- Variables
- func NewEntClient(drv *sql.Driver) *ent.Client
- func NewResolver(drv *sql.Driver) *resolver.Resolver
- type AuthService
- func (s *AuthService) CurrentUser(ctx context.Context, req *emptypb.Empty) (*pb.CurrentUserReply, error)
- func (s *AuthService) HasRole() ...
- func (s *AuthService) ListAuth(ctx context.Context, req *pb.ListAuthRequest) (*pb.ListAuthReply, error)
- func (s *AuthService) Login(ctx context.Context, req *pb.LoginRequest) (*pb.LoginReply, error)
- func (s *AuthService) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterReply, error)
- type BaseService
- type GreeterService
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewGreeterService, NewBaseService, NewAuthService, NewResolver)
ProviderSet is service providers.
Functions ¶
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
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.
Click to show internal directories.
Click to hide internal directories.