Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BodyGetter ¶
type BodyGetter interface {
Get(c format.GetterConfig, body []byte) (value string, err error)
}
BodyGetter defines the behavior or something that can extract information from a response body.
func NewBodyGetter ¶
func NewBodyGetter(resp *http.Response) (e BodyGetter, err error)
NewBodyGetter returns the body extracter based on the Content-Type found in the response headers.
type HeaderGetter ¶
type HeaderGetter struct{}
HeaderGetter extracts information from response headers.
func (*HeaderGetter) Get ¶
func (e *HeaderGetter) Get(c format.GetterConfig, header http.Header) (value string, err error)
Get extracts a value out of request headers.
type JSONBodyGetter ¶
type JSONBodyGetter struct{}
JSONBodyGetter extracts information from a response body using JSON dot notation.
func (*JSONBodyGetter) Get ¶
func (e *JSONBodyGetter) Get(c format.GetterConfig, body []byte) (value string, err error)
Get extracts a value out of a JSON body using JSON dot notation.
type KeyValuePair ¶
KeyValuePair allows a map to be expressed in slice form.
type KeyValuePairs ¶
type KeyValuePairs []KeyValuePair
KeyValuePairs is a slice of KeyValuePair.
func (*KeyValuePairs) Set ¶
func (k *KeyValuePairs) Set(value string) error
Set adds an item to KeyValuePairs.
func (*KeyValuePairs) String ¶
func (k *KeyValuePairs) String() string
String returns the string representation of KeyValuePairs.
func (*KeyValuePairs) Type ¶
func (k *KeyValuePairs) Type() string
Type returns a string representation of the type of KeyValuePairs