Documentation ¶
Index ¶
- func AddAPIKeyHeaderIfHas(hitEndpoint *http.Request)
- func CloseResponseBody(response *http.Response)
- func GetAPIKey() string
- func InitializeScenario(sc *godog.ScenarioContext)
- func NewHTTPClient() *http.Client
- func ReaderResponseBody(response *http.Response) ([]byte, error)
- func SendHTTPRequest(request *http.Request) (*http.Response, error)
- type Entity
- func (e *Entity) GivenEndpoint(host string, endpoint string) error
- func (e *Entity) InitializeDB() error
- func (e *Entity) SendDELETEEndpointWithParams(params string) error
- func (e *Entity) SendGETEndpointWithParams(params string) error
- func (e *Entity) SendGETEndpointWithoutBody() error
- func (e *Entity) SendPOSTEndpointWithBodyFormUrlEncoded(table *godog.Table) error
- func (e *Entity) SendPOSTEndpointWithBodyJSON(requestBody *godog.DocString) error
- func (e *Entity) SendPUTEndpointWithBodyJSON(params string, requestBody *godog.DocString) error
- func (t *Entity) ValidateJSONSchema(jsonSchemaPath string) error
- func (t *Entity) ValidateResponseBody(path, expected string) error
- func (t *Entity) ValidateStatusCode(expected string) error
- func (t *Entity) ValidateValueDB(query, expected string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAPIKeyHeaderIfHas ¶
func CloseResponseBody ¶
func InitializeScenario ¶
func InitializeScenario(sc *godog.ScenarioContext)
func NewHTTPClient ¶
Types ¶
type Entity ¶
type Entity struct { UrlEndpoint string ResponseData *http.Response Cases helper.Case ResponseBody []byte // contains filtered or unexported fields }
func (*Entity) InitializeDB ¶
func (*Entity) SendDELETEEndpointWithParams ¶
func (*Entity) SendGETEndpointWithParams ¶
func (*Entity) SendGETEndpointWithoutBody ¶
func (*Entity) SendPOSTEndpointWithBodyFormUrlEncoded ¶
func (*Entity) SendPOSTEndpointWithBodyJSON ¶
func (*Entity) SendPUTEndpointWithBodyJSON ¶
func (*Entity) ValidateJSONSchema ¶
func (*Entity) ValidateResponseBody ¶
func (*Entity) ValidateStatusCode ¶
func (*Entity) ValidateValueDB ¶
Click to show internal directories.
Click to hide internal directories.