Documentation
¶
Overview ¶
Package schema provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version 2.4.0 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type Appointment
- type AppointmentStatus
- type Availability
- type CreateUserRequest
- type CreateUserRequestRole
- type GetAppointmentsParams
- type GinServerOptions
- type MiddlewareFunc
- type PostAppointmentsJSONBody
- type PostAppointmentsJSONRequestBody
- type PostProvidersProviderIdAvailabilityJSONRequestBody
- type PostUsersJSONRequestBody
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetAppointments(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetUsersUserId(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostAppointments(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostAppointmentsAppointmentIdConfirm(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostProvidersProviderIdAvailability(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostUsers(c *gin.Context)
- type User
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type Appointment ¶
type Appointment struct { ClientId *openapi_types.UUID `json:"client_id,omitempty"` EndTime *time.Time `json:"end_time,omitempty"` Id *openapi_types.UUID `json:"id,omitempty"` ProviderId *openapi_types.UUID `json:"provider_id,omitempty"` StartTime *time.Time `json:"start_time,omitempty"` Status *AppointmentStatus `json:"status,omitempty"` }
Appointment defines model for Appointment.
type AppointmentStatus ¶
type AppointmentStatus string
AppointmentStatus defines model for Appointment.Status.
const ( Confirmed AppointmentStatus = "confirmed" Reserved AppointmentStatus = "reserved" )
Defines values for AppointmentStatus.
type Availability ¶
type Availability struct { EndTime *time.Time `json:"end_time,omitempty"` Id *openapi_types.UUID `json:"id,omitempty"` ProviderId *openapi_types.UUID `json:"provider_id,omitempty"` StartTime *time.Time `json:"start_time,omitempty"` }
Availability defines model for Availability.
type CreateUserRequest ¶
type CreateUserRequest struct { Email string `json:"email"` Name string `json:"name"` Role CreateUserRequestRole `json:"role"` }
CreateUserRequest defines model for CreateUserRequest.
type CreateUserRequestRole ¶
type CreateUserRequestRole string
CreateUserRequestRole defines model for CreateUserRequest.Role.
const ( CreateUserRequestRoleClient CreateUserRequestRole = "client" CreateUserRequestRoleProvider CreateUserRequestRole = "provider" )
Defines values for CreateUserRequestRole.
type GetAppointmentsParams ¶
type GetAppointmentsParams struct { ProviderId *openapi_types.UUID `form:"providerId,omitempty" json:"providerId,omitempty"` Date *openapi_types.Date `form:"date,omitempty" json:"date,omitempty"` }
GetAppointmentsParams defines parameters for GetAppointments.
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶
type PostAppointmentsJSONBody ¶
type PostAppointmentsJSONBody struct { AvailabilityId *openapi_types.UUID `json:"availability_id,omitempty"` ClientId *openapi_types.UUID `json:"client_id,omitempty"` ProviderId *openapi_types.UUID `json:"provider_id,omitempty"` }
PostAppointmentsJSONBody defines parameters for PostAppointments.
type PostAppointmentsJSONRequestBody ¶
type PostAppointmentsJSONRequestBody PostAppointmentsJSONBody
PostAppointmentsJSONRequestBody defines body for PostAppointments for application/json ContentType.
type PostProvidersProviderIdAvailabilityJSONRequestBody ¶
type PostProvidersProviderIdAvailabilityJSONRequestBody = Availability
PostProvidersProviderIdAvailabilityJSONRequestBody defines body for PostProvidersProviderIdAvailability for application/json ContentType.
type PostUsersJSONRequestBody ¶
type PostUsersJSONRequestBody = CreateUserRequest
PostUsersJSONRequestBody defines body for PostUsers for application/json ContentType.
type ServerInterface ¶
type ServerInterface interface { // Get available appointment slots // (GET /appointments) GetAppointments(c *gin.Context, params GetAppointmentsParams) // Reserve an appointment slot // (POST /appointments) PostAppointments(c *gin.Context) // Confirm a reservation // (POST /appointments/{appointmentId}/confirm) PostAppointmentsAppointmentIdConfirm(c *gin.Context, appointmentId openapi_types.UUID) // Submit provider availability // (POST /providers/{providerId}/availability) PostProvidersProviderIdAvailability(c *gin.Context, providerId openapi_types.UUID) // Create a new user (client or provider) // (POST /users) PostUsers(c *gin.Context) // Get user details // (GET /users/{userId}) GetUsersUserId(c *gin.Context, userId openapi_types.UUID) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetAppointments ¶
func (siw *ServerInterfaceWrapper) GetAppointments(c *gin.Context)
GetAppointments operation middleware
func (*ServerInterfaceWrapper) GetUsersUserId ¶
func (siw *ServerInterfaceWrapper) GetUsersUserId(c *gin.Context)
GetUsersUserId operation middleware
func (*ServerInterfaceWrapper) PostAppointments ¶
func (siw *ServerInterfaceWrapper) PostAppointments(c *gin.Context)
PostAppointments operation middleware
func (*ServerInterfaceWrapper) PostAppointmentsAppointmentIdConfirm ¶
func (siw *ServerInterfaceWrapper) PostAppointmentsAppointmentIdConfirm(c *gin.Context)
PostAppointmentsAppointmentIdConfirm operation middleware
func (*ServerInterfaceWrapper) PostProvidersProviderIdAvailability ¶
func (siw *ServerInterfaceWrapper) PostProvidersProviderIdAvailability(c *gin.Context)
PostProvidersProviderIdAvailability operation middleware
func (*ServerInterfaceWrapper) PostUsers ¶
func (siw *ServerInterfaceWrapper) PostUsers(c *gin.Context)
PostUsers operation middleware