Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) AddBlocked(_ context.Context, request *pb.AddBlockedRequest) (*pb.AddBlockedResponse, error)
- func (s *Service) Authenticate(_ context.Context, request *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error)
- func (s *Service) ClearToken(_ context.Context, request *pb.ClearTokenRequest) (*pb.ClearTokenResponse, error)
- func (s *Service) Delete(_ context.Context, request *pb.DeleteRequest) (*pb.DeleteResponse, error)
- func (s *Service) PackToken(_ context.Context, request *pb.PackTokenRequest) (*pb.PackTokenResponse, error)
- func (s *Service) RefreshToken(_ context.Context, request *pb.RefreshTokenRequest) (*pb.RefreshTokenResponse, error)
- func (s *Service) RegisterWithGrpcServer(server siface.IGrpcServer) error
- func (s *Service) ValidateToken(_ context.Context, request *pb.ValidateTokenRequest) (*pb.ValidateTokenResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGeneralFailure = status.Error(codes.Internal, "ErrGeneralFailure") ErrGenerateJwtFailure = status.Error(codes.Internal, "ErrGenerateJwtFailure") ErrClientParamFailure = status.Error(codes.Internal, "ErrClientParamFailure") ErrParseJwtTokenFailure = status.Error(codes.Internal, "ErrParseJwtTokenFailure") ErrPermissionDenied = status.Error(codes.PermissionDenied, "PermissionDenied") )
View Source
var ServiceModule = fx.Provide( func( l *zap.Logger, sSetting afx.AuthSettingParams, aParams mfx.AppParams, dbProvider ofx.DocumentStoreParams, rcParams ofx.RedisCacheParams, redisParams ofx.RedisParams, ) (rpc sfx.GrpcServiceResult, err error) { if coll, e := dbProvider.DriverProvider.OpenDbDriver(sSetting.AuthStoreName); e != nil { err = e } else { if svc, e := NewService( l, sSetting.JwtTokenSecret, sSetting.AuthUrl, coll, rcParams.RedisCache, aParams.AppName, otel.GetTracerProvider().Tracer(sSetting.AuthStoreName), redisParams.Redis, sSetting.JwtTokenExpire, ); e != nil { err = e } else { rpc.GrpcService = svc } } return }, )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { utility.WithoutAuth // contains filtered or unexported fields }
func NewService ¶
func (*Service) AddBlocked ¶
func (s *Service) AddBlocked(_ context.Context, request *pb.AddBlockedRequest) (*pb.AddBlockedResponse, error)
func (*Service) Authenticate ¶
func (s *Service) Authenticate(_ context.Context, request *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error)
func (*Service) ClearToken ¶
func (s *Service) ClearToken(_ context.Context, request *pb.ClearTokenRequest) (*pb.ClearTokenResponse, error)
func (*Service) Delete ¶
func (s *Service) Delete(_ context.Context, request *pb.DeleteRequest) (*pb.DeleteResponse, error)
func (*Service) PackToken ¶
func (s *Service) PackToken(_ context.Context, request *pb.PackTokenRequest) (*pb.PackTokenResponse, error)
func (*Service) RefreshToken ¶
func (s *Service) RefreshToken(_ context.Context, request *pb.RefreshTokenRequest) (*pb.RefreshTokenResponse, error)
func (*Service) RegisterWithGrpcServer ¶
func (s *Service) RegisterWithGrpcServer(server siface.IGrpcServer) error
func (*Service) ValidateToken ¶
func (s *Service) ValidateToken(_ context.Context, request *pb.ValidateTokenRequest) (*pb.ValidateTokenResponse, error)
Click to show internal directories.
Click to hide internal directories.