Documentation ¶
Index ¶
- func CorsHandler() gin.HandlerFunc
- func CreateToken(userID string, accessSecret string, accessExpire int64, platformID int) (string, error)
- func FormatError(err error) error
- func GinPanicErr(c *gin.Context, err any)
- func GinParseOperationID() gin.HandlerFunc
- func GinParseToken(secretKey jwt.Keyfunc, whitelist []string) gin.HandlerFunc
- func GrpcClient() grpc.DialOption
- func GrpcServer() grpc.ServerOption
- func InterceptChain(intercepts ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- func PanicStackToLog(ctx context.Context, err any)
- func ReplaceNil(data any)
- func RpcClientInterceptor(ctx context.Context, method string, req, resp any, cc *grpc.ClientConn, ...) (err error)
- func RpcServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func FormatError ¶
func GinPanicErr ¶
func GinParseOperationID ¶
func GinParseOperationID() gin.HandlerFunc
func GinParseToken ¶
func GinParseToken(secretKey jwt.Keyfunc, whitelist []string) gin.HandlerFunc
func GrpcClient ¶
func GrpcClient() grpc.DialOption
func GrpcServer ¶
func GrpcServer() grpc.ServerOption
func InterceptChain ¶
func InterceptChain(intercepts ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
func PanicStackToLog ¶
func ReplaceNil ¶
func ReplaceNil(data any)
ReplaceNil initialization nil values. e.g. Slice will be initialized as [],Map/interface will be initialized as {}
func RpcClientInterceptor ¶
func RpcClientInterceptor(ctx context.Context, method string, req, resp any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) (err error)
func RpcServerInterceptor ¶
func RpcServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.