Documentation ¶
Index ¶
- func GenerateToken(key interface{}, tokenType TokenType) (string, error)
- func LoggerFromContext(ctx echo.Context) *logrus.Entry
- func ParseHTTPHeader(header http.Header) (netMessage types.NetMessage, err error)
- func ParseID(srcStr string) (id types.ID64, err error)
- func ParseSignature(signStr string) (sign []types.Sign520, err error)
- func ParseTime(timeStr string) (time types.Time, err error)
- func ParseToken(tokenStr string) (token types.Token, err error)
- func PrometheusHandler() echo.HandlerFunc
- func RegisterJWT(key interface{}) echo.MiddlewareFunc
- func TokenToString(token TokenType) string
- type JWTClaims
- type Service
- type TokenType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
func LoggerFromContext ¶
func ParseHTTPHeader ¶
func ParseHTTPHeader(header http.Header) (netMessage types.NetMessage, err error)
func PrometheusHandler ¶
func PrometheusHandler() echo.HandlerFunc
func RegisterJWT ¶
func RegisterJWT(key interface{}) echo.MiddlewareFunc
func TokenToString ¶
Types ¶
type JWTClaims ¶
type JWTClaims struct { ID string `json:"id"` Type TokenType `json:"type"` jwt.StandardClaims }
type Service ¶
func ServiceFromContext ¶
func ServiceFromContext(ctx echo.Context) *Service
Click to show internal directories.
Click to hide internal directories.