Documentation ¶
Index ¶
- Constants
- func ClearSession(c *gin.Context) (err error)
- func GetSession(c *gin.Context) (session sessions.Session, err error)
- func ReqGetPager(gc *gin.Context, pageSize int) (pager *utilHttp.Paginator)
- func SaveSession(c *gin.Context) (err error)
- type GinEngine
- func (e *GinEngine) Debug(debug bool) *GinEngine
- func (e *GinEngine) UseDefault() *GinEngine
- func (e *GinEngine) UseMultiTemplate(templates []*GinTemplate, templateBasePath string) (err error)
- func (e *GinEngine) UseSessions(store sessions.Store, name string, options sessions.Options, regStructs ...any) *GinEngine
- type GinTemplate
- type Response
- func (res *Response) Failed(msg string, code ...int) *Response
- func (res *Response) RenderApiJson(gc *gin.Context)
- func (res *Response) RenderHtml(templateName string, gc *gin.Context)
- func (res *Response) RenderJson(gc *gin.Context)
- func (res *Response) SetData(v interface{}) *Response
- func (res *Response) Success(msg string, code ...int) *Response
- func (res *Response) WithDebug(v string) *Response
- func (res *Response) WithError(v string) *Response
- func (res *Response) WithVariables(v interface{}, k string) *Response
Constants ¶
View Source
const (
ContextVariablesKeyPager = "_gin_extend_context_variables_key_pager"
)
View Source
const (
ContextVariablesKeyResponse = "_gin_extend_context_variables_key_response"
)
Variables ¶
This section is empty.
Functions ¶
func ClearSession ¶
func SaveSession ¶
Types ¶
type GinEngine ¶
func NewGinEngine ¶
func NewGinEngine() (e *GinEngine)
func (*GinEngine) UseDefault ¶
func (*GinEngine) UseMultiTemplate ¶
func (e *GinEngine) UseMultiTemplate(templates []*GinTemplate, templateBasePath string) (err error)
type GinTemplate ¶
type Response ¶
type Response struct { Status bool StatusCode int Message string Debugs []string Errors []string Variables map[string]interface{} Data interface{} // contains filtered or unexported fields }
func GetResponse ¶
func (*Response) RenderApiJson ¶
func (*Response) RenderJson ¶
func (*Response) WithVariables ¶
Click to show internal directories.
Click to hide internal directories.