Documentation ¶
Index ¶
Constants ¶
View Source
const ( // GET http method GET = "GET" // POST http method POST = "POST" // PUT http method PUT = "PUT" // PATCH http method PATCH = "PATCH" // DELETE http method DELETE = "DELETE" // HEAD http method HEAD = "HEAD" // OPTIONS http method OPTIONS = "OPTIONS" )
Variables ¶
This section is empty.
Functions ¶
func AddResponseHandlers ¶
func AddResponseHandlers(handlers ...ResponseHandlerFunc)
AddResponseHandlers : adds some response handlers to the current response handlers.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache : cached results of some API calls.
type CachedValue ¶
CachedValue : cached result of a API call.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client : client of an API.
func (*Client) AddResponseHandlers ¶
func (client *Client) AddResponseHandlers(handlers ...ResponseHandlerFunc)
AddResponseHandlers : adds some response handlers to the current response handlers.
type Request ¶
type Request struct { Method string Endpoint string ContentType string Authenticated bool Body interface{} Response interface{} UseDefaultResponseHandlers bool ResponseHandlers []ResponseHandlerFunc }
Request : request of an API call.
type ResponseHandlerFunc ¶
type ResponseHandlerFunc func(c *gin.Context, statusCode int, requestError error, APIError response.Error) bool
ResponseHandlerFunc : handler for the API responses.
Click to show internal directories.
Click to hide internal directories.