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 CreateEnrollmentRequest208JSONResponse
- type CreateEnrollmentRequest400JSONResponse
- type CreateEnrollmentRequest401JSONResponse
- type CreateEnrollmentRequest409JSONResponse
- type CreateEnrollmentRequestRequestObject
- type CreateEnrollmentRequestResponseObject
- type GetRenderedDeviceSpec200JSONResponse
- type GetRenderedDeviceSpec204Response
- type GetRenderedDeviceSpec401JSONResponse
- type GetRenderedDeviceSpec404JSONResponse
- type GetRenderedDeviceSpec409JSONResponse
- type GetRenderedDeviceSpecRequestObject
- type GetRenderedDeviceSpecResponseObject
- type InvalidParamFormatError
- type MiddlewareFunc
- type ReadEnrollmentRequest200JSONResponse
- type ReadEnrollmentRequest401JSONResponse
- type ReadEnrollmentRequest404JSONResponse
- 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) GetRenderedDeviceSpec(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) GetRenderedDeviceSpec(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 CreateEnrollmentRequest208JSONResponse ¶
type CreateEnrollmentRequest208JSONResponse externalRef0.EnrollmentRequest
func (CreateEnrollmentRequest208JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest208JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest400JSONResponse ¶
type CreateEnrollmentRequest400JSONResponse externalRef0.Error
func (CreateEnrollmentRequest400JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest400JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest401JSONResponse ¶
type CreateEnrollmentRequest401JSONResponse externalRef0.Error
func (CreateEnrollmentRequest401JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest401JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequest409JSONResponse ¶
type CreateEnrollmentRequest409JSONResponse externalRef0.Error
func (CreateEnrollmentRequest409JSONResponse) VisitCreateEnrollmentRequestResponse ¶
func (response CreateEnrollmentRequest409JSONResponse) VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
type CreateEnrollmentRequestRequestObject ¶
type CreateEnrollmentRequestRequestObject struct {
Body *CreateEnrollmentRequestJSONRequestBody
}
type CreateEnrollmentRequestResponseObject ¶
type CreateEnrollmentRequestResponseObject interface {
VisitCreateEnrollmentRequestResponse(w http.ResponseWriter) error
}
type GetRenderedDeviceSpec200JSONResponse ¶
type GetRenderedDeviceSpec200JSONResponse externalRef0.RenderedDeviceSpec
func (GetRenderedDeviceSpec200JSONResponse) VisitGetRenderedDeviceSpecResponse ¶
func (response GetRenderedDeviceSpec200JSONResponse) VisitGetRenderedDeviceSpecResponse(w http.ResponseWriter) error
type GetRenderedDeviceSpec204Response ¶
type GetRenderedDeviceSpec204Response struct {
}
func (GetRenderedDeviceSpec204Response) VisitGetRenderedDeviceSpecResponse ¶
func (response GetRenderedDeviceSpec204Response) VisitGetRenderedDeviceSpecResponse(w http.ResponseWriter) error
type GetRenderedDeviceSpec401JSONResponse ¶
type GetRenderedDeviceSpec401JSONResponse externalRef0.Error
func (GetRenderedDeviceSpec401JSONResponse) VisitGetRenderedDeviceSpecResponse ¶
func (response GetRenderedDeviceSpec401JSONResponse) VisitGetRenderedDeviceSpecResponse(w http.ResponseWriter) error
type GetRenderedDeviceSpec404JSONResponse ¶
type GetRenderedDeviceSpec404JSONResponse externalRef0.Error
func (GetRenderedDeviceSpec404JSONResponse) VisitGetRenderedDeviceSpecResponse ¶
func (response GetRenderedDeviceSpec404JSONResponse) VisitGetRenderedDeviceSpecResponse(w http.ResponseWriter) error
type GetRenderedDeviceSpec409JSONResponse ¶
type GetRenderedDeviceSpec409JSONResponse externalRef0.Error
func (GetRenderedDeviceSpec409JSONResponse) VisitGetRenderedDeviceSpecResponse ¶
func (response GetRenderedDeviceSpec409JSONResponse) VisitGetRenderedDeviceSpecResponse(w http.ResponseWriter) error
type GetRenderedDeviceSpecRequestObject ¶
type GetRenderedDeviceSpecRequestObject struct {
Name string `json:"name"`
Params GetRenderedDeviceSpecParams
}
type GetRenderedDeviceSpecResponseObject ¶
type GetRenderedDeviceSpecResponseObject interface {
VisitGetRenderedDeviceSpecResponse(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.Error
func (ReadEnrollmentRequest401JSONResponse) VisitReadEnrollmentRequestResponse ¶
func (response ReadEnrollmentRequest401JSONResponse) VisitReadEnrollmentRequestResponse(w http.ResponseWriter) error
type ReadEnrollmentRequest404JSONResponse ¶
type ReadEnrollmentRequest404JSONResponse externalRef0.Error
func (ReadEnrollmentRequest404JSONResponse) VisitReadEnrollmentRequestResponse ¶
func (response ReadEnrollmentRequest404JSONResponse) 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.Error
func (ReplaceDeviceStatus400JSONResponse) VisitReplaceDeviceStatusResponse ¶
func (response ReplaceDeviceStatus400JSONResponse) VisitReplaceDeviceStatusResponse(w http.ResponseWriter) error
type ReplaceDeviceStatus401JSONResponse ¶
type ReplaceDeviceStatus401JSONResponse externalRef0.Error
func (ReplaceDeviceStatus401JSONResponse) VisitReplaceDeviceStatusResponse ¶
func (response ReplaceDeviceStatus401JSONResponse) VisitReplaceDeviceStatusResponse(w http.ResponseWriter) error
type ReplaceDeviceStatus404JSONResponse ¶
type ReplaceDeviceStatus404JSONResponse externalRef0.Error
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)
GetRenderedDeviceSpec(w http.ResponseWriter, r *http.Request, name string, params GetRenderedDeviceSpecParams)
// (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) GetRenderedDeviceSpec ¶
func (siw *ServerInterfaceWrapper) GetRenderedDeviceSpec(w http.ResponseWriter, r *http.Request)
GetRenderedDeviceSpec 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)
GetRenderedDeviceSpec(ctx context.Context, request GetRenderedDeviceSpecRequestObject) (GetRenderedDeviceSpecResponseObject, 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) GetRenderedDeviceSpec ¶
func (_ Unimplemented) GetRenderedDeviceSpec(w http.ResponseWriter, r *http.Request, name string, params GetRenderedDeviceSpecParams)
(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