Documentation ¶
Index ¶
- func AddMockResponse(req *http.Request, reqHeaders http.Header, respHeaders http.Header, ...) (respBody []byte, err error)
- func CheckChaosForScenarioGroup(groupConfigRepository repository.GroupConfigRepository, ...) []byte
- type ConsumerExecutor
- type ProducerExecutor
- func (px *ProducerExecutor) Execute(ctx context.Context, req *http.Request, scenarioKey *types.APIKeyData, ...) *types.ProducerContractResponse
- func (px *ProducerExecutor) ExecuteByGroup(ctx context.Context, req *http.Request, group string, ...) *types.ProducerContractResponse
- func (px *ProducerExecutor) ExecuteByHistory(ctx context.Context, req *http.Request, group string, ...) *types.ProducerContractResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMockResponse ¶
func AddMockResponse( req *http.Request, reqHeaders http.Header, respHeaders http.Header, scenario *types.APIScenario, started time.Time, ended time.Time, config *types.Configuration, scenarioRepository repository.APIScenarioRepository, fixtureRepository repository.APIFixtureRepository, groupConfigRepository repository.GroupConfigRepository, ) (respBody []byte, err error)
AddMockResponse method is shared so it cannot be instance method
func CheckChaosForScenarioGroup ¶
func CheckChaosForScenarioGroup( groupConfigRepository repository.GroupConfigRepository, scenario *types.APIScenario, respHeaders http.Header) []byte
CheckChaosForScenarioGroup helper method
Types ¶
type ConsumerExecutor ¶
type ConsumerExecutor struct {
// contains filtered or unexported fields
}
ConsumerExecutor structure
func NewConsumerExecutor ¶
func NewConsumerExecutor( config *types.Configuration, scenarioRepository repository.APIScenarioRepository, fixtureRepository repository.APIFixtureRepository, groupConfigRepository repository.GroupConfigRepository, ) *ConsumerExecutor
NewConsumerExecutor instantiates controller for updating api-scenarios
func (*ConsumerExecutor) Execute ¶
func (cx *ConsumerExecutor) Execute(c web.APIContext) (err error)
Execute request and replays stubbed response
type ProducerExecutor ¶
type ProducerExecutor struct {
// contains filtered or unexported fields
}
ProducerExecutor structure
func NewProducerExecutor ¶
func NewProducerExecutor( scenarioRepository repository.APIScenarioRepository, groupConfigRepository repository.GroupConfigRepository, client web.HTTPClient) *ProducerExecutor
NewProducerExecutor executes contracts for producers
func (*ProducerExecutor) Execute ¶
func (px *ProducerExecutor) Execute( ctx context.Context, req *http.Request, scenarioKey *types.APIKeyData, dataTemplate fuzz.DataTemplateRequest, contractReq *types.ProducerContractRequest, ) *types.ProducerContractResponse
Execute an API with fuzz data request
func (*ProducerExecutor) ExecuteByGroup ¶
func (px *ProducerExecutor) ExecuteByGroup( ctx context.Context, req *http.Request, group string, dataTemplate fuzz.DataTemplateRequest, contractReq *types.ProducerContractRequest, ) *types.ProducerContractResponse
ExecuteByGroup executes an API with fuzz data request
func (*ProducerExecutor) ExecuteByHistory ¶
func (px *ProducerExecutor) ExecuteByHistory( ctx context.Context, req *http.Request, group string, dataTemplate fuzz.DataTemplateRequest, contractReq *types.ProducerContractRequest, ) *types.ProducerContractResponse
ExecuteByHistory executes execution history for an API with fuzz data request
Click to show internal directories.
Click to hide internal directories.