Documentation ¶
Index ¶
Constants ¶
View Source
const (
HeaderForwardedPayload = "X-Forwarded-Payload"
)
View Source
const (
HttpJsonApiErrNamespace = "JSON_APIClient"
)
Variables ¶
View Source
var ( ErrAPINameIsEmpty = errors.TN(JsonApiClientErrorNamespace, 1, "api name is empty") ErrAPIClientSendFailed = errors.TN(JsonApiClientErrorNamespace, 2, "api client send failed, api: {{.api}}, url: {{.url}}") ErrAPIClientResponseUnmarshalFailed = errors.TN(JsonApiClientErrorNamespace, 3, "api response unmarshal failed, api: {{.api}}, url: {{.url}}") ErrAPIClientReadResponseBodyFailed = errors.TN(JsonApiClientErrorNamespace, 4, "read api response body failed, api is: {{.api}}") ErrAPIClientBadStatusCode = errors.TN(JsonApiClientErrorNamespace, 5, "bad response status code, api is: {{.api}}, code is: {{.code}}") ErrAPIClientCreateNewRequestFailed = errors.TN(JsonApiClientErrorNamespace, 6, "create new request failed") ErrUnknownPayloadError = errors.TN(JsonApiClientErrorNamespace, 7, "") )
View Source
var (
DefaultClientTimeout = time.Second * 30
)
View Source
var JsonApiClientErrorNamespace = "APIClient"
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type HTTPAPIClient ¶
type HTTPAPIClient struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.