Example #1
0
func MustUint8(c echo.Context, k string) (r uint8) {
	if v, ok := c.Get(k).(uint8); ok {
		r = v
	}
	return
}
Example #2
0
func MustFloat64(c echo.Context, k string) (r float64) {
	if v, ok := c.Get(k).(float64); ok {
		r = v
	}
	return
}
Example #3
0
func MustInt64(c echo.Context, k string) (r int64) {
	if v, ok := c.Get(k).(int64); ok {
		r = v
	}
	return
}
Example #4
0
func MustBool(c echo.Context, k string) (r bool) {
	if v, ok := c.Get(k).(bool); ok {
		r = v
	}
	return
}
Example #5
0
func MustString(c echo.Context, k string) (r string) {
	if v, ok := c.Get(k).(string); ok {
		r = v
	}
	return
}
Example #6
0
File: jwt.go Project: webx-top/webx
func (j *JWT) Claims(c echo.Context) map[string]interface{} {
	r, _ := c.Get(`webx:jwtClaims`).(map[string]interface{})
	return r
}