Documentation
¶
Index ¶
- func GenerateOperationID(method string, path string) string
- type Operation
- func (o *Operation) Clone() (*Operation, error)
- func (operation *Operation) GenerateID() *Operation
- func (operation *Operation) GetID() string
- func (operation *Operation) GetOpenAPIDocPath() *string
- func (operation *Operation) GetPath() string
- func (operation *Operation) GetSecurityScheme() *auth.SecurityScheme
- func (operation *Operation) GetSecuritySchemes() []*auth.SecurityScheme
- func (operation *Operation) HTTPClient() *http.Client
- func (operation *Operation) IsReachable() error
- func (operation *Operation) NewHTTPRequest(ctx context.Context, mutators ...probe.RequestMutator) (*http.Request, error)
- func (operation *Operation) SetID(id string) *Operation
- func (operation *Operation) SetSecuritySchemes(securitySchemes []*auth.SecurityScheme) *Operation
- func (operation *Operation) WithCookies(cookies []*http.Cookie) *Operation
- func (operation *Operation) WithHeader(header http.Header) *Operation
- func (operation *Operation) WithOpenapiOperation(docPath string, openapiOperation *openapi3.Operation) *Operation
- type Operations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOperationID ¶
Types ¶
type Operation ¶
type Operation struct {
*request.Client `json:"-" yaml:"-"`
OpenAPIDocPath *string `json:"-" yaml:"-"`
ID string `json:"id" yaml:"id"`
Method string `json:"method" yaml:"method"`
URL url.URL `json:"url" yaml:"url"`
Body []byte `json:"body,omitempty" yaml:"body,omitempty"`
Cookies []*http.Cookie `json:"cookies,omitempty" yaml:"cookies,omitempty"`
Header http.Header `json:"header,omitempty" yaml:"header,omitempty"`
SecuritySchemes []*auth.SecurityScheme `json:"securitySchemes" yaml:"securitySchemes"`
}
func MustNewOperation ¶
func NewOperation ¶
func NewOperationFromHTTPRequest ¶ added in v0.10.0
NewOperationFromHTTPRequest builds an Operation from a plain *http.Request (e.g. one built via probe.NewRequest), reading its body into memory so the Operation can be replayed via NewHTTPRequest.
func (*Operation) GenerateID ¶
func (*Operation) GetOpenAPIDocPath ¶
func (*Operation) GetSecurityScheme ¶
func (operation *Operation) GetSecurityScheme() *auth.SecurityScheme
func (*Operation) GetSecuritySchemes ¶
func (operation *Operation) GetSecuritySchemes() []*auth.SecurityScheme
func (*Operation) HTTPClient ¶ added in v0.10.0
HTTPClient returns the *http.Client this operation's requests should be sent through.
func (*Operation) IsReachable ¶
func (*Operation) NewHTTPRequest ¶ added in v0.10.0
func (operation *Operation) NewHTTPRequest(ctx context.Context, mutators ...probe.RequestMutator) (*http.Request, error)
NewHTTPRequest builds a plain *http.Request for this operation via probe.NewRequest, applying the operation's own headers/cookies plus any extra mutators (e.g. auth.RequestMutators for a security scheme).
func (*Operation) SetSecuritySchemes ¶
func (operation *Operation) SetSecuritySchemes(securitySchemes []*auth.SecurityScheme) *Operation
func (*Operation) WithCookies ¶
func (*Operation) WithHeader ¶
type Operations ¶
type Operations []*Operation
Click to show internal directories.
Click to hide internal directories.