godog

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 16 Imported by: 0

README

Utilities for creating http requests

For an example of usage see example_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseFeature

type BaseFeature struct {
	StartedAt time.Time
	Response  response
	Request   Request

	GetValue func(key string) (value string, err error)
	// contains filtered or unexported fields
}

func (*BaseFeature) AssertDataLength

func (api *BaseFeature) AssertDataLength(expected string) error

func (*BaseFeature) AssertEquals added in v0.2.1

func (api *BaseFeature) AssertEquals(actual, expected string) (err error)

func (*BaseFeature) AssertErrorIs

func (api *BaseFeature) AssertErrorIs(errorMessage string, code int) (err error)

func (*BaseFeature) AssertMissing added in v0.4.0

func (api *BaseFeature) AssertMissing(responseKey string) error

func (*BaseFeature) AssertNotEmpty

func (api *BaseFeature) AssertNotEmpty(responseKey string) error

func (*BaseFeature) AssertResponseBodyErrorMessageIs

func (api *BaseFeature) AssertResponseBodyErrorMessageIs(errorMessage string) (err error)

func (*BaseFeature) AssertResponseBodyValueEquals

func (api *BaseFeature) AssertResponseBodyValueEquals(key, expected string) (err error)

func (*BaseFeature) AssertResponseCode

func (api *BaseFeature) AssertResponseCode(code int) (err error)

func (*BaseFeature) CreatePathRequest

func (api *BaseFeature) CreatePathRequest(method, path string) error

func (*BaseFeature) ExecuteInvalidRequest

func (api *BaseFeature) ExecuteInvalidRequest() error

func (*BaseFeature) ExecuteInvalidRequestWithContext added in v0.0.8

func (api *BaseFeature) ExecuteInvalidRequestWithContext(ctx context.Context) error

func (*BaseFeature) ExecuteTheRequest

func (api *BaseFeature) ExecuteTheRequest() error

func (*BaseFeature) ExecuteTheRequestUntil added in v0.5.0

func (api *BaseFeature) ExecuteTheRequestUntil(until retry.Until) error

func (*BaseFeature) ExecuteTheRequestUntilWithContext added in v0.5.0

func (api *BaseFeature) ExecuteTheRequestUntilWithContext(ctx context.Context, until retry.Until) (err error)

func (*BaseFeature) ExecuteTheRequestUntilWithContextWithError added in v0.5.1

func (api *BaseFeature) ExecuteTheRequestUntilWithContextWithError(ctx context.Context, until retry.UntilWithError) (err error)

func (*BaseFeature) ExecuteTheRequestUntilWithError added in v0.5.1

func (api *BaseFeature) ExecuteTheRequestUntilWithError(until retry.UntilWithError) error

func (*BaseFeature) ExecuteTheRequestUntilWithPayload added in v0.5.0

func (api *BaseFeature) ExecuteTheRequestUntilWithPayload(payload []byte, until retry.Until) error

func (*BaseFeature) ExecuteTheRequestUntilWithPayloadAndContext added in v0.5.0

func (api *BaseFeature) ExecuteTheRequestUntilWithPayloadAndContext(ctx context.Context, payload []byte, until retry.Until) (err error)

func (*BaseFeature) ExecuteTheRequestUntilWithPayloadAndContextWithError added in v0.5.1

func (api *BaseFeature) ExecuteTheRequestUntilWithPayloadAndContextWithError(ctx context.Context, payload []byte, until retry.UntilWithError) (err error)

func (*BaseFeature) ExecuteTheRequestUntilWithPayloadWithError added in v0.5.1

func (api *BaseFeature) ExecuteTheRequestUntilWithPayloadWithError(payload []byte, until retry.UntilWithError) error

func (*BaseFeature) ExecuteTheRequestWithContext added in v0.0.8

func (api *BaseFeature) ExecuteTheRequestWithContext(ctx context.Context) (err error)

func (*BaseFeature) ExecuteTheRequestWithPayload

func (api *BaseFeature) ExecuteTheRequestWithPayload(payload []byte) error

func (*BaseFeature) ExecuteTheRequestWithPayloadAndContext added in v0.0.8

func (api *BaseFeature) ExecuteTheRequestWithPayloadAndContext(ctx context.Context, payload []byte) (err error)

func (*BaseFeature) SetBaseUrl

func (api *BaseFeature) SetBaseUrl(baseUrl string)

func (*BaseFeature) SetRequestBodyParameterTo

func (api *BaseFeature) SetRequestBodyParameterTo(key, value string) (err error)

func (*BaseFeature) SetRequestBodyParameterToInt added in v0.3.2

func (api *BaseFeature) SetRequestBodyParameterToInt(key string, value int) (err error)

func (*BaseFeature) SetRequestBodyStringListParameterTo

func (api *BaseFeature) SetRequestBodyStringListParameterTo(key, valuesstr string) (err error)

func (*BaseFeature) SetRequestHeaderParameterTo

func (api *BaseFeature) SetRequestHeaderParameterTo(key, value string) (err error)

func (*BaseFeature) SetsRequestPathParameterTo

func (api *BaseFeature) SetsRequestPathParameterTo(key, value string) (err error)

type Request

type Request struct {
	Url           string
	Body          map[string]interface{}
	Headers       http.Header
	Method        string
	ExecutionTime time.Time
}

func (*Request) String added in v0.2.1

func (r *Request) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL