Documentation ¶
Index ¶
- func GetRecordWindows(c *gin.Context, queryStruct pageQuery) (start, size int, err error)
- func Logger(c *gin.Context) *logrus.Logger
- type ApiCreateData
- type CheckApiRequest
- type GetRequestMoreData
- type QueryParams
- type ResInterface
- type ResponseMsg
- type Server
- func (s *Server) AdminMiddleware(m gin.HandlerFunc)
- func (s *Server) ApiCreate(c *gin.Context)
- func (s *Server) ApiDelete(c *gin.Context)
- func (s *Server) ApiGet(c *gin.Context)
- func (s *Server) ApiList(c *gin.Context)
- func (s *Server) GetRouterGroup(prefix string) *gin.RouterGroup
- func (s *Server) ProxyList(c *gin.Context)
- func (s *Server) Query(c *gin.Context)
- func (s *Server) QueryMiddleware(m ...gin.HandlerFunc)
- func (r *Server) RegisterBindValidator(tag string, fn validator.Func, callValidationEvenIfNull ...bool)
- func (r *Server) RegisterTemplateFunction(funcMap template.FuncMap)
- func (s *Server) Run(g *run.Group)
- func (s *Server) WithCheckApinRequest(f CheckApiRequest)
- func (r *Server) WithTag(tag ResInterface)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRecordWindows ¶
Types ¶
type ApiCreateData ¶
type ApiCreateData struct { DB string `json:"db"` ID uint `json:"id"` Name string `json:"name"` Method string `json:"method"` ApiType string `json:"apiType"` Description string `json:"description"` SqlType string `json:"sqlType"` // template chain SqlTemplate map[string]string `json:"sqlTemplate"` SqlTemplateParameters map[string]interface{} `json:"sqlTemplateParameters"` SqlTemplateResult map[string]interface{} `json:"sqlTemplateResult"` }
type GetRequestMoreData ¶
type GetRequestMoreData func() map[string]interface{}
type QueryParams ¶
type QueryParams map[string]interface{}
func (QueryParams) GetTest ¶
func (q QueryParams) GetTest() (bool, error)
type ResInterface ¶
type ResponseMsg ¶
type ResponseMsg struct { ErrorCode int `json:"errno"` ErrorMsg string `json:"errmsg"` Data interface{} `json:"data"` // contains filtered or unexported fields }
func (*ResponseMsg) CodeTag ¶
func (r *ResponseMsg) CodeTag() string
func (*ResponseMsg) DataTag ¶
func (r *ResponseMsg) DataTag() string
func (ResponseMsg) MarshalJSON ¶
func (r ResponseMsg) MarshalJSON() ([]byte, error)
func (*ResponseMsg) MessageTag ¶
func (r *ResponseMsg) MessageTag() string
func (*ResponseMsg) New ¶
func (r *ResponseMsg) New() *ResponseMsg
func (*ResponseMsg) WithTag ¶
func (r *ResponseMsg) WithTag(tag ResInterface)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AdminMiddleware ¶
func (s *Server) AdminMiddleware(m gin.HandlerFunc)
func (*Server) GetRouterGroup ¶
func (s *Server) GetRouterGroup(prefix string) *gin.RouterGroup
get gin router group
func (*Server) QueryMiddleware ¶
func (s *Server) QueryMiddleware(m ...gin.HandlerFunc)
middleware for query api
func (*Server) RegisterBindValidator ¶
func (r *Server) RegisterBindValidator(tag string, fn validator.Func, callValidationEvenIfNull ...bool)
add custom validation
func (*Server) RegisterTemplateFunction ¶
add template functions
func (*Server) WithCheckApinRequest ¶
func (s *Server) WithCheckApinRequest(f CheckApiRequest)
check api type auth
func (*Server) WithTag ¶
func (r *Server) WithTag(tag ResInterface)
Click to show internal directories.
Click to hide internal directories.