Versions in this module Expand all Collapse all v1 v1.0.1 Sep 25, 2025 v1.0.0 Sep 25, 2025 Changes in this version + var AuthServiceKey = GlobalServiceKey("authService") + var GrpcMethodsServiceKey = GlobalServiceKey("grpcMethodsService") + func AuthorizationServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error) + func GetGlobalService(k GlobalServiceKey) interface + func LoggingServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error) + func RegisterGlobalService(ctx context.Context, service interface{}) context.Context + type GlobalServiceKey string + type GrpcMethod struct + Name string + type GrpcMethodService struct + func NewGrpMethodsService() *GrpcMethodService + func (s *GrpcMethodService) IsPublicMethod(method string) bool + type TokenMiddleware struct + Conf *config.Config + func NewTokenMiddleware(conf *config.Config) *TokenMiddleware + func (t *TokenMiddleware) CreateToken(user *model.User) (string, error) + func (t *TokenMiddleware) ParseToken(tokenString string) (*UserClaims, error) + func (t *TokenMiddleware) ValidateToken(ctx context.Context) (*UserClaims, error) + type UserClaims struct + type UserInfo struct + Id int64 + Username string