groupsctl

package
v0.0.0-...-443b398 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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

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

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

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

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

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{}

type ListGroupsRequest

type ListGroupsRequest struct {
	MemberIDs  []int64
	MinSize    uint
	MaxSize    int
	PublicOnly bool
}

type UpdateGroupRequest

type UpdateGroupRequest struct {
	Group modelsv1.Group
}

Jump to

Keyboard shortcuts

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