Documentation
¶
Index ¶
- type Client
- func (c *Client) Get(path string, params ...interface{}) ([]byte, error)
- func (c *Client) Post(body []byte, path string, params ...interface{}) ([]byte, error)
- func (c *Client) Put(body []byte, path string, params ...interface{}) ([]byte, error)
- func (c *Client) SendPath(method, path string, body []byte, header map[string]string) ([]byte, error)
- func (c *Client) SendUrl(method, url string, body io.Reader, header map[string]string) (io.ReadCloser, error)
- type ClientInfo
- type Headers
- type Params
- type Server
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client client of http server
type ClientInfo ¶
type ClientInfo struct { Address string `yaml:"address" json:"address"` Timeout time.Duration `yaml:"timeout" json:"timeout" default:"5m"` KeepAlive time.Duration `yaml:"keepalive" json:"keepalive" default:"10m"` Username string `yaml:"username" json:"username"` Password string `yaml:"password" json:"password"` utils.Certificate `yaml:",inline" json:",inline"` }
ClientInfo http client config
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server http server
func NewServer ¶
func NewServer(c ServerInfo, a func(u, p string) bool) (*Server, error)
NewServer creates a new http server
type ServerInfo ¶
type ServerInfo struct { Address string `yaml:"address" json:"address"` Timeout time.Duration `yaml:"timeout" json:"timeout" default:"5m"` utils.Certificate `yaml:",inline" json:",inline"` }
ServerInfo http server config
Click to show internal directories.
Click to hide internal directories.