Documentation
¶
Overview ¶
Package server provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 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
- type ChiServerOptions
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateEnrollmentRequest(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetRenderedDevice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReadEnrollmentRequest(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReplaceDeviceStatus(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type Transport
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CreateEnrollmentRequest(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetRenderedDevice(w http.ResponseWriter, r *http.Request, name string, ...)
- func (_ Unimplemented) ReadEnrollmentRequest(w http.ResponseWriter, r *http.Request, name string)
- func (_ Unimplemented) ReplaceDeviceStatus(w http.ResponseWriter, r *http.Request, name string)
- 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 HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
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 ServerInterface ¶
type ServerInterface interface {
// (GET /api/v1/devices/{name}/rendered)
GetRenderedDevice(w http.ResponseWriter, r *http.Request, name string, params GetRenderedDeviceParams)
// (PUT /api/v1/devices/{name}/status)
ReplaceDeviceStatus(w http.ResponseWriter, r *http.Request, name string)
// (POST /api/v1/enrollmentrequests)
CreateEnrollmentRequest(w http.ResponseWriter, r *http.Request)
// (GET /api/v1/enrollmentrequests/{name})
ReadEnrollmentRequest(w http.ResponseWriter, r *http.Request, name 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) CreateEnrollmentRequest ¶
func (siw *ServerInterfaceWrapper) CreateEnrollmentRequest(w http.ResponseWriter, r *http.Request)
CreateEnrollmentRequest operation middleware
func (*ServerInterfaceWrapper) GetRenderedDevice ¶ added in v0.5.0
func (siw *ServerInterfaceWrapper) GetRenderedDevice(w http.ResponseWriter, r *http.Request)
GetRenderedDevice operation middleware
func (*ServerInterfaceWrapper) ReadEnrollmentRequest ¶
func (siw *ServerInterfaceWrapper) ReadEnrollmentRequest(w http.ResponseWriter, r *http.Request)
ReadEnrollmentRequest operation middleware
func (*ServerInterfaceWrapper) ReplaceDeviceStatus ¶
func (siw *ServerInterfaceWrapper) ReplaceDeviceStatus(w http.ResponseWriter, r *http.Request)
ReplaceDeviceStatus operation middleware
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type Transport ¶ added in v0.6.0
type Transport interface {
ServerInterface
}
Transport is a wrapper around the generated server interface.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) CreateEnrollmentRequest ¶
func (_ Unimplemented) CreateEnrollmentRequest(w http.ResponseWriter, r *http.Request)
(POST /api/v1/enrollmentrequests)
func (Unimplemented) GetRenderedDevice ¶ added in v0.5.0
func (_ Unimplemented) GetRenderedDevice(w http.ResponseWriter, r *http.Request, name string, params GetRenderedDeviceParams)
(GET /api/v1/devices/{name}/rendered)
func (Unimplemented) ReadEnrollmentRequest ¶
func (_ Unimplemented) ReadEnrollmentRequest(w http.ResponseWriter, r *http.Request, name string)
(GET /api/v1/enrollmentrequests/{name})
func (Unimplemented) ReplaceDeviceStatus ¶
func (_ Unimplemented) ReplaceDeviceStatus(w http.ResponseWriter, r *http.Request, name string)
(PUT /api/v1/devices/{name}/status)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error