roomsctl

package
v0.0.0-...-0973f41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 AddToRoomRequest struct {
	// RoomID is the uuid of the room
	RoomID string
	// BadgeNumber is the registration number of an attendee
	BadgeNumber int64
}

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

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

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

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

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

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 (*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

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

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 RemoveFromRoomRequest struct {
	// RoomID is the uuid of the room
	RoomID string
	// BadgeNumber is the registration number of an attendee
	BadgeNumber int64
}

type UpdateRoomRequest

type UpdateRoomRequest struct {
	Room modelsv1.Room
}

UpdateRoomRequest is the request type for the UpdateRoom operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL