Documentation
¶
Index ¶
Constants ¶
View Source
const ( TimeoutDefault = 5 * time.Second SchemeDefault = "https" )
Variables ¶
This section is empty.
Functions ¶
func NewHttpClient ¶
func NewJsonClient ¶
func NewNopLogger ¶ added in v0.2.0
func NewNopLogger() *nopLogger
Types ¶
type HttpClient ¶
type HttpClient interface {
RequestNoBody(
ctx context.Context,
method string,
path string,
param map[string]string,
header http.Header,
) (statusCode int, body []byte, err error)
Request(
ctx context.Context,
method string,
path string,
param []byte,
header http.Header,
) (statusCode int, body []byte, err error)
}
type JsonClient ¶
type JsonClient interface {
Delete(
ctx context.Context,
path string,
param map[string]string,
header http.Header,
) (statusCode int, body []byte, err error)
Get(
ctx context.Context,
path string,
param map[string]string,
header http.Header,
) (statusCode int, body []byte, err error)
Patch(
ctx context.Context,
path string,
param map[string]interface{},
header http.Header,
) (statusCode int, body []byte, err error)
Post(
ctx context.Context,
path string,
param map[string]interface{},
header http.Header,
) (statusCode int, body []byte, err error)
Put(
ctx context.Context,
path string,
param map[string]interface{},
header http.Header,
) (statusCode int, body []byte, err error)
}
Click to show internal directories.
Click to hide internal directories.