Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthTypeCookie = "Cookie" AuthTypeOAuth2 = "OAuth 2.0" )
Variables ¶
View Source
var ( // ErrHTTPRequest is returned when failed to make a request by http client ErrHTTPRequest = errors.New("failed to create a http request") // ErrHTTPResponse is returned when failed to receive a response by http client ErrHTTPResponse = errors.New("failed to receive a http response") // ErrHTTPRespBody is returned when failed to read a http response body ErrHTTPRespBody = errors.New("failed to read a http response body") // ErrUndefinedAPI is returned when the target API is undefined ErrUndefinedAPI = errors.New("target API is undefined") )
Functions ¶
Types ¶
type AuthDataset ¶
AuthDataset is a dataset to store AuthData
func (AuthDataset) NewAuthInfo ¶ added in v0.6.0
func (set AuthDataset) NewAuthInfo() []AuthInfo
func (AuthDataset) Select ¶
func (set AuthDataset) Select(auth []string) AuthDataset
type Endpoint ¶
type Endpoint struct { URL string `json:"url"` Method string `json:"method"` Headers map[string]string `json:"headers"` Body json.RawMessage `json:"body"` }
Endpoint is for information of a single API endpoint
type Request ¶
type Response ¶
Response constains status and body of a HTTP Response
func DefaultResponse ¶
func DefaultResponse() *Response
DefaultResponse creates a response with default values
Click to show internal directories.
Click to hide internal directories.