Documentation ¶
Overview ¶
Package ports provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package ports 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
- 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 CreateTrainingJSONRequestBody
- type Error
- type HttpServer
- func (h HttpServer) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
- func (h HttpServer) CancelTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
- func (h HttpServer) CreateTraining(w http.ResponseWriter, r *http.Request)
- func (h HttpServer) GetTrainings(w http.ResponseWriter, r *http.Request)
- func (h HttpServer) RejectRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
- func (h HttpServer) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
- func (h HttpServer) RescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
- type InvalidParamFormatError
- type MiddlewareFunc
- type PostTraining
- type RequestRescheduleTrainingJSONRequestBody
- type RequiredHeaderError
- type RequiredParamError
- type RescheduleTrainingJSONRequestBody
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CancelTraining(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTraining(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTrainings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RejectRescheduleTraining(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RescheduleTraining(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type Training
- type Trainings
- type UnescapedCookieParamError
- type UnmarshallingParamError
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
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 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
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type CreateTrainingJSONRequestBody ¶
type CreateTrainingJSONRequestBody = PostTraining
CreateTrainingJSONRequestBody defines body for CreateTraining for application/json ContentType.
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(app app.Application) HttpServer
func (HttpServer) ApproveRescheduleTraining ¶
func (h HttpServer) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
func (HttpServer) CancelTraining ¶
func (h HttpServer) CancelTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
func (HttpServer) CreateTraining ¶
func (h HttpServer) CreateTraining(w http.ResponseWriter, r *http.Request)
func (HttpServer) GetTrainings ¶
func (h HttpServer) GetTrainings(w http.ResponseWriter, r *http.Request)
func (HttpServer) RejectRescheduleTraining ¶
func (h HttpServer) RejectRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
func (HttpServer) RequestRescheduleTraining ¶
func (h HttpServer) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
func (HttpServer) RescheduleTraining ¶
func (h HttpServer) RescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID)
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PostTraining ¶
PostTraining defines model for PostTraining.
type RequestRescheduleTrainingJSONRequestBody ¶
type RequestRescheduleTrainingJSONRequestBody = PostTraining
RequestRescheduleTrainingJSONRequestBody defines body for RequestRescheduleTraining for application/json ContentType.
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 RescheduleTrainingJSONRequestBody ¶
type RescheduleTrainingJSONRequestBody = PostTraining
RescheduleTrainingJSONRequestBody defines body for RescheduleTraining for application/json ContentType.
type ServerInterface ¶
type ServerInterface interface { // (GET /trainings) GetTrainings(w http.ResponseWriter, r *http.Request) // (POST /trainings) CreateTraining(w http.ResponseWriter, r *http.Request) // (DELETE /trainings/{trainingUUID}) CancelTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID) // (PUT /trainings/{trainingUUID}/approve-reschedule) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID) // (PUT /trainings/{trainingUUID}/reject-reschedule) RejectRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID) // (PUT /trainings/{trainingUUID}/request-reschedule) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID) // (PUT /trainings/{trainingUUID}/reschedule) RescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID openapi_types.UUID) }
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) ApproveRescheduleTraining ¶
func (siw *ServerInterfaceWrapper) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request)
ApproveRescheduleTraining operation middleware
func (*ServerInterfaceWrapper) CancelTraining ¶
func (siw *ServerInterfaceWrapper) CancelTraining(w http.ResponseWriter, r *http.Request)
CancelTraining operation middleware
func (*ServerInterfaceWrapper) CreateTraining ¶
func (siw *ServerInterfaceWrapper) CreateTraining(w http.ResponseWriter, r *http.Request)
CreateTraining operation middleware
func (*ServerInterfaceWrapper) GetTrainings ¶
func (siw *ServerInterfaceWrapper) GetTrainings(w http.ResponseWriter, r *http.Request)
GetTrainings operation middleware
func (*ServerInterfaceWrapper) RejectRescheduleTraining ¶
func (siw *ServerInterfaceWrapper) RejectRescheduleTraining(w http.ResponseWriter, r *http.Request)
RejectRescheduleTraining operation middleware
func (*ServerInterfaceWrapper) RequestRescheduleTraining ¶
func (siw *ServerInterfaceWrapper) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request)
RequestRescheduleTraining operation middleware
func (*ServerInterfaceWrapper) RescheduleTraining ¶
func (siw *ServerInterfaceWrapper) RescheduleTraining(w http.ResponseWriter, r *http.Request)
RescheduleTraining operation middleware
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type Training ¶
type Training struct { CanBeCancelled bool `json:"canBeCancelled"` MoveProposedBy *string `json:"moveProposedBy,omitempty"` MoveRequiresAccept bool `json:"moveRequiresAccept"` Notes string `json:"notes"` ProposedTime *time.Time `json:"proposedTime,omitempty"` Time time.Time `json:"time"` User string `json:"user"` UserUuid openapi_types.UUID `json:"userUuid"` Uuid openapi_types.UUID `json:"uuid"` }
Training defines model for Training.
type Trainings ¶
type Trainings struct {
Trainings []Training `json:"trainings"`
}
Trainings defines model for Trainings.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error