Documentation
¶
Index ¶
- func InitRoutes(router chi.Router, svc groupservice.Service)
- type Controller
- func (h *Controller) AddMemberToGroup(ctx context.Context, req *groupservice.AddGroupMemberParams, ...) (*modelsv1.Empty, error)
- func (h *Controller) AddMemberToGroupRequest(r *http.Request, w http.ResponseWriter) (*groupservice.AddGroupMemberParams, error)
- func (h *Controller) AddMemberToGroupResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) CreateGroup(ctx context.Context, req *CreateGroupRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) CreateGroupRequest(r *http.Request, w http.ResponseWriter) (*CreateGroupRequest, error)
- func (h *Controller) CreateGroupResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) DeleteGroup(ctx context.Context, req *DeleteGroupRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) DeleteGroupRequest(r *http.Request, w http.ResponseWriter) (*DeleteGroupRequest, error)
- func (h *Controller) DeleteGroupResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) FindGroupByID(ctx context.Context, req *FindGroupByIDRequest, w http.ResponseWriter) (*modelsv1.Group, error)
- func (h *Controller) FindGroupByIDRequest(r *http.Request, w http.ResponseWriter) (*FindGroupByIDRequest, error)
- func (h *Controller) FindGroupByIDResponse(_ context.Context, res *modelsv1.Group, w http.ResponseWriter) error
- func (h *Controller) FindMyGroup(ctx context.Context, req *FindMyGroupRequest, w http.ResponseWriter) (*modelsv1.Group, error)
- func (h *Controller) FindMyGroupRequest(r *http.Request, w http.ResponseWriter) (*FindMyGroupRequest, error)
- func (h *Controller) FindMyGroupResponse(ctx context.Context, res *modelsv1.Group, w http.ResponseWriter) error
- func (h *Controller) ListGroups(ctx context.Context, req *ListGroupsRequest, w http.ResponseWriter) (*modelsv1.GroupList, error)
- func (h *Controller) ListGroupsRequest(r *http.Request, w http.ResponseWriter) (*ListGroupsRequest, error)
- func (h *Controller) ListGroupsResponse(ctx context.Context, res *modelsv1.GroupList, w http.ResponseWriter) error
- func (h *Controller) RemoveGroupMember(ctx context.Context, req *groupservice.RemoveGroupMemberParams, ...) (*modelsv1.Empty, error)
- func (h *Controller) RemoveGroupMemberRequest(r *http.Request, w http.ResponseWriter) (*groupservice.RemoveGroupMemberParams, error)
- func (h *Controller) RemoveGroupMemberResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- func (h *Controller) UpdateGroup(ctx context.Context, req *UpdateGroupRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
- func (h *Controller) UpdateGroupRequest(r *http.Request, w http.ResponseWriter) (*UpdateGroupRequest, error)
- func (h *Controller) UpdateGroupResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
- type CreateGroupRequest
- type DeleteGroupRequest
- type FindGroupByIDRequest
- type FindMyGroupRequest
- type ListGroupsRequest
- type UpdateGroupRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRoutes ¶
func InitRoutes(router chi.Router, svc groupservice.Service)
InitRoutes creates the Controller instance and sets up all routes on it.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller implements methods which satisfy the endpoint format in the `common` package.
func (*Controller) AddMemberToGroup ¶
func (h *Controller) AddMemberToGroup(ctx context.Context, req *groupservice.AddGroupMemberParams, w http.ResponseWriter) (*modelsv1.Empty, error)
AddMemberToGroup adds an attendee to a group.
Details see OpenAPI spec.
func (*Controller) AddMemberToGroupRequest ¶
func (h *Controller) AddMemberToGroupRequest(r *http.Request, w http.ResponseWriter) (*groupservice.AddGroupMemberParams, error)
AddMemberToGroupRequest validates and creates the request for the AddMemberToGroup operation.
func (*Controller) AddMemberToGroupResponse ¶
func (h *Controller) AddMemberToGroupResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
AddMemberToGroupResponse writes out the response for the AddMemberToGroup operation.
func (*Controller) CreateGroup ¶
func (h *Controller) CreateGroup(ctx context.Context, req *CreateGroupRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
CreateGroup creates a new group, setting yourself as the owner.
This also adds you as the first member of the group.
You must have a valid registration.
Note that the members and invites fields are ignored. The group is always created with just you as the owner (or for admins, if a different owner is specified via badge number, that owner).
func (*Controller) CreateGroupRequest ¶
func (h *Controller) CreateGroupRequest(r *http.Request, w http.ResponseWriter) (*CreateGroupRequest, error)
func (*Controller) CreateGroupResponse ¶
func (h *Controller) CreateGroupResponse(ctx context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
func (*Controller) DeleteGroup ¶
func (h *Controller) DeleteGroup(ctx context.Context, req *DeleteGroupRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
DeleteGroup disbands (and deletes) an existing group by uuid. Note that this will first kick everyone from the group!
Only Admins or the current group owner can do this.
func (*Controller) DeleteGroupRequest ¶
func (h *Controller) DeleteGroupRequest(r *http.Request, w http.ResponseWriter) (*DeleteGroupRequest, error)
DeleteGroupRequest parses and returns a request containing information to call the DeleteGroup function.
func (*Controller) DeleteGroupResponse ¶
func (h *Controller) DeleteGroupResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
DeleteGroupResponse writes out a `No Content` status, if the operation was successful.
func (*Controller) FindGroupByID ¶
func (h *Controller) FindGroupByID(ctx context.Context, req *FindGroupByIDRequest, w http.ResponseWriter) (*modelsv1.Group, error)
func (*Controller) FindGroupByIDRequest ¶
func (h *Controller) FindGroupByIDRequest(r *http.Request, w http.ResponseWriter) (*FindGroupByIDRequest, error)
func (*Controller) FindGroupByIDResponse ¶
func (h *Controller) FindGroupByIDResponse(_ context.Context, res *modelsv1.Group, w http.ResponseWriter) error
func (*Controller) FindMyGroup ¶
func (h *Controller) FindMyGroup(ctx context.Context, req *FindMyGroupRequest, w http.ResponseWriter) (*modelsv1.Group, error)
func (*Controller) FindMyGroupRequest ¶
func (h *Controller) FindMyGroupRequest(r *http.Request, w http.ResponseWriter) (*FindMyGroupRequest, error)
func (*Controller) FindMyGroupResponse ¶
func (h *Controller) FindMyGroupResponse(ctx context.Context, res *modelsv1.Group, w http.ResponseWriter) error
func (*Controller) ListGroups ¶
func (h *Controller) ListGroups(ctx context.Context, req *ListGroupsRequest, w http.ResponseWriter) (*modelsv1.GroupList, error)
func (*Controller) ListGroupsRequest ¶
func (h *Controller) ListGroupsRequest(r *http.Request, w http.ResponseWriter) (*ListGroupsRequest, error)
func (*Controller) ListGroupsResponse ¶
func (h *Controller) ListGroupsResponse(ctx context.Context, res *modelsv1.GroupList, w http.ResponseWriter) error
func (*Controller) RemoveGroupMember ¶
func (h *Controller) RemoveGroupMember(ctx context.Context, req *groupservice.RemoveGroupMemberParams, w http.ResponseWriter) (*modelsv1.Empty, error)
RemoveGroupMember removes a group member or revokes an invitation.
Details see OpenAPI spec.
func (*Controller) RemoveGroupMemberRequest ¶
func (h *Controller) RemoveGroupMemberRequest(r *http.Request, w http.ResponseWriter) (*groupservice.RemoveGroupMemberParams, error)
RemoveGroupMemberRequest validates and creates the request for the RemoveGroupMember operation.
func (*Controller) RemoveGroupMemberResponse ¶
func (h *Controller) RemoveGroupMemberResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
RemoveGroupMemberResponse writes out a `No Content` status.
func (*Controller) UpdateGroup ¶
func (h *Controller) UpdateGroup(ctx context.Context, req *UpdateGroupRequest, w http.ResponseWriter) (*modelsv1.Empty, error)
UpdateGroup is used to update an existing group by uuid. Note that you cannot use this to change the group members!
Admins or the current group owner can change the group owner to any member of the group.
func (*Controller) UpdateGroupRequest ¶
func (h *Controller) UpdateGroupRequest(r *http.Request, w http.ResponseWriter) (*UpdateGroupRequest, error)
func (*Controller) UpdateGroupResponse ¶
func (h *Controller) UpdateGroupResponse(_ context.Context, _ *modelsv1.Empty, w http.ResponseWriter) error
type CreateGroupRequest ¶
type CreateGroupRequest struct {
// Group is the expected representation for the request body
Group modelsv1.GroupCreate
}
type DeleteGroupRequest ¶
type DeleteGroupRequest struct {
// contains filtered or unexported fields
}
DeleteGroupRequest holds information, which is required to call the DeleteGroup operation.
type FindGroupByIDRequest ¶
type FindGroupByIDRequest struct {
GroupID string
}
type FindMyGroupRequest ¶
type FindMyGroupRequest struct{}