Documentation ¶
Index ¶
- Variables
- func RequestTypeNames() []string
- type Assert
- type Call
- type ExecuteResult
- type Executor
- type Export
- type FSParser
- type FSParserOpts
- type GRPCExecutor
- type GRPCExecutorOpts
- type HTTPExecutor
- type HTTPExecutorOpts
- type HttpClient
- type HttpClientConfig
- type IHttpClient
- type ImportedCall
- type MockExecutor
- type MockExecutor_Execute_Call
- func (_c *MockExecutor_Execute_Call) Return(_a0 *ExecuteResult, _a1 error) *MockExecutor_Execute_Call
- func (_c *MockExecutor_Execute_Call) Run(run func(call Call)) *MockExecutor_Execute_Call
- func (_c *MockExecutor_Execute_Call) RunAndReturn(run func(Call) (*ExecuteResult, error)) *MockExecutor_Execute_Call
- type MockExecutor_Expecter
- type MockIHttpClient
- type MockIHttpClient_Do_Call
- func (_c *MockIHttpClient_Do_Call) Return(_a0 *http.Response, _a1 error) *MockIHttpClient_Do_Call
- func (_c *MockIHttpClient_Do_Call) Run(run func(req *http.Request)) *MockIHttpClient_Do_Call
- func (_c *MockIHttpClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *MockIHttpClient_Do_Call
- type MockIHttpClient_Expecter
- type MockIHttpClient_SetNoTLSVerify_Call
- func (_c *MockIHttpClient_SetNoTLSVerify_Call) Return() *MockIHttpClient_SetNoTLSVerify_Call
- func (_c *MockIHttpClient_SetNoTLSVerify_Call) Run(run func()) *MockIHttpClient_SetNoTLSVerify_Call
- func (_c *MockIHttpClient_SetNoTLSVerify_Call) RunAndReturn(run func()) *MockIHttpClient_SetNoTLSVerify_Call
- type MockIHttpClient_SetTimeout_Call
- func (_c *MockIHttpClient_SetTimeout_Call) Return() *MockIHttpClient_SetTimeout_Call
- func (_c *MockIHttpClient_SetTimeout_Call) Run(run func(timeout time.Duration)) *MockIHttpClient_SetTimeout_Call
- func (_c *MockIHttpClient_SetTimeout_Call) RunAndReturn(run func(time.Duration)) *MockIHttpClient_SetTimeout_Call
- type MockParser
- type MockParser_Expecter
- type MockParser_ParseSingleSequence_Call
- func (_c *MockParser_ParseSingleSequence_Call) Return(_a0 Sequence, _a1 error) *MockParser_ParseSingleSequence_Call
- func (_c *MockParser_ParseSingleSequence_Call) Run(run func(path string)) *MockParser_ParseSingleSequence_Call
- func (_c *MockParser_ParseSingleSequence_Call) RunAndReturn(run func(string) (Sequence, error)) *MockParser_ParseSingleSequence_Call
- type MockParser_Parse_Call
- type Parser
- type RequestType
- type Runner
- type RunnerOpts
- type Sequence
- type SequenceMap
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRequestType = fmt.Errorf("not a valid RequestType, try [%s]", strings.Join(_RequestTypeNames, ", "))
var ErrWalkError = errors.New("error walking directory")
Functions ¶
func RequestTypeNames ¶
func RequestTypeNames() []string
RequestTypeNames returns a list of possible string values of RequestType.
Types ¶
type Call ¶
type Call struct { Name string `yaml:"name,omitempty"` Type RequestType `yaml:"type,omitempty"` Body map[string]any `yaml:"body,omitempty"` Headers map[string]string `yaml:"headers,omitempty"` ServiceHost string `yaml:"service-host,omitempty"` Url string `yaml:"url,omitempty"` Method string `yaml:"method,omitempty"` WantStatus int `yaml:"want-status,omitempty"` Exports []Export `yaml:"exports,omitempty"` Asserts []Assert `yaml:"asserts,omitempty"` Print bool `yaml:"print,omitempty"` SkipVerify bool `yaml:"skip-verify,omitempty"` FromImport *ImportedCall `yaml:"from-import,omitempty"` }
func (*Call) GetType ¶ added in v0.7.0
func (c *Call) GetType() RequestType
type ExecuteResult ¶ added in v0.1.0
type Executor ¶ added in v0.1.0
type Executor interface {
Execute(call Call) (*ExecuteResult, error)
}
type FSParser ¶
type FSParser struct {
// contains filtered or unexported fields
}
func NewFSParser ¶
func NewFSParser(opts FSParserOpts) *FSParser
func (*FSParser) ParseSequences ¶
func (f *FSParser) ParseSequences(root string) (SequenceMap, error)
type FSParserOpts ¶
type GRPCExecutor ¶ added in v0.6.0
type GRPCExecutor struct {
// contains filtered or unexported fields
}
func NewGRPCExecutor ¶ added in v0.6.0
func NewGRPCExecutor(opts GRPCExecutorOpts) *GRPCExecutor
func (*GRPCExecutor) Execute ¶ added in v0.6.0
func (g *GRPCExecutor) Execute(call Call) (*ExecuteResult, error)
type GRPCExecutorOpts ¶ added in v0.6.0
type HTTPExecutor ¶ added in v0.1.0
type HTTPExecutor struct {
// contains filtered or unexported fields
}
func NewHTTPExecutor ¶ added in v0.1.0
func NewHTTPExecutor(opts HTTPExecutorOpts) *HTTPExecutor
func (*HTTPExecutor) Execute ¶ added in v0.1.0
func (h *HTTPExecutor) Execute(call Call) (*ExecuteResult, error)
type HTTPExecutorOpts ¶ added in v0.1.0
type HTTPExecutorOpts struct { Logger zerolog.Logger Client IHttpClient }
type HttpClient ¶ added in v0.19.0
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶ added in v0.19.0
func NewHttpClient(conf HttpClientConfig) *HttpClient
func (*HttpClient) SetNoTLSVerify ¶ added in v0.19.0
func (h *HttpClient) SetNoTLSVerify()
func (*HttpClient) SetTimeout ¶ added in v0.19.0
func (h *HttpClient) SetTimeout(timeout time.Duration)
type HttpClientConfig ¶ added in v0.19.0
type IHttpClient ¶ added in v0.19.0
type ImportedCall ¶ added in v0.18.0
type MockExecutor ¶ added in v0.3.0
MockExecutor is an autogenerated mock type for the Executor type
func NewMockExecutor ¶ added in v0.3.0
func NewMockExecutor(t mockConstructorTestingTNewMockExecutor) *MockExecutor
NewMockExecutor creates a new instance of MockExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockExecutor) EXPECT ¶ added in v0.3.0
func (_m *MockExecutor) EXPECT() *MockExecutor_Expecter
func (*MockExecutor) Execute ¶ added in v0.3.0
func (_m *MockExecutor) Execute(call Call) (*ExecuteResult, error)
Execute provides a mock function with given fields: call
type MockExecutor_Execute_Call ¶ added in v0.3.0
MockExecutor_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
func (*MockExecutor_Execute_Call) Return ¶ added in v0.3.0
func (_c *MockExecutor_Execute_Call) Return(_a0 *ExecuteResult, _a1 error) *MockExecutor_Execute_Call
func (*MockExecutor_Execute_Call) Run ¶ added in v0.3.0
func (_c *MockExecutor_Execute_Call) Run(run func(call Call)) *MockExecutor_Execute_Call
func (*MockExecutor_Execute_Call) RunAndReturn ¶ added in v0.3.0
func (_c *MockExecutor_Execute_Call) RunAndReturn(run func(Call) (*ExecuteResult, error)) *MockExecutor_Execute_Call
type MockExecutor_Expecter ¶ added in v0.3.0
type MockExecutor_Expecter struct {
// contains filtered or unexported fields
}
func (*MockExecutor_Expecter) Execute ¶ added in v0.3.0
func (_e *MockExecutor_Expecter) Execute(call interface{}) *MockExecutor_Execute_Call
Execute is a helper method to define mock.On call
- call Call
type MockIHttpClient ¶ added in v0.19.0
MockIHttpClient is an autogenerated mock type for the IHttpClient type
func NewMockIHttpClient ¶ added in v0.19.0
func NewMockIHttpClient(t mockConstructorTestingTNewMockIHttpClient) *MockIHttpClient
NewMockIHttpClient creates a new instance of MockIHttpClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockIHttpClient) EXPECT ¶ added in v0.19.0
func (_m *MockIHttpClient) EXPECT() *MockIHttpClient_Expecter
func (*MockIHttpClient) SetNoTLSVerify ¶ added in v0.19.0
func (_m *MockIHttpClient) SetNoTLSVerify()
SetNoTLSVerify provides a mock function with given fields:
func (*MockIHttpClient) SetTimeout ¶ added in v0.19.0
func (_m *MockIHttpClient) SetTimeout(timeout time.Duration)
SetTimeout provides a mock function with given fields: timeout
type MockIHttpClient_Do_Call ¶ added in v0.19.0
MockIHttpClient_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
func (*MockIHttpClient_Do_Call) Return ¶ added in v0.19.0
func (_c *MockIHttpClient_Do_Call) Return(_a0 *http.Response, _a1 error) *MockIHttpClient_Do_Call
func (*MockIHttpClient_Do_Call) Run ¶ added in v0.19.0
func (_c *MockIHttpClient_Do_Call) Run(run func(req *http.Request)) *MockIHttpClient_Do_Call
func (*MockIHttpClient_Do_Call) RunAndReturn ¶ added in v0.19.0
func (_c *MockIHttpClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *MockIHttpClient_Do_Call
type MockIHttpClient_Expecter ¶ added in v0.19.0
type MockIHttpClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockIHttpClient_Expecter) Do ¶ added in v0.19.0
func (_e *MockIHttpClient_Expecter) Do(req interface{}) *MockIHttpClient_Do_Call
Do is a helper method to define mock.On call
- req *http.Request
func (*MockIHttpClient_Expecter) SetNoTLSVerify ¶ added in v0.19.0
func (_e *MockIHttpClient_Expecter) SetNoTLSVerify() *MockIHttpClient_SetNoTLSVerify_Call
SetNoTLSVerify is a helper method to define mock.On call
func (*MockIHttpClient_Expecter) SetTimeout ¶ added in v0.19.0
func (_e *MockIHttpClient_Expecter) SetTimeout(timeout interface{}) *MockIHttpClient_SetTimeout_Call
SetTimeout is a helper method to define mock.On call
- timeout time.Duration
type MockIHttpClient_SetNoTLSVerify_Call ¶ added in v0.19.0
MockIHttpClient_SetNoTLSVerify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNoTLSVerify'
func (*MockIHttpClient_SetNoTLSVerify_Call) Return ¶ added in v0.19.0
func (_c *MockIHttpClient_SetNoTLSVerify_Call) Return() *MockIHttpClient_SetNoTLSVerify_Call
func (*MockIHttpClient_SetNoTLSVerify_Call) Run ¶ added in v0.19.0
func (_c *MockIHttpClient_SetNoTLSVerify_Call) Run(run func()) *MockIHttpClient_SetNoTLSVerify_Call
func (*MockIHttpClient_SetNoTLSVerify_Call) RunAndReturn ¶ added in v0.19.0
func (_c *MockIHttpClient_SetNoTLSVerify_Call) RunAndReturn(run func()) *MockIHttpClient_SetNoTLSVerify_Call
type MockIHttpClient_SetTimeout_Call ¶ added in v0.19.0
MockIHttpClient_SetTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTimeout'
func (*MockIHttpClient_SetTimeout_Call) Return ¶ added in v0.19.0
func (_c *MockIHttpClient_SetTimeout_Call) Return() *MockIHttpClient_SetTimeout_Call
func (*MockIHttpClient_SetTimeout_Call) Run ¶ added in v0.19.0
func (_c *MockIHttpClient_SetTimeout_Call) Run(run func(timeout time.Duration)) *MockIHttpClient_SetTimeout_Call
func (*MockIHttpClient_SetTimeout_Call) RunAndReturn ¶ added in v0.19.0
func (_c *MockIHttpClient_SetTimeout_Call) RunAndReturn(run func(time.Duration)) *MockIHttpClient_SetTimeout_Call
type MockParser ¶ added in v0.3.0
MockParser is an autogenerated mock type for the Parser type
func NewMockParser ¶ added in v0.3.0
func NewMockParser(t mockConstructorTestingTNewMockParser) *MockParser
NewMockParser creates a new instance of MockParser. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockParser) EXPECT ¶ added in v0.3.0
func (_m *MockParser) EXPECT() *MockParser_Expecter
func (*MockParser) Parse ¶ added in v0.3.0
func (_m *MockParser) Parse(path string) (SequenceMap, error)
Parse provides a mock function with given fields: path
func (*MockParser) ParseSingleSequence ¶ added in v0.18.0
func (_m *MockParser) ParseSingleSequence(path string) (Sequence, error)
ParseSingleSequence provides a mock function with given fields: path
type MockParser_Expecter ¶ added in v0.3.0
type MockParser_Expecter struct {
// contains filtered or unexported fields
}
func (*MockParser_Expecter) Parse ¶ added in v0.3.0
func (_e *MockParser_Expecter) Parse(path interface{}) *MockParser_Parse_Call
Parse is a helper method to define mock.On call
- path string
func (*MockParser_Expecter) ParseSingleSequence ¶ added in v0.18.0
func (_e *MockParser_Expecter) ParseSingleSequence(path interface{}) *MockParser_ParseSingleSequence_Call
ParseSingleSequence is a helper method to define mock.On call
- path string
type MockParser_ParseSingleSequence_Call ¶ added in v0.18.0
MockParser_ParseSingleSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSingleSequence'
func (*MockParser_ParseSingleSequence_Call) Return ¶ added in v0.18.0
func (_c *MockParser_ParseSingleSequence_Call) Return(_a0 Sequence, _a1 error) *MockParser_ParseSingleSequence_Call
func (*MockParser_ParseSingleSequence_Call) Run ¶ added in v0.18.0
func (_c *MockParser_ParseSingleSequence_Call) Run(run func(path string)) *MockParser_ParseSingleSequence_Call
func (*MockParser_ParseSingleSequence_Call) RunAndReturn ¶ added in v0.18.0
func (_c *MockParser_ParseSingleSequence_Call) RunAndReturn(run func(string) (Sequence, error)) *MockParser_ParseSingleSequence_Call
type MockParser_Parse_Call ¶ added in v0.3.0
MockParser_Parse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Parse'
func (*MockParser_Parse_Call) Return ¶ added in v0.3.0
func (_c *MockParser_Parse_Call) Return(_a0 SequenceMap, _a1 error) *MockParser_Parse_Call
func (*MockParser_Parse_Call) Run ¶ added in v0.3.0
func (_c *MockParser_Parse_Call) Run(run func(path string)) *MockParser_Parse_Call
func (*MockParser_Parse_Call) RunAndReturn ¶ added in v0.3.0
func (_c *MockParser_Parse_Call) RunAndReturn(run func(string) (SequenceMap, error)) *MockParser_Parse_Call
type RequestType ¶
type RequestType string
ENUM( http grpc )
const ( // RequestTypeHttp is a RequestType of type http. RequestTypeHttp RequestType = "http" // RequestTypeGrpc is a RequestType of type grpc. RequestTypeGrpc RequestType = "grpc" )
func ParseRequestType ¶
func ParseRequestType(name string) (RequestType, error)
ParseRequestType attempts to convert a string to a RequestType.
func (RequestType) IsValid ¶
func (x RequestType) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (RequestType) MarshalText ¶
func (x RequestType) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (RequestType) String ¶
func (x RequestType) String() string
String implements the Stringer interface.
func (*RequestType) UnmarshalText ¶
func (x *RequestType) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type Runner ¶ added in v0.1.0
type Runner struct {
// contains filtered or unexported fields
}
func NewRunner ¶ added in v0.1.0
func NewRunner(opts RunnerOpts) *Runner