Documentation ¶
Overview ¶
Package ports provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.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.13.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 Date
- type Error
- type GetTrainerAvailableHoursParams
- type GrpcServer
- func (g GrpcServer) CancelTraining(ctx context.Context, request *trainer.UpdateHourRequest) (*empty.Empty, error)
- func (g GrpcServer) IsHourAvailable(ctx context.Context, request *trainer.IsHourAvailableRequest) (*trainer.IsHourAvailableResponse, error)
- func (g GrpcServer) MakeHourAvailable(ctx context.Context, request *trainer.UpdateHourRequest) (*empty.Empty, error)
- func (g GrpcServer) ScheduleTraining(ctx context.Context, request *trainer.UpdateHourRequest) (*empty.Empty, error)
- type Hour
- type HourUpdate
- type HttpServer
- type InvalidParamFormatError
- type MakeHourAvailableJSONRequestBody
- type MakeHourUnavailableJSONRequestBody
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- type UnmarshalingParamError
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 Date ¶
type Date struct { Date openapi_types.Date `json:"date"` HasFreeHours bool `json:"hasFreeHours"` Hours []Hour `json:"hours"` }
Date defines model for Date.
type GetTrainerAvailableHoursParams ¶
type GetTrainerAvailableHoursParams struct { DateFrom time.Time `form:"dateFrom" json:"dateFrom"` DateTo time.Time `form:"dateTo" json:"dateTo"` }
GetTrainerAvailableHoursParams defines parameters for GetTrainerAvailableHours.
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer(application app.Application) GrpcServer
func (GrpcServer) CancelTraining ¶
func (g GrpcServer) CancelTraining(ctx context.Context, request *trainer.UpdateHourRequest) (*empty.Empty, error)
func (GrpcServer) IsHourAvailable ¶
func (g GrpcServer) IsHourAvailable(ctx context.Context, request *trainer.IsHourAvailableRequest) (*trainer.IsHourAvailableResponse, error)
func (GrpcServer) MakeHourAvailable ¶
func (g GrpcServer) MakeHourAvailable(ctx context.Context, request *trainer.UpdateHourRequest) (*empty.Empty, error)
func (GrpcServer) ScheduleTraining ¶
func (g GrpcServer) ScheduleTraining(ctx context.Context, request *trainer.UpdateHourRequest) (*empty.Empty, error)
type Hour ¶
type Hour struct { Available bool `json:"available"` HasTrainingScheduled bool `json:"hasTrainingScheduled"` Hour time.Time `json:"hour"` }
Hour defines model for Hour.
type HourUpdate ¶
HourUpdate defines model for HourUpdate.
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(application app.Application) HttpServer
func (HttpServer) GetTrainerAvailableHours ¶
func (h HttpServer) GetTrainerAvailableHours(w http.ResponseWriter, r *http.Request, params GetTrainerAvailableHoursParams)
func (HttpServer) MakeHourAvailable ¶
func (h HttpServer) MakeHourAvailable(w http.ResponseWriter, r *http.Request)
func (HttpServer) MakeHourUnavailable ¶
func (h HttpServer) MakeHourUnavailable(w http.ResponseWriter, r *http.Request)
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MakeHourAvailableJSONRequestBody ¶
type MakeHourAvailableJSONRequestBody = HourUpdate
MakeHourAvailableJSONRequestBody defines body for MakeHourAvailable for application/json ContentType.
type MakeHourUnavailableJSONRequestBody ¶
type MakeHourUnavailableJSONRequestBody = HourUpdate
MakeHourUnavailableJSONRequestBody defines body for MakeHourUnavailable 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 ServerInterface ¶
type ServerInterface interface { // (GET /trainer/calendar) GetTrainerAvailableHours(w http.ResponseWriter, r *http.Request, params GetTrainerAvailableHoursParams) // (PUT /trainer/calendar/make-hour-available) MakeHourAvailable(w http.ResponseWriter, r *http.Request) MakeHourUnavailable(w http.ResponseWriter, r *http.Request) }
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) GetTrainerAvailableHours ¶
func (siw *ServerInterfaceWrapper) GetTrainerAvailableHours(w http.ResponseWriter, r *http.Request)
GetTrainerAvailableHours operation middleware
func (*ServerInterfaceWrapper) MakeHourAvailable ¶
func (siw *ServerInterfaceWrapper) MakeHourAvailable(w http.ResponseWriter, r *http.Request)
MakeHourAvailable operation middleware
func (*ServerInterfaceWrapper) MakeHourUnavailable ¶
func (siw *ServerInterfaceWrapper) MakeHourUnavailable(w http.ResponseWriter, r *http.Request)
MakeHourUnavailable operation middleware
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) GetTrainerAvailableHours ¶
func (_ Unimplemented) GetTrainerAvailableHours(w http.ResponseWriter, r *http.Request, params GetTrainerAvailableHoursParams)
(GET /trainer/calendar)
func (Unimplemented) MakeHourAvailable ¶
func (_ Unimplemented) MakeHourAvailable(w http.ResponseWriter, r *http.Request)
(PUT /trainer/calendar/make-hour-available)
func (Unimplemented) MakeHourUnavailable ¶
func (_ Unimplemented) MakeHourUnavailable(w http.ResponseWriter, r *http.Request)
(PUT /trainer/calendar/make-hour-unavailable)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error