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 CreateEnrollmentRequest201JSONResponse
- type CreateEnrollmentRequest400JSONResponse
- type CreateEnrollmentRequest401JSONResponse
- type CreateEnrollmentRequest403JSONResponse
- type CreateEnrollmentRequest409JSONResponse
- type CreateEnrollmentRequest503JSONResponse
- type CreateEnrollmentRequestRequestObject
- type CreateEnrollmentRequestResponseObject
- type GetRenderedDevice200JSONResponse
- type GetRenderedDevice204Response
- type GetRenderedDevice401JSONResponse
- type GetRenderedDevice404JSONResponse
- type GetRenderedDevice409JSONResponse
- type GetRenderedDeviceRequestObject
- type GetRenderedDeviceResponseObject
- type InvalidParamFormatError
- type MiddlewareFunc
- type ReadEnrollmentRequest200JSONResponse
- type ReadEnrollmentRequest401JSONResponse
- type ReadEnrollmentRequest403JSONResponse
- type ReadEnrollmentRequest404JSONResponse
- type ReadEnrollmentRequest503JSONResponse
- type ReadEnrollmentRequestRequestObject
- type ReadEnrollmentRequestResponseObject
- type ReplaceDeviceStatus200JSONResponse
- type ReplaceDeviceStatus400JSONResponse
- type ReplaceDeviceStatus401JSONResponse
- type ReplaceDeviceStatus404JSONResponse
- type ReplaceDeviceStatusRequestObject
- type ReplaceDeviceStatusResponseObject
- 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 Service
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- 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 CreateEnrollmentRequest201JSONResponse ¶
type CreateEnrollmentRequest201JSONResponse externalRef0.EnrollmentRequest
func (CreateEnrollmentRequest201JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest201JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest400JSONResponse ¶
type CreateEnrollmentRequest400JSONResponse externalRef0.Status
func (CreateEnrollmentRequest400JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest400JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest401JSONResponse ¶
type CreateEnrollmentRequest401JSONResponse externalRef0.Status
func (CreateEnrollmentRequest401JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest401JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest403JSONResponse ¶ added in v0.4.0
type CreateEnrollmentRequest403JSONResponse externalRef0.Status
func (CreateEnrollmentRequest403JSONResponse) VisitCreateEnrollmentRequestResponse ¶ added in v0.4.0
func (response CreateEnrollmentRequest403JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest409JSONResponse ¶
type CreateEnrollmentRequest409JSONResponse externalRef0.Status
func (CreateEnrollmentRequest409JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest409JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest503JSONResponse ¶ added in v0.4.0
type CreateEnrollmentRequest503JSONResponse externalRef0.Status
func (CreateEnrollmentRequest503JSONResponse) VisitCreateEnrollmentRequestResponse ¶ added in v0.4.0
func (response CreateEnrollmentRequest503JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequestRequestObject ¶
type CreateEnrollmentRequestRequestObject struct {
Body *CreateEnrollmentRequestJSONRequestBody
}
type CreateEnrollmentRequestResponseObject ¶
type CreateEnrollmentRequestResponseObject interface {
VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
}
type GetRenderedDevice200JSONResponse ¶ added in v0.5.0
type GetRenderedDevice200JSONResponse externalRef0.Device
func (GetRenderedDevice200JSONResponse) VisitGetRenderedDeviceResponse ¶ added in v0.5.0
func (response GetRenderedDevice200JSONResponse) VisitGetRenderedDeviceResponse(w http.ResponseWriter) error
type GetRenderedDevice204Response ¶ added in v0.5.0
type GetRenderedDevice204Response struct {
}
func (GetRenderedDevice204Response) VisitGetRenderedDeviceResponse ¶ added in v0.5.0
func (response GetRenderedDevice204Response) VisitGetRenderedDeviceResponse(w http.ResponseWriter) error
type GetRenderedDevice401JSONResponse ¶ added in v0.5.0
type GetRenderedDevice401JSONResponse externalRef0.Status
func (GetRenderedDevice401JSONResponse) VisitGetRenderedDeviceResponse ¶ added in v0.5.0
func (response GetRenderedDevice401JSONResponse) VisitGetRenderedDeviceResponse(w http.ResponseWriter) error
type GetRenderedDevice404JSONResponse ¶ added in v0.5.0
type GetRenderedDevice404JSONResponse externalRef0.Status
func (GetRenderedDevice404JSONResponse) VisitGetRenderedDeviceResponse ¶ added in v0.5.0
func (response GetRenderedDevice404JSONResponse) VisitGetRenderedDeviceResponse(w http.ResponseWriter) error
type GetRenderedDevice409JSONResponse ¶ added in v0.5.0
type GetRenderedDevice409JSONResponse externalRef0.Status
func (GetRenderedDevice409JSONResponse) VisitGetRenderedDeviceResponse ¶ added in v0.5.0
func (response GetRenderedDevice409JSONResponse) VisitGetRenderedDeviceResponse(w http.ResponseWriter) error
type GetRenderedDeviceRequestObject ¶ added in v0.5.0
type GetRenderedDeviceRequestObject struct {
Name string `json:"name"`
Params GetRenderedDeviceParams
}
type GetRenderedDeviceResponseObject ¶ added in v0.5.0
type GetRenderedDeviceResponseObject interface {
VisitGetRenderedDeviceResponse(w http.ResponseWriter) error
}
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ReadEnrollmentRequest200JSONResponse ¶
type ReadEnrollmentRequest200JSONResponse externalRef0.EnrollmentRequest
func (ReadEnrollmentRequest200JSONResponse) VisitReadEnrollmentRequestResponse ¶
func (response ReadEnrollmentRequest200JSONResponse) VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
type ReadEnrollmentRequest401JSONResponse ¶
type ReadEnrollmentRequest401JSONResponse externalRef0.Status
func (ReadEnrollmentRequest401JSONResponse) VisitReadEnrollmentRequestResponse ¶
func (response ReadEnrollmentRequest401JSONResponse) VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
type ReadEnrollmentRequest403JSONResponse ¶ added in v0.4.0
type ReadEnrollmentRequest403JSONResponse externalRef0.Status
func (ReadEnrollmentRequest403JSONResponse) VisitReadEnrollmentRequestResponse ¶ added in v0.4.0
func (response ReadEnrollmentRequest403JSONResponse) VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
type ReadEnrollmentRequest404JSONResponse ¶
type ReadEnrollmentRequest404JSONResponse externalRef0.Status
func (ReadEnrollmentRequest404JSONResponse) VisitReadEnrollmentRequestResponse ¶
func (response ReadEnrollmentRequest404JSONResponse) VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
type ReadEnrollmentRequest503JSONResponse ¶ added in v0.4.0
type ReadEnrollmentRequest503JSONResponse externalRef0.Status
func (ReadEnrollmentRequest503JSONResponse) VisitReadEnrollmentRequestResponse ¶ added in v0.4.0
func (response ReadEnrollmentRequest503JSONResponse) VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
type ReadEnrollmentRequestRequestObject ¶
type ReadEnrollmentRequestRequestObject struct {
Name string `json:"name"`
}
type ReadEnrollmentRequestResponseObject ¶
type ReadEnrollmentRequestResponseObject interface {
VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
}
type ReplaceDeviceStatus200JSONResponse ¶
type ReplaceDeviceStatus200JSONResponse externalRef0.Device
func (ReplaceDeviceStatus200JSONResponse) VisitReplaceDeviceStatusResponse ¶
func (response ReplaceDeviceStatus200JSONResponse) VisitReplaceDeviceStatusResponse(w http.ResponseWriter) error
type ReplaceDeviceStatus400JSONResponse ¶
type ReplaceDeviceStatus400JSONResponse externalRef0.Status
func (ReplaceDeviceStatus400JSONResponse) VisitReplaceDeviceStatusResponse ¶
func (response ReplaceDeviceStatus400JSONResponse) VisitReplaceDeviceStatusResponse(w http.ResponseWriter) error
type ReplaceDeviceStatus401JSONResponse ¶
type ReplaceDeviceStatus401JSONResponse externalRef0.Status
func (ReplaceDeviceStatus401JSONResponse) VisitReplaceDeviceStatusResponse ¶
func (response ReplaceDeviceStatus401JSONResponse) VisitReplaceDeviceStatusResponse(w http.ResponseWriter) error
type ReplaceDeviceStatus404JSONResponse ¶
type ReplaceDeviceStatus404JSONResponse externalRef0.Status
func (ReplaceDeviceStatus404JSONResponse) VisitReplaceDeviceStatusResponse ¶
func (response ReplaceDeviceStatus404JSONResponse) VisitReplaceDeviceStatusResponse(w http.ResponseWriter) error
type ReplaceDeviceStatusRequestObject ¶
type ReplaceDeviceStatusRequestObject struct {
Name string `json:"name"`
Body *ReplaceDeviceStatusJSONRequestBody
}
type ReplaceDeviceStatusResponseObject ¶
type ReplaceDeviceStatusResponseObject interface {
VisitReplaceDeviceStatusResponse(w http.ResponseWriter) 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.
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) 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 Service ¶
type Service interface {
StrictServerInterface
}
Service is a wrapper around the generated server interface.
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 = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// (GET /api/v1/devices/{name}/rendered)
GetRenderedDevice(ctx context.Context, request GetRenderedDeviceRequestObject) (GetRenderedDeviceResponseObject, error)
// (PUT /api/v1/devices/{name}/status)
ReplaceDeviceStatus(ctx context.Context, request ReplaceDeviceStatusRequestObject) (ReplaceDeviceStatusResponseObject, error)
// (POST /api/v1/enrollmentrequests)
CreateEnrollmentRequest(ctx context.Context, request CreateEnrollmentRequestRequestObject) (CreateEnrollmentRequestResponseObject, error)
// (GET /api/v1/enrollmentrequests/{name})
ReadEnrollmentRequest(ctx context.Context, request ReadEnrollmentRequestRequestObject) (ReadEnrollmentRequestResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
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