Documentation ¶
Overview ¶
Package internal keeps reusable internal code.
Index ¶
- type OperationContext
- func (o *OperationContext) AddReqStructure(s interface{}, options ...openapi.ContentOption)
- func (o *OperationContext) AddRespStructure(s interface{}, options ...openapi.ContentOption)
- func (o *OperationContext) IsProcessingResponse() bool
- func (o *OperationContext) Method() string
- func (o *OperationContext) PathPattern() string
- func (o *OperationContext) ProcessingIn() openapi.In
- func (o *OperationContext) Request() []openapi.ContentUnit
- func (o *OperationContext) Response() []openapi.ContentUnit
- func (o *OperationContext) SetIsProcessingResponse(is bool)
- func (o *OperationContext) SetMethod(method string)
- func (o *OperationContext) SetPathPattern(pattern string)
- func (o *OperationContext) SetProcessingIn(in openapi.In)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationContext ¶
type OperationContext struct {
// contains filtered or unexported fields
}
OperationContext implements openapi.OperationContext.
func NewOperationContext ¶
func NewOperationContext(method, pathPattern string) *OperationContext
NewOperationContext creates OperationContext.
func (*OperationContext) AddReqStructure ¶
func (o *OperationContext) AddReqStructure(s interface{}, options ...openapi.ContentOption)
AddReqStructure adds request content schema.
func (*OperationContext) AddRespStructure ¶
func (o *OperationContext) AddRespStructure(s interface{}, options ...openapi.ContentOption)
AddRespStructure adds response content schema.
func (*OperationContext) IsProcessingResponse ¶
func (o *OperationContext) IsProcessingResponse() bool
IsProcessingResponse indicates if response is being processed.
func (*OperationContext) Method ¶
func (o *OperationContext) Method() string
Method returns HTTP method of an operation.
func (*OperationContext) PathPattern ¶
func (o *OperationContext) PathPattern() string
PathPattern returns operation HTTP URL path pattern.
func (*OperationContext) ProcessingIn ¶
func (o *OperationContext) ProcessingIn() openapi.In
ProcessingIn return which content location is being processed now.
func (*OperationContext) Request ¶
func (o *OperationContext) Request() []openapi.ContentUnit
Request returns list of operation request content schemas.
func (*OperationContext) Response ¶
func (o *OperationContext) Response() []openapi.ContentUnit
Response returns list of operation response content schemas.
func (*OperationContext) SetIsProcessingResponse ¶
func (o *OperationContext) SetIsProcessingResponse(is bool)
SetIsProcessingResponse sets current processing state.
func (*OperationContext) SetMethod ¶
func (o *OperationContext) SetMethod(method string)
SetMethod sets HTTP method of an operation.
func (*OperationContext) SetPathPattern ¶
func (o *OperationContext) SetPathPattern(pattern string)
SetPathPattern sets URL path pattern of an operation.
func (*OperationContext) SetProcessingIn ¶
func (o *OperationContext) SetProcessingIn(in openapi.In)
SetProcessingIn sets current content location being processed.