operation

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateOperationID

func GenerateOperationID(method string, path string) string

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 MustNewOperation(method string, operationUrl string, body *bytes.Buffer, client *request.Client) *Operation

func NewOperation

func NewOperation(method string, operationUrl string, body io.Reader, client *request.Client) (*Operation, error)

func NewOperationFromRequest

func NewOperationFromRequest(r *request.Request) (*Operation, error)

func (*Operation) Clone

func (o *Operation) Clone() (*Operation, error)

func (*Operation) GenerateID

func (operation *Operation) GenerateID() *Operation

func (*Operation) GetID

func (operation *Operation) GetID() string

func (*Operation) GetOpenAPIDocPath

func (operation *Operation) GetOpenAPIDocPath() *string

func (*Operation) GetPath

func (operation *Operation) GetPath() string

func (*Operation) GetSecurityScheme

func (operation *Operation) GetSecurityScheme() *auth.SecurityScheme

func (*Operation) GetSecuritySchemes

func (operation *Operation) GetSecuritySchemes() []*auth.SecurityScheme

func (*Operation) IsReachable

func (operation *Operation) IsReachable() error

func (*Operation) NewRequest

func (operation *Operation) NewRequest() (*request.Request, error)

func (*Operation) SetID

func (operation *Operation) SetID(id string) *Operation

func (*Operation) SetSecuritySchemes

func (operation *Operation) SetSecuritySchemes(securitySchemes []*auth.SecurityScheme) *Operation

func (*Operation) WithCookies

func (operation *Operation) WithCookies(cookies []*http.Cookie) *Operation

func (*Operation) WithHeader

func (operation *Operation) WithHeader(header http.Header) *Operation

func (*Operation) WithOpenapiOperation

func (operation *Operation) WithOpenapiOperation(docPath string, openapiOperation *openapi3.Operation) *Operation

type Operations

type Operations []*Operation

func (Operations) GetByID

func (o Operations) GetByID(id string) *Operation

func (Operations) Len

func (o Operations) Len() int

func (Operations) Less

func (o Operations) Less(i, j int) bool

func (Operations) Swap

func (o Operations) Swap(i, j int)

Jump to

Keyboard shortcuts

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