Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clienter ¶
type Clienter interface {
Get(url string) (resp *http.Response, err error)
Do(req *http.Request) (*http.Response, error)
Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
PostForm(url string, data url.Values) (resp *http.Response, err error)
Head(url string) (resp *http.Response, err error)
}
Clienter http client interface.
type Config ¶
type Config struct {
TLS *TLS `env:"TLS,prefix=TLS_" json:"tls"`
Transport *Transport `env:"TRANSPORT,prefix=TRANSPORT_" json:"transport"`
JWT *JWT `env:"JWT,prefix=JWT_" json:"jwt"`
}
Config is a struct containing client configuration values.
type DefaultClient ¶
DefaultClient a client struct.
type JWT ¶
type JWT struct {
ID string `env:"ID" json:"id"`
KeyPath string `env:"KEY_PATH" json:"keyPath"`
Audience string `env:"AUDIENCE" json:"audience"`
}
JWT a JWT token signer configuration.
type TLS ¶
type TLS struct {
Cert string `env:"CERT" json:"cert"`
Key string `env:"KEY" json:"key"`
CACert string `env:"CA_CERT" json:"caCert"`
}
TLS secure connection configuration.
type Transport ¶
type Transport struct {
MaxIdleConns int `env:"MAX_IDLE_CONNS,default=0" json:"maxIdleConns"`
MaxConnsPerHost int `env:"MAX_CONNS_PER_HOST,default=0" json:"maxConnsPerHost"`
MaxIdleConnsPerHost int `env:"MAX_IDLE_CONNS_PER_HOST,default=2" json:"maxIdleConnsPerHost"`
Timeout time.Duration `env:"TIMEOUT,default=10s" json:"timeout"`
}
Transport contains client transport configuration.
Click to show internal directories.
Click to hide internal directories.