Documentation ¶
Index ¶
- Variables
- func Base62Encode(i int64) string
- func GenerateToken(appKey, appSecret string) (string, error)
- func GetJWTSecret() []byte
- func GetPage(c echo.Context) int
- func GetPageOffset(page, pageSize int) int
- func GetPageSize(c echo.Context) int
- func Now() time.Time
- func ShortUUID() string
- func Sid() string
- type Claims
- type CustomValidator
- type Jwt
- type Pager
- type Response
- type ValidError
- type ValidErrors
Constants ¶
This section is empty.
Variables ¶
View Source
var ShortId = shortid.Shortid{}
Functions ¶
func GenerateToken ¶
func GetJWTSecret ¶
func GetJWTSecret() []byte
func GetPageOffset ¶
func GetPageSize ¶
func GetPageSize(c echo.Context) int
Types ¶
type Claims ¶
type Claims struct { AppKey string `json:"app_key"` AppSecret string `json:"app_secret"` jwt.StandardClaims }
func ParseToken ¶
type CustomValidator ¶
type CustomValidator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator() *CustomValidator
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
type Response ¶
type Response struct {
Ctx echo.Context
}
func NewResponse ¶
func NewResponse(ctx echo.Context) *Response
func (*Response) ToResponse ¶
func (*Response) ToResponseList ¶
type ValidError ¶
func (*ValidError) Error ¶
func (v *ValidError) Error() string
type ValidErrors ¶
type ValidErrors []*ValidError
func BindAndValid ¶
func BindAndValid(e echo.Context, v interface{}) (bool, ValidErrors)
func (ValidErrors) Error ¶
func (v ValidErrors) Error() string
func (ValidErrors) Errors ¶
func (v ValidErrors) Errors() []string
Click to show internal directories.
Click to hide internal directories.