Documentation ¶
Overview ¶
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.1 DO NOT EDIT.
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.1 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewHandler(application *app.Application, logger service.Logger, ...) http.Handler
- type Assert
- type Assertion
- type AssertionMethod
- type ChiServerOptions
- type CreateTestCampaignJSONBody
- type CreateTestCampaignJSONRequestBody
- type CreateTestCampaignRequest
- type Error
- type ErrorSlug
- type Flow
- type GeneralPipelineResponse
- type Http
- type HttpMethod
- type HttpRequest
- type HttpResponse
- type InvalidParamFormatError
- type MiddlewareFunc
- type PipelineState
- type RequiredHeaderError
- type RequiredParamError
- type Scenario
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CancelPipeline(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTestCampaign(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPipeline(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPipelineHistory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSpecification(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTestCampaign(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTestCampaigns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) LoadSpecification(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RemoveTestCampaign(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RestartPipeline(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) StartPipeline(w http.ResponseWriter, r *http.Request)
- type SpecificPipelineResponse
- type Specification
- type SpecificationResponse
- type SpecificationSlug
- type SpecificationSource
- type StartPipelineJSONBody
- type StartPipelineJSONRequestBody
- type StartPipelineRequest
- type Statement
- type Status
- type Story
- type TestCampaignResponse
- type Thesis
- type ThesisStatus
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewHandler ¶
func NewHandler( application *app.Application, logger service.Logger, middlewares ...rest.Middleware, ) http.Handler
Types ¶
type Assertion ¶
type Assertion struct { Assert []Assert `json:"assert"` With AssertionMethod `json:"with"` }
Assertion defines model for Assertion.
type AssertionMethod ¶
type AssertionMethod string
AssertionMethod defines model for AssertionMethod.
const (
AssertionMethodJSONPATH AssertionMethod = "JSONPATH"
)
Defines values for AssertionMethod.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type CreateTestCampaignJSONBody ¶
type CreateTestCampaignJSONBody CreateTestCampaignRequest
CreateTestCampaignJSONBody defines parameters for CreateTestCampaign.
type CreateTestCampaignJSONRequestBody ¶
type CreateTestCampaignJSONRequestBody CreateTestCampaignJSONBody
CreateTestCampaignJSONRequestBody defines body for CreateTestCampaign for application/json ContentType.
type CreateTestCampaignRequest ¶
type CreateTestCampaignRequest struct { Summary *string `json:"summary,omitempty"` ViewName string `json:"viewName"` }
CreateTestCampaignRequest defines model for CreateTestCampaignRequest.
type ErrorSlug ¶
type ErrorSlug string
ErrorSlug defines model for ErrorSlug.
const ( ErrorSlugBadRequest ErrorSlug = "bad-request" ErrorSlugEmptyBearerToken ErrorSlug = "empty-bearer-token" ErrorSlugInvalidJson ErrorSlug = "invalid-json" ErrorSlugInvalidSpecificationSource ErrorSlug = "invalid-specification-source" ErrorSlugPipelineAlreadyStarted ErrorSlug = "pipeline-already-started" ErrorSlugPipelineNotFound ErrorSlug = "pipeline-not-found" ErrorSlugPipelineNotStarted ErrorSlug = "pipeline-not-started" ErrorSlugSpecificationNotFound ErrorSlug = "specification-not-found" ErrorSlugTestCampaignNotFound ErrorSlug = "test-campaign-not-found" ErrorSlugUnableToVerifyJwt ErrorSlug = "unable-to-verify-jwt" ErrorSlugUnexpectedError ErrorSlug = "unexpected-error" ErrorSlugUserCantSeePipeline ErrorSlug = "user-cant-see-pipeline" ErrorSlugUserCantSeeTestCampaign ErrorSlug = "user-cant-see-test-campaign" )
Defines values for ErrorSlug.
type Flow ¶
type Flow struct { OverallState PipelineState `json:"overallState"` Statuses []Status `json:"statuses"` }
Flow defines model for Flow.
type GeneralPipelineResponse ¶
type GeneralPipelineResponse struct { Id string `json:"id"` LastState PipelineState `json:"lastState"` SpecificationId string `json:"specificationId"` StartedAt time.Time `json:"startedAt"` }
GeneralPipelineResponse defines model for GeneralPipelineResponse.
type Http ¶
type Http struct { Request *HttpRequest `json:"request,omitempty"` Response *HttpResponse `json:"response,omitempty"` }
Http defines model for Http.
type HttpMethod ¶
type HttpMethod string
HttpMethod defines model for HttpMethod.
const ( HttpMethodCONNECT HttpMethod = "CONNECT" HttpMethodDELETE HttpMethod = "DELETE" HttpMethodGET HttpMethod = "GET" HttpMethodHEAD HttpMethod = "HEAD" HttpMethodOPTIONS HttpMethod = "OPTIONS" HttpMethodPATCH HttpMethod = "PATCH" HttpMethodPOST HttpMethod = "POST" HttpMethodPUT HttpMethod = "PUT" HttpMethodTRACE HttpMethod = "TRACE" )
Defines values for HttpMethod.
type HttpRequest ¶
type HttpRequest struct { Body *map[string]interface{} `json:"body,omitempty"` ContentType *string `json:"contentType,omitempty"` Method HttpMethod `json:"method"` Url string `json:"url"` }
HttpRequest defines model for HttpRequest.
type HttpResponse ¶
type HttpResponse struct { AllowedCodes []int `json:"allowedCodes"` AllowedContentType *string `json:"allowedContentType,omitempty"` }
HttpResponse defines model for HttpResponse.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type PipelineState ¶
type PipelineState string
PipelineState defines model for PipelineState.
const ( PipelineStateCANCELED PipelineState = "CANCELED" PipelineStateCRASHED PipelineState = "CRASHED" PipelineStateEXECUTING PipelineState = "EXECUTING" PipelineStateFAILED PipelineState = "FAILED" PipelineStateNOSTATE PipelineState = "NO_STATE" PipelineStateNOTEXECUTED PipelineState = "NOT_EXECUTED" PipelineStatePASSED PipelineState = "PASSED" PipelineStateQUEUED PipelineState = "QUEUED" )
Defines values for PipelineState.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type Scenario ¶
type Scenario struct { Description *string `json:"description,omitempty"` Slug string `json:"slug"` Theses []Thesis `json:"theses"` }
Scenario defines model for Scenario.
type ServerInterface ¶
type ServerInterface interface { // Returns pipeline with such ID. // (GET /pipelines/{pipelineId}) GetPipeline(w http.ResponseWriter, r *http.Request, pipelineId string) // Restart pipeline with such ID. // (PUT /pipelines/{pipelineId}) RestartPipeline(w http.ResponseWriter, r *http.Request, pipelineId string) // Cancels pipeline with such ID. // (PUT /pipelines/{pipelineId}/canceled) CancelPipeline(w http.ResponseWriter, r *http.Request, pipelineId string) // Returns specification with such ID. // (GET /specifications/{specificationId}) GetSpecification(w http.ResponseWriter, r *http.Request, specificationId string) // Returns test campaigns. // (GET /test-campaigns) GetTestCampaigns(w http.ResponseWriter, r *http.Request) // Creates test campaign for testing services logic using BDD specification style. // (POST /test-campaigns) CreateTestCampaign(w http.ResponseWriter, r *http.Request) // Removes test campaign with such ID. // (DELETE /test-campaigns/{testCampaignId}) RemoveTestCampaign(w http.ResponseWriter, r *http.Request, testCampaignId string) // Returns test campaign with such ID. // (GET /test-campaigns/{testCampaignId}) GetTestCampaign(w http.ResponseWriter, r *http.Request, testCampaignId string) // Asynchronously starts pipeline of test campaign's active specification. // (POST /test-campaigns/{testCampaignId}/pipeline) StartPipeline(w http.ResponseWriter, r *http.Request, testCampaignId string) // Returns pipeline history. // (GET /test-campaigns/{testCampaignId}/pipelines) GetPipelineHistory(w http.ResponseWriter, r *http.Request, testCampaignId string) // Loads specification to test campaign. // (POST /test-campaigns/{testCampaignId}/specification) LoadSpecification(w http.ResponseWriter, r *http.Request, testCampaignId string) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CancelPipeline ¶
func (siw *ServerInterfaceWrapper) CancelPipeline(w http.ResponseWriter, r *http.Request)
CancelPipeline operation middleware
func (*ServerInterfaceWrapper) CreateTestCampaign ¶
func (siw *ServerInterfaceWrapper) CreateTestCampaign(w http.ResponseWriter, r *http.Request)
CreateTestCampaign operation middleware
func (*ServerInterfaceWrapper) GetPipeline ¶
func (siw *ServerInterfaceWrapper) GetPipeline(w http.ResponseWriter, r *http.Request)
GetPipeline operation middleware
func (*ServerInterfaceWrapper) GetPipelineHistory ¶
func (siw *ServerInterfaceWrapper) GetPipelineHistory(w http.ResponseWriter, r *http.Request)
GetPipelineHistory operation middleware
func (*ServerInterfaceWrapper) GetSpecification ¶
func (siw *ServerInterfaceWrapper) GetSpecification(w http.ResponseWriter, r *http.Request)
GetSpecification operation middleware
func (*ServerInterfaceWrapper) GetTestCampaign ¶
func (siw *ServerInterfaceWrapper) GetTestCampaign(w http.ResponseWriter, r *http.Request)
GetTestCampaign operation middleware
func (*ServerInterfaceWrapper) GetTestCampaigns ¶
func (siw *ServerInterfaceWrapper) GetTestCampaigns(w http.ResponseWriter, r *http.Request)
GetTestCampaigns operation middleware
func (*ServerInterfaceWrapper) LoadSpecification ¶
func (siw *ServerInterfaceWrapper) LoadSpecification(w http.ResponseWriter, r *http.Request)
LoadSpecification operation middleware
func (*ServerInterfaceWrapper) RemoveTestCampaign ¶
func (siw *ServerInterfaceWrapper) RemoveTestCampaign(w http.ResponseWriter, r *http.Request)
RemoveTestCampaign operation middleware
func (*ServerInterfaceWrapper) RestartPipeline ¶
func (siw *ServerInterfaceWrapper) RestartPipeline(w http.ResponseWriter, r *http.Request)
RestartPipeline operation middleware
func (*ServerInterfaceWrapper) StartPipeline ¶
func (siw *ServerInterfaceWrapper) StartPipeline(w http.ResponseWriter, r *http.Request)
StartPipeline operation middleware
type SpecificPipelineResponse ¶
type SpecificPipelineResponse struct { Flows interface{} `json:"flows"` Id string `json:"id"` SpecificationId string `json:"specificationId"` }
SpecificPipelineResponse defines model for SpecificPipelineResponse.
type Specification ¶
type Specification struct { Author *string `json:"author,omitempty"` Description *string `json:"description,omitempty"` Id string `json:"id"` LoadedAt time.Time `json:"loadedAt"` Stories []Story `json:"stories"` TestCampaignId string `json:"testCampaignId"` Title *string `json:"title,omitempty"` }
Specification defines model for Specification.
type SpecificationResponse ¶
type SpecificationResponse struct { SourceUri string `json:"sourceUri"` Specification Specification `json:"specification"` }
SpecificationResponse defines model for SpecificationResponse.
type SpecificationSlug ¶
type SpecificationSlug struct { Scenario *string `json:"scenario,omitempty"` Story *string `json:"story,omitempty"` Thesis *string `json:"thesis,omitempty"` }
SpecificationSlug defines model for SpecificationSlug.
type SpecificationSource ¶
type SpecificationSource string
SpecificationSource defines model for SpecificationSource.
type StartPipelineJSONBody ¶
type StartPipelineJSONBody StartPipelineRequest
StartPipelineJSONBody defines parameters for StartPipeline.
type StartPipelineJSONRequestBody ¶
type StartPipelineJSONRequestBody StartPipelineJSONBody
StartPipelineJSONRequestBody defines body for StartPipeline for application/json ContentType.
type StartPipelineRequest ¶
type StartPipelineRequest struct {
ScenarioSlugs *interface{} `json:"scenarioSlugs,omitempty"`
}
StartPipelineRequest defines model for StartPipelineRequest.
type Status ¶
type Status struct { Slug SpecificationSlug `json:"slug"` State PipelineState `json:"state"` ThesisStatuses interface{} `json:"thesisStatuses"` }
Status defines model for Status.
type Story ¶
type Story struct { AsA *string `json:"asA,omitempty"` Description *string `json:"description,omitempty"` InOrderTo *string `json:"inOrderTo,omitempty"` Scenarios []Scenario `json:"scenarios"` Slug string `json:"slug"` WantTo *string `json:"wantTo,omitempty"` }
Story defines model for Story.
type TestCampaignResponse ¶
type TestCampaignResponse struct { CreatedAt time.Time `json:"createdAt"` Id string `json:"id"` LastPipelineId *string `json:"lastPipelineId,omitempty"` Summary *string `json:"summary,omitempty"` ViewName string `json:"viewName"` }
TestCampaignResponse defines model for TestCampaignResponse.
type Thesis ¶
type Thesis struct { After []string `json:"after"` Assertion *Assertion `json:"assertion,omitempty"` Http *Http `json:"http,omitempty"` Slug string `json:"slug"` Statement Statement `json:"statement"` }
Thesis defines model for Thesis.
type ThesisStatus ¶
type ThesisStatus struct { OccurredErrors interface{} `json:"occurredErrors"` State PipelineState `json:"state"` ThesisSlug string `json:"thesisSlug"` }
ThesisStatus defines model for ThesisStatus.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error