Documentation ¶
Index ¶
- type EndpointConfig
- func (ep *EndpointConfig) GetJSONBytes(path string) []byte
- func (ep *EndpointConfig) GetJSONString(path string) string
- func (ep *EndpointConfig) GetRequestParams() map[string]string
- func (ep *EndpointConfig) GetString(path string) string
- func (ep *EndpointConfig) RequestData() []byte
- func (ep *EndpointConfig) RequestMethod() string
- func (ep *EndpointConfig) RequestURL() string
- func (ep *EndpointConfig) String() string
- type Prompt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointConfig ¶
type EndpointConfig struct { Filename string Method string Url string OnComplete []string Transform []string Headers map[string][]string Prompts []*Prompt // contains filtered or unexported fields }
func Load ¶
func Load(filename string) (*EndpointConfig, error)
Load - Loads a confugruation from a file on the disk.
func LoadBytes ¶
func LoadBytes(fileBytes []byte) (*EndpointConfig, error)
LoadBytes - Loads a configuration from a byte array
func New ¶ added in v0.2.0
func New() *EndpointConfig
func (*EndpointConfig) GetJSONBytes ¶
func (ep *EndpointConfig) GetJSONBytes(path string) []byte
GetJSONBytes - returns the inner JSON at the path as a byte array.
func (*EndpointConfig) GetJSONString ¶
func (ep *EndpointConfig) GetJSONString(path string) string
GetJSONString - returns the inner JSON at the path as a string.
func (*EndpointConfig) GetRequestParams ¶
func (ep *EndpointConfig) GetRequestParams() map[string]string
GetRequestParams - Returns a string map of any request params for the request. This only applies to GET requests.
func (*EndpointConfig) GetString ¶
func (ep *EndpointConfig) GetString(path string) string
GetString - returns a string from an arbitrary path in the configuration.
func (*EndpointConfig) RequestData ¶ added in v0.1.2
func (ep *EndpointConfig) RequestData() []byte
RequestData - returns the data attribute from the config. This contains the payload, for a POST request, that will be sent to the server.
func (*EndpointConfig) RequestMethod ¶
func (ep *EndpointConfig) RequestMethod() string
RequestMethod - returns the request method.
func (*EndpointConfig) RequestURL ¶
func (ep *EndpointConfig) RequestURL() string
RequestURL - returns the full url for the request. If this is a GET request and has request parameters they are included in the URL.
func (*EndpointConfig) String ¶ added in v0.3.0
func (ep *EndpointConfig) String() string