Versions in this module Expand all Collapse all v1 v1.0.5 May 17, 2024 v1.0.4 May 17, 2024 Changes in this version type Response + TraceId string v1.0.3 May 17, 2024 v1.0.2 May 17, 2024 v1.0.1 May 17, 2024 Changes in this version + func NewMemMigrate(m ...any) + func NewMigrate(m ...any) v1.0.0 May 17, 2024 Changes in this version + const DB_TYPE_MEM + const DB_TYPE_MYSQL + const DB_TYPE_PGSQL + const HEADER_AUTHORIZATION + const HEADER_X_LOCALE + var ApiService = new(apiService) + var Engine = newEngine() + var FileService = new(fileService) + var ModelService = new(modelService) + func Corn(pattern string, handler func(), initExec bool) + func DELETE[T any](path string, handler func(ctx *Context[T]), opts ...*ApiOpts) + func Env(key string) string + func GET[T any](path string, handler func(ctx *Context[T]), opts ...*ApiOpts) + func InitJob(handler func(), after bool) + func Middleware(handler func(ctx *Context[struct{}]), matchPaths []string, skipPaths []string) + func POST[T any](path string, handler func(ctx *Context[T]), opts ...*ApiOpts) + func PUT[T any](path string, handler func(ctx *Context[T]), opts ...*ApiOpts) + func WS[T any](path string, handler func(ctx *Context[T], ws *websocket.Conn)) + type ApiHandler struct + Handler gin.HandlerFunc + Method string + Opts *ApiOpts + Path string + type ApiInfo struct + Content string + Imports map[string]bool + type ApiOpts struct + Cache *CacheOpt + RateLimit *RateLimitOpt + Typescript *TypescriptOpt + type CacheOpt struct + Duration time.Duration + type Context struct + Engine *engine + GinCtx *gin.Context + Request *T + Response *Response + TraceId string + func NewContext[T any](ginCtx *gin.Context) *Context[T] + func (c *Context[T]) Agent() string + func (c *Context[T]) Authorization() string + func (c *Context[T]) BearerToken() string + func (c *Context[T]) Err(message string) + func (c *Context[T]) Forbidden(message string) + func (c *Context[T]) IP() string + func (c *Context[T]) InternalServerError(message string) + func (c *Context[T]) Locale() string + func (c *Context[T]) LogDebug(msg ...any) + func (c *Context[T]) LogErr(msg ...any) + func (c *Context[T]) LogInfo(msg ...any) + func (c *Context[T]) OK(data any, page ...*gorm.Pagination) + func (c *Context[T]) OKDownload(bytes []byte, filename ...string) + func (c *Context[T]) OKFile(bytes []byte, filename ...string) + func (c *Context[T]) Page() *gorm.Pagination + func (c *Context[T]) Sort() *gorm.Sorting + func (c *Context[T]) TraceID() string + func (c *Context[T]) Unauthorized(message string) + type CornHandler struct + Handler func() + InitExec bool + Pattern string + type InitJobHandler struct + After bool + Handler func() + type MiddlewareHandler struct + Handler gin.HandlerFunc + MatchPaths []string + SkipPaths []string + type RateLimitOpt struct + Duration time.Duration + Rate int64 + type Response struct + Data any + Duration int64 + ErrMessage string + Pagination *gorm.Pagination + Success bool + Time string + type Trace struct + Responses []Response + TraceId string + type TypescriptOpt struct + Body string + Forms []string + FunctionName string + Models []any + Paths []string + Response string + type WsHandler struct + Handler gin.HandlerFunc + Path string