Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct {
None bool `json:"none,omitempty"`
Basic *AuthorizationBasic `json:"basic,omitempty"`
Bearer string `json:"bearer,omitempty"`
Raw string `json:"raw,omitempty"`
JWT *AuthorizationJWT `json:"jwt,omitempty"`
}
One of the following fields
type AuthorizationBasic ¶
type AuthorizationJWT ¶
type AuthorizationJWT struct {
Jose map[string]any `json:"jose"`
Body map[string]any `json:"body"`
// Possibles values: HS256|HS384|HS512
// Other value will produce a none algo signature
Algo string `json:"algo"`
// One the the floowing value, use .Key() to gte the value
KeyBytes []byte `json:"key-base64"`
KeyString string `json:"key-string"`
}
func (*AuthorizationJWT) Key ¶
func (jwt *AuthorizationJWT) Key() []byte
type Collection ¶
type Collection struct {
Name string `json:"name"`
*Authorization `json:"authorization,omitempty"`
Requests []*Request `json:"requests"`
Children []*Collection `json:"children"`
// contains filtered or unexported fields
}
func ParseCollection ¶
func ParseCollection(data []byte) (*Collection, error)
func (*Collection) Fetch ¶
func (c *Collection) Fetch(config *Config)
func (*Collection) RemoveResponse ¶
func (c *Collection) RemoveResponse()
Remove all response object of all requests.
type Request ¶
type Request struct {
Name string `json:"name,omitempty"`
*Authorization `json:"authorization,omitempty"`
Method string `json:"method,omitempty"`
URL string `json:"url,omitempty"`
Header http.Header `json:"header,omitempty"`
Body string `json:"body,omitempty"`
Test string `json:"test,omitempty"`
Error string `json:"error,omitempty"`
Response *Response `json:"response,omitempty"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.