Versions in this module Expand all Collapse all v0 v0.1.5 Nov 26, 2025 Changes in this version + const ErrorCode + const FailCode + const ForbiddenCode + const JWTCookieKey + const JWTHeaderKey + const JWTPrefix + const JWTQueryKey + const MethodAny + const MethodConnect + const MethodDelete + const MethodGet + const MethodHead + const MethodOptions + const MethodPatch + const MethodPost + const MethodPut + const MethodTrace + const NotFoundCode + const SuccessCode + type AuthInfo struct + Email string + Extra H + Roles []string + UserID string + Username string + func (a AuthInfo) Claims() H + func (a AuthInfo) HasAnyRole(roles ...string) bool + func (a AuthInfo) HasRole(role string) bool + type CacheStorage interface + Clear func() + Delete func(key string) + Get func(key string) (interface{}, bool) + Has func(key string) bool + Keys func() []string + Set func(key string, value interface{}, duration ...time.Duration) + type ContextKey string + type ErrorHandler interface + HandleError func(ctx RequestContext, err error) + type FileStreamer interface + Process func(filePath string, processor func(chunk []byte, offset int64) error) error + ProcessReader func(reader http.Request, processor func(chunk []byte, offset int64) error) error + type H map[string]interface + type HandlerFunc interface + type JWTManager interface + GenerateToken func(payload map[string]interface{}) (string, error) + IsTokenRevoked func(jti string) bool + ParsePayload func(token string) (map[string]interface{}, error) + RevokeToken func(jti string, expirationTime time.Time) error + ValidateToken func(token string) (map[string]interface{}, error) + type ListResponse struct + Data interface{} + Pagination Pagination + type Pagination struct + CurrentPage int + PageSize int + TotalCount int64 + TotalPages int + type RequestContext interface + CacheDelete func(key string) + CacheGet func(key string) (interface{}, bool) + CacheSet func(key string, value interface{}, duration ...time.Duration) + Error func(msg string, url ...string) + Fail func(msg string, url ...string) + FormFile func(name string) (*multipart.FileHeader, error) + GetHeader func(key string) string + GetIP func() string + GetJWT func() string + Host func() string + JSON func(code int, obj interface{}) + Method func() string + Param func(key string, defaultValue ...string) string + ParamInt func(key string, defaultValue ...int) int + PostForm func(key string) string + Query func(key string) string + SetJWT func(token string, maxAge int) + Success func(data interface{}, url ...string) + URL func() string + type ResourcePool interface + Close func() + Get func() (T, error) + Len func() int + Put func(resource T) + Stats func() (active, idle int) + type Response struct + Code int + Data interface{} + Msg string + URL string + type ResponseWriter interface + Abort func() + JSON func(code int, obj interface{}) + type SSEClient interface + Close func() + GetID func() string + Send func(event *SSEEvent) error + type SSEEvent struct + Data interface{} + Event string + ID string + Retry int + type SSEHub interface + Broadcast func(event *SSEEvent) + Close func() + GetClients func() []string + RegisterClient func(client SSEClient) + UnregisterClient func(client SSEClient) + type UploadConfig struct + AllowedExts []string + MaxSize int64 + SavePath string + type Validator interface + Validate func() (bool, string)