Documentation ¶
Index ¶
- func CORS() gin.HandlerFunc
- func CheckSign(cfg *cfgargs.SrvConfig) gin.HandlerFunc
- func GetAPIString(host, path string) string
- func IPWhiteList(whitelist map[string]bool) gin.HandlerFunc
- type Client
- func (c *Client) GetGoReq() *gorequest.SuperAgent
- func (c *Client) GetWithQueryParams(url string, vals url.Values, respModel interface{}) error
- func (c *Client) ObjectToUrlValues(obj interface{}) url.Values
- func (c *Client) PostForm(url string, vals url.Values, respModel interface{}) error
- func (c *Client) PostJson(url string, reqModel, respModel interface{}) error
- type NodeRoute
- type Route
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶
func CORS() gin.HandlerFunc
func GetAPIString ¶
func IPWhiteList ¶
func IPWhiteList(whitelist map[string]bool) gin.HandlerFunc
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func (*Client) GetGoReq ¶
func (c *Client) GetGoReq() *gorequest.SuperAgent
func (*Client) GetWithQueryParams ¶
GetWithQueryParams Send a Get request and unmarshal.
func (*Client) ObjectToUrlValues ¶
ObjectToUrlValues marshal interface{} into url.Values with `json` tags
type NodeRoute ¶
type NodeRoute struct {
// contains filtered or unexported fields
}
func NewNodeRoute ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server ...
func (*Server) AddNodeRoute ¶
func (*Server) Use ¶
func (s *Server) Use(middlewares ...gin.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.