Documentation ¶
Index ¶
- func InitRoutes(router chi.Router, svc roomservice.Service)
- type AddToRoomRequest
- type Controller
- func (h *Controller) AddToRoom(ctx context.Context, req *AddToRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) AddToRoomRequest(r *http.Request, w http.ResponseWriter) (*AddToRoomRequest, error)
- func (h *Controller) AddToRoomResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) CreateRoom(ctx context.Context, req *CreateRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) CreateRoomRequest(r *http.Request, w http.ResponseWriter) (*CreateRoomRequest, error)
- func (h *Controller) CreateRoomResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) DeleteRoom(ctx context.Context, req *DeleteRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) DeleteRoomRequest(r *http.Request, w http.ResponseWriter) (*DeleteRoomRequest, error)
- func (h *Controller) DeleteRoomResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) FindMyRoom(ctx context.Context, req *FindMyRoomRequest, w http.ResponseWriter) (*modelsv1.Room, error)
- func (h *Controller) FindMyRoomRequest(r *http.Request, w http.ResponseWriter) (*FindMyRoomRequest, error)
- func (h *Controller) FindMyRoomResponse(ctx context.Context, res *modelsv1.Room, w http.ResponseWriter) error
- func (h *Controller) GetRoomByID(ctx context.Context, req *GetRoomByIDRequest, w http.ResponseWriter) (*modelsv1.Room, error)
- func (h *Controller) GetRoomByIDRequest(r *http.Request, w http.ResponseWriter) (*GetRoomByIDRequest, error)
- func (h *Controller) GetRoomByIDResponse(ctx context.Context, res *modelsv1.Room, w http.ResponseWriter) error
- func (h *Controller) ListRooms(ctx context.Context, req *roomservice.FindRoomParams, w http.ResponseWriter) (*modelsv1.RoomList, error)
- func (h *Controller) ListRoomsRequest(r *http.Request, w http.ResponseWriter) (*roomservice.FindRoomParams, error)
- func (h *Controller) ListRoomsResponse(ctx context.Context, res *modelsv1.RoomList, w http.ResponseWriter) error
- func (h *Controller) RemoveFromRoom(ctx context.Context, req *RemoveFromRoomRequest, _ http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) RemoveFromRoomRequest(r *http.Request, _ http.ResponseWriter) (*RemoveFromRoomRequest, error)
- func (h *Controller) RemoveFromRoomResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) UpdateRoom(ctx context.Context, req *UpdateRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) UpdateRoomRequest(r *http.Request, w http.ResponseWriter) (*UpdateRoomRequest, error)
- func (h *Controller) UpdateRoomResponse(ctx context.Context, res *modelsv1.Empty, w http.ResponseWriter) error
- type CreateRoomRequest
- type DeleteRoomRequest
- type FindMyRoomRequest
- type GetRoomByIDRequest
- type RemoveFromRoomRequest
- type UpdateRoomRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRoutes ¶
func InitRoutes(router chi.Router, svc roomservice.Service)
Types ¶
type AddToRoomRequest ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller implements methods which satisfy the endpoint format in the `common` package.
func (*Controller) AddToRoom ¶
func (h *Controller) AddToRoom(ctx context.Context, req *AddToRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
AddToRoom adds an attendee to a room.
See OpenAPI Spec for further details.
func (*Controller) AddToRoomRequest ¶
func (h *Controller) AddToRoomRequest(r *http.Request, w http.ResponseWriter) (*AddToRoomRequest, error)
func (*Controller) AddToRoomResponse ¶
func (h *Controller) AddToRoomResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
func (*Controller) CreateRoom ¶
func (h *Controller) CreateRoom(ctx context.Context, req *CreateRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
CreateRoom creates a new room without assignment.
Endpoint access only for admin users or api token.
Successful operations return status 201 with a location header that points to the created resource.
func (*Controller) CreateRoomRequest ¶
func (h *Controller) CreateRoomRequest(r *http.Request, w http.ResponseWriter) (*CreateRoomRequest, error)
func (*Controller) CreateRoomResponse ¶
func (h *Controller) CreateRoomResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
func (*Controller) DeleteRoom ¶
func (h *Controller) DeleteRoom(ctx context.Context, req *DeleteRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
DeleteRoom deletes an existing room by uuid.
See OpenAPI Spec for further details.
func (*Controller) DeleteRoomRequest ¶
func (h *Controller) DeleteRoomRequest(r *http.Request, w http.ResponseWriter) (*DeleteRoomRequest, error)
func (*Controller) DeleteRoomResponse ¶
func (h *Controller) DeleteRoomResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
func (*Controller) FindMyRoom ¶
func (h *Controller) FindMyRoom(ctx context.Context, req *FindMyRoomRequest, w http.ResponseWriter) (*modelsv1.Room, error)
FindMyRoom gets the room you are in. Must have a valid registration.
See OpenAPI Spec for further details.
func (*Controller) FindMyRoomRequest ¶
func (h *Controller) FindMyRoomRequest(r *http.Request, w http.ResponseWriter) (*FindMyRoomRequest, error)
func (*Controller) FindMyRoomResponse ¶
func (h *Controller) FindMyRoomResponse(ctx context.Context, res *modelsv1.Room, w http.ResponseWriter) error
func (*Controller) GetRoomByID ¶
func (h *Controller) GetRoomByID(ctx context.Context, req *GetRoomByIDRequest, w http.ResponseWriter) (*modelsv1.Room, error)
GetRoomByID returns a single room. Admin/API key only.
See OpenAPI Spec for further details.
func (*Controller) GetRoomByIDRequest ¶
func (h *Controller) GetRoomByIDRequest(r *http.Request, w http.ResponseWriter) (*GetRoomByIDRequest, error)
func (*Controller) GetRoomByIDResponse ¶
func (h *Controller) GetRoomByIDResponse(ctx context.Context, res *modelsv1.Room, w http.ResponseWriter) error
func (*Controller) ListRooms ¶
func (h *Controller) ListRooms(ctx context.Context, req *roomservice.FindRoomParams, w http.ResponseWriter) (*modelsv1.RoomList, error)
func (*Controller) ListRoomsRequest ¶
func (h *Controller) ListRoomsRequest(r *http.Request, w http.ResponseWriter) (*roomservice.FindRoomParams, error)
func (*Controller) ListRoomsResponse ¶
func (h *Controller) ListRoomsResponse(ctx context.Context, res *modelsv1.RoomList, w http.ResponseWriter) error
func (*Controller) RemoveFromRoom ¶
func (h *Controller) RemoveFromRoom(ctx context.Context, req *RemoveFromRoomRequest, _ http.ResponseWriter) (*modelsv1.Empty, error)
RemoveFromRoom removes the attendee with the given badge number from the room.
See OpenAPI Spec for further details.
func (*Controller) RemoveFromRoomRequest ¶
func (h *Controller) RemoveFromRoomRequest(r *http.Request, _ http.ResponseWriter) (*RemoveFromRoomRequest, error)
func (*Controller) RemoveFromRoomResponse ¶
func (h *Controller) RemoveFromRoomResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
func (*Controller) UpdateRoom ¶
func (h *Controller) UpdateRoom(ctx context.Context, req *UpdateRoomRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
UpdateRoom updates an existing room by uuid. Note that you cannot use this to change the room members!
See OpenAPI Spec for further details.
func (*Controller) UpdateRoomRequest ¶
func (h *Controller) UpdateRoomRequest(r *http.Request, w http.ResponseWriter) (*UpdateRoomRequest, error)
func (*Controller) UpdateRoomResponse ¶
func (h *Controller) UpdateRoomResponse(ctx context.Context, res *modelsv1.Empty, w http.ResponseWriter) error
type CreateRoomRequest ¶
type CreateRoomRequest struct { // Room is the expected representation for the request body Room modelsv1.RoomCreate }
type DeleteRoomRequest ¶
type DeleteRoomRequest struct {
UUID string
}
type FindMyRoomRequest ¶
type FindMyRoomRequest struct{}
type GetRoomByIDRequest ¶
type GetRoomByIDRequest struct {
UUID string
}
type RemoveFromRoomRequest ¶
type UpdateRoomRequest ¶
UpdateRoomRequest is the request type for the UpdateRoom operation.