Documentation ¶
Index ¶
- Constants
- func HandlerAdapter(handler HandlerFunc) gin.HandlerFunc
- func SetupRouter(appCtx *app.AppContext) (router *gin.Engine, gApi *gin.RouterGroup)
- func SetupRouterWith(appCtx *app.AppContext, opts *app.Options) *gin.Engine
- func ValidationEmail(fl validator.FieldLevel) bool
- func ValidationNotAllFieldsZero(sl validator.StructLevel)
- type ClientError
- type Context
- func (c *Context) AbortWithClientError(err error)
- func (c *Context) AbortWithForbidden(err error)
- func (c *Context) AbortWithServerError(err error)
- func (c *Context) AbortWithUnauthorized(err error)
- func (c *Context) AppContext() *app.AppContext
- func (c *Context) Empty()
- func (c *Context) Localizer() *libI18n.Localizer
- func (c *Context) Response(res any)
- func (c *Context) Translate(messageID string) string
- type HandlerFunc
- type PagingRequest
- type PagingResponse
- type Response
Constants ¶
View Source
const ( APP_CONTEXT_KEY = "is_app_context" LOCALIZER_KEY = "is_localizer" )
View Source
const ( VALIDATION_EMAIL = "inkEmail" VALIDATION_NOT_ALL_FIELDS_ZERO = "notAllFieldsZero" )
Variables ¶
This section is empty.
Functions ¶
func HandlerAdapter ¶
func HandlerAdapter(handler HandlerFunc) gin.HandlerFunc
func SetupRouter ¶
func SetupRouter(appCtx *app.AppContext) (router *gin.Engine, gApi *gin.RouterGroup)
func SetupRouterWith ¶
func ValidationEmail ¶
func ValidationEmail(fl validator.FieldLevel) bool
func ValidationNotAllFieldsZero ¶
func ValidationNotAllFieldsZero(sl validator.StructLevel)
Types ¶
type ClientError ¶
func (*ClientError) Error ¶
func (e *ClientError) Error() string
type Context ¶
func (*Context) AbortWithClientError ¶
func (*Context) AbortWithForbidden ¶
func (*Context) AbortWithServerError ¶
func (*Context) AbortWithUnauthorized ¶
func (*Context) AppContext ¶
func (c *Context) AppContext() *app.AppContext
type HandlerFunc ¶
type HandlerFunc func(*Context)
type PagingRequest ¶
type PagingResponse ¶
Click to show internal directories.
Click to hide internal directories.