oapi_chi_server

package
v0.0.0-...-996d052 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package oapi_chi_server provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

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 PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type CreateUpdatePropertyInfoById200JSONResponse

type CreateUpdatePropertyInfoById200JSONResponse PropertyInfoResponse

func (CreateUpdatePropertyInfoById200JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse

func (response CreateUpdatePropertyInfoById200JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error

type CreateUpdatePropertyInfoById400JSONResponse

type CreateUpdatePropertyInfoById400JSONResponse GenericErrorResponse

func (CreateUpdatePropertyInfoById400JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse

func (response CreateUpdatePropertyInfoById400JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error

type CreateUpdatePropertyInfoById404Response

type CreateUpdatePropertyInfoById404Response struct {
}

func (CreateUpdatePropertyInfoById404Response) VisitCreateUpdatePropertyInfoByIdResponse

func (response CreateUpdatePropertyInfoById404Response) VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error

type CreateUpdatePropertyInfoById500JSONResponse

type CreateUpdatePropertyInfoById500JSONResponse GenericErrorResponse

func (CreateUpdatePropertyInfoById500JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse

func (response CreateUpdatePropertyInfoById500JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error

type CreateUpdatePropertyInfoById501JSONResponse

type CreateUpdatePropertyInfoById501JSONResponse GenericErrorResponse

func (CreateUpdatePropertyInfoById501JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse

func (response CreateUpdatePropertyInfoById501JSONResponse) VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error

type CreateUpdatePropertyInfoByIdRequestObject

type CreateUpdatePropertyInfoByIdRequestObject struct {
	PropertyId string `json:"propertyId"`
	Body       *CreateUpdatePropertyInfoByIdJSONRequestBody
}

type CreateUpdatePropertyInfoByIdResponseObject

type CreateUpdatePropertyInfoByIdResponseObject interface {
	VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error
}

type CreateUpdatePropertyInfoByIddefaultResponse

type CreateUpdatePropertyInfoByIddefaultResponse struct {
	StatusCode int
}

func (CreateUpdatePropertyInfoByIddefaultResponse) VisitCreateUpdatePropertyInfoByIdResponse

func (response CreateUpdatePropertyInfoByIddefaultResponse) VisitCreateUpdatePropertyInfoByIdResponse(w http.ResponseWriter) error

type GetPropertiesInfo200JSONResponse

type GetPropertiesInfo200JSONResponse PropertiesInfoResponse

func (GetPropertiesInfo200JSONResponse) VisitGetPropertiesInfoResponse

func (response GetPropertiesInfo200JSONResponse) VisitGetPropertiesInfoResponse(w http.ResponseWriter) error

type GetPropertiesInfo400JSONResponse

type GetPropertiesInfo400JSONResponse GenericErrorResponse

func (GetPropertiesInfo400JSONResponse) VisitGetPropertiesInfoResponse

func (response GetPropertiesInfo400JSONResponse) VisitGetPropertiesInfoResponse(w http.ResponseWriter) error

type GetPropertiesInfo404Response

type GetPropertiesInfo404Response struct {
}

func (GetPropertiesInfo404Response) VisitGetPropertiesInfoResponse

func (response GetPropertiesInfo404Response) VisitGetPropertiesInfoResponse(w http.ResponseWriter) error

type GetPropertiesInfo500JSONResponse

type GetPropertiesInfo500JSONResponse GenericErrorResponse

func (GetPropertiesInfo500JSONResponse) VisitGetPropertiesInfoResponse

func (response GetPropertiesInfo500JSONResponse) VisitGetPropertiesInfoResponse(w http.ResponseWriter) error

type GetPropertiesInfo501JSONResponse

type GetPropertiesInfo501JSONResponse GenericErrorResponse

func (GetPropertiesInfo501JSONResponse) VisitGetPropertiesInfoResponse

func (response GetPropertiesInfo501JSONResponse) VisitGetPropertiesInfoResponse(w http.ResponseWriter) error

type GetPropertiesInfoRequestObject

type GetPropertiesInfoRequestObject struct {
}

type GetPropertiesInfoResponseObject

type GetPropertiesInfoResponseObject interface {
	VisitGetPropertiesInfoResponse(w http.ResponseWriter) error
}

type GetPropertiesInfodefaultResponse

type GetPropertiesInfodefaultResponse struct {
	StatusCode int
}

func (GetPropertiesInfodefaultResponse) VisitGetPropertiesInfoResponse

func (response GetPropertiesInfodefaultResponse) VisitGetPropertiesInfoResponse(w http.ResponseWriter) error

type GetPropertyInfoById200JSONResponse

type GetPropertyInfoById200JSONResponse PropertyInfoResponse

func (GetPropertyInfoById200JSONResponse) VisitGetPropertyInfoByIdResponse

func (response GetPropertyInfoById200JSONResponse) VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error

type GetPropertyInfoById400JSONResponse

type GetPropertyInfoById400JSONResponse GenericErrorResponse

func (GetPropertyInfoById400JSONResponse) VisitGetPropertyInfoByIdResponse

func (response GetPropertyInfoById400JSONResponse) VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error

type GetPropertyInfoById404Response

type GetPropertyInfoById404Response struct {
}

func (GetPropertyInfoById404Response) VisitGetPropertyInfoByIdResponse

func (response GetPropertyInfoById404Response) VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error

type GetPropertyInfoById500JSONResponse

type GetPropertyInfoById500JSONResponse GenericErrorResponse

func (GetPropertyInfoById500JSONResponse) VisitGetPropertyInfoByIdResponse

func (response GetPropertyInfoById500JSONResponse) VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error

type GetPropertyInfoById501JSONResponse

type GetPropertyInfoById501JSONResponse GenericErrorResponse

func (GetPropertyInfoById501JSONResponse) VisitGetPropertyInfoByIdResponse

func (response GetPropertyInfoById501JSONResponse) VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error

type GetPropertyInfoByIdRequestObject

type GetPropertyInfoByIdRequestObject struct {
	PropertyId string `json:"propertyId"`
}

type GetPropertyInfoByIdResponseObject

type GetPropertyInfoByIdResponseObject interface {
	VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error
}

type GetPropertyInfoByIddefaultResponse

type GetPropertyInfoByIddefaultResponse struct {
	StatusCode int
}

func (GetPropertyInfoByIddefaultResponse) VisitGetPropertyInfoByIdResponse

func (response GetPropertyInfoByIddefaultResponse) VisitGetPropertyInfoByIdResponse(w http.ResponseWriter) error

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

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 ServerInterface

type ServerInterface interface {
	// Retrieves properties information
	// (GET /property)
	GetPropertiesInfo(w http.ResponseWriter, r *http.Request)
	// Retrieves property information by ID
	// (GET /property/{propertyId})
	GetPropertyInfoById(w http.ResponseWriter, r *http.Request, propertyId string)
	// Set/Update property information by ID
	// (POST /property/{propertyId})
	CreateUpdatePropertyInfoById(w http.ResponseWriter, r *http.Request, propertyId string)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

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) CreateUpdatePropertyInfoById

func (siw *ServerInterfaceWrapper) CreateUpdatePropertyInfoById(w http.ResponseWriter, r *http.Request)

CreateUpdatePropertyInfoById operation middleware

func (*ServerInterfaceWrapper) GetPropertiesInfo

func (siw *ServerInterfaceWrapper) GetPropertiesInfo(w http.ResponseWriter, r *http.Request)

GetPropertiesInfo operation middleware

func (*ServerInterfaceWrapper) GetPropertyInfoById

func (siw *ServerInterfaceWrapper) GetPropertyInfoById(w http.ResponseWriter, r *http.Request)

GetPropertyInfoById operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, args interface{}) (interface{}, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Retrieves properties information
	// (GET /property)
	GetPropertiesInfo(ctx context.Context, request GetPropertiesInfoRequestObject) (GetPropertiesInfoResponseObject, error)
	// Retrieves property information by ID
	// (GET /property/{propertyId})
	GetPropertyInfoById(ctx context.Context, request GetPropertyInfoByIdRequestObject) (GetPropertyInfoByIdResponseObject, error)
	// Set/Update property information by ID
	// (POST /property/{propertyId})
	CreateUpdatePropertyInfoById(ctx context.Context, request CreateUpdatePropertyInfoByIdRequestObject) (CreateUpdatePropertyInfoByIdResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshallingParamError

type UnmarshallingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshallingParamError) Error

func (e *UnmarshallingParamError) Error() string

func (*UnmarshallingParamError) Unwrap

func (e *UnmarshallingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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