Documentation ¶
Overview ¶
Package ports provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT.
Package ports provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.2 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 CreateTrainingJSONBody
- type CreateTrainingJSONRequestBody
- type Error
- type HttpServer
- func (h HttpServer) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
- func (h HttpServer) CancelTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
- 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 string)
- func (h HttpServer) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
- func (h HttpServer) RescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
- type MiddlewareFunc
- type PostTraining
- type RequestRescheduleTrainingJSONBody
- type RequestRescheduleTrainingJSONRequestBody
- type RescheduleTrainingJSONBody
- 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 Training
- type Trainings
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 }
type CreateTrainingJSONBody ¶
type CreateTrainingJSONBody PostTraining
CreateTrainingJSONBody defines parameters for CreateTraining.
type CreateTrainingJSONRequestBody ¶
type CreateTrainingJSONRequestBody CreateTrainingJSONBody
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 string)
func (HttpServer) CancelTraining ¶
func (h HttpServer) CancelTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
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 string)
func (HttpServer) RequestRescheduleTraining ¶
func (h HttpServer) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
func (HttpServer) RescheduleTraining ¶
func (h HttpServer) RescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string)
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type PostTraining ¶
PostTraining defines model for PostTraining.
type RequestRescheduleTrainingJSONBody ¶
type RequestRescheduleTrainingJSONBody PostTraining
RequestRescheduleTrainingJSONBody defines parameters for RequestRescheduleTraining.
type RequestRescheduleTrainingJSONRequestBody ¶
type RequestRescheduleTrainingJSONRequestBody RequestRescheduleTrainingJSONBody
RequestRescheduleTrainingJSONRequestBody defines body for RequestRescheduleTraining for application/json ContentType.
type RescheduleTrainingJSONBody ¶
type RescheduleTrainingJSONBody PostTraining
RescheduleTrainingJSONBody defines parameters for RescheduleTraining.
type RescheduleTrainingJSONRequestBody ¶
type RescheduleTrainingJSONRequestBody RescheduleTrainingJSONBody
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 string) // (PUT /trainings/{trainingUUID}/approve-reschedule) ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string) // (PUT /trainings/{trainingUUID}/reject-reschedule) RejectRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string) // (PUT /trainings/{trainingUUID}/request-reschedule) RequestRescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string) // (PUT /trainings/{trainingUUID}/reschedule) RescheduleTraining(w http.ResponseWriter, r *http.Request, trainingUUID string) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc }
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 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 string `json:"userUuid"` Uuid string `json:"uuid"` }
Training defines model for Training.