Documentation
¶
Index ¶
- type Config
- type ConfigOption
- type Environment
- type Response
- func Delete(ctx context.Context, e Environment, url string, in interface{}) *Response
- func Get(ctx context.Context, e Environment, url string) *Response
- func Method(ctx context.Context, e Environment, method string, url string, body io.Reader) (r *Response)
- func MethodBody(ctx context.Context, e Environment, method string, url string, in interface{}) (r *Response)
- func Patch(ctx context.Context, e Environment, url string, in interface{}) *Response
- func Post(ctx context.Context, e Environment, url string, in interface{}) *Response
- func PostRaw(ctx context.Context, e Environment, url string, body io.Reader) *Response
- func Put(ctx context.Context, e Environment, url string, in interface{}) *Response
- func PutRaw(ctx context.Context, e Environment, url string, body io.Reader) *Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Endpoint string
}
func DefaultConfig ¶
func DefaultConfig(options ...ConfigOption) Config
type ConfigOption ¶
type ConfigOption func(config *Config)
func WithCustomEndpoint ¶
func WithCustomEndpoint(endpoint string) ConfigOption
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment(config Config, httpClient *http.Client) Environment
func (Environment) Authorize ¶
func (e Environment) Authorize(in string) Environment
type Response ¶
type Response struct {
Err error
HttpResponse *http.Response
ResponseData *bytes.Buffer
Request *http.Request
}
func MethodBody ¶
func Patch ¶ added in v1.0.16
func Patch(ctx context.Context, e Environment, url string, in interface{}) *Response
Click to show internal directories.
Click to hide internal directories.