Documentation ¶
Index ¶
- func BuildClient(config *HTTPConfig) *http.Client
- func BuildHTTPRequest(config *HTTPConfig) (*http.Request, error)
- func ParseConfig(configBytes []byte) (map[string]interface{}, error)
- func ReadConfig(cfgFile string) ([]byte, error)
- func SetConfig(appConfig map[string]interface{}) error
- type HTTPConfig
- type InvalidHTTPMethodError
- type InvalidRequestConfigError
- type MissingRequiredConfigError
- type RequestConfig
- type RequestExecution
- type RequestGroup
- type RequestNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClient ¶
func BuildClient(config *HTTPConfig) *http.Client
func BuildHTTPRequest ¶
func BuildHTTPRequest(config *HTTPConfig) (*http.Request, error)
func ParseConfig ¶
func ReadConfig ¶
Types ¶
type HTTPConfig ¶
type HTTPConfig struct { Method string Scheme string Host string Path string Headers map[string]string Payload map[string]interface{} //[]byte QueryParams map[string]string `yaml:"query_params"` }
func (HTTPConfig) EndpointUrl ¶ added in v0.1.2
func (config HTTPConfig) EndpointUrl() *url.URL
func (HTTPConfig) RequestUrl ¶ added in v0.1.2
func (config HTTPConfig) RequestUrl() (*url.URL, error)
type InvalidHTTPMethodError ¶
type InvalidHTTPMethodError struct {
Method string
}
func (*InvalidHTTPMethodError) Error ¶
func (m *InvalidHTTPMethodError) Error() string
type InvalidRequestConfigError ¶
type InvalidRequestConfigError struct {
Config interface{}
}
func (*InvalidRequestConfigError) Error ¶
func (e *InvalidRequestConfigError) Error() string
type MissingRequiredConfigError ¶
type MissingRequiredConfigError struct {
Key string
}
func (*MissingRequiredConfigError) Error ¶
func (e *MissingRequiredConfigError) Error() string
type RequestConfig ¶
type RequestConfig struct { Name string GroupName string *HTTPConfig }
func FetchRequestConfigByName ¶
func FetchRequestConfigByName(group string, reqName string) (*RequestConfig, error)
func FetchRequestConfigs ¶
func FetchRequestConfigs() []*RequestConfig
func FetchRequestConfigsByGroup ¶
func FetchRequestConfigsByGroup(group string) []*RequestConfig
type RequestExecution ¶
func Execute ¶
func Execute(reqConfig *RequestConfig) (*RequestExecution, error)
Run entire request based off of config
func PerformRequest ¶
type RequestGroup ¶
type RequestGroup struct { Name string Requests []*RequestConfig *HTTPConfig }
type RequestNotFoundError ¶ added in v0.1.1
type RequestNotFoundError struct {
Path string
}
func (*RequestNotFoundError) Error ¶ added in v0.1.1
func (m *RequestNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.