groups

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGroup added in v0.0.5

func CreateGroup(store *lib.InitStore) fiber.Handler

CreateGroup godoc @Summary Create a new group @Description Creates a new group and returns its ID @Tags Groups @Accept json @Produce json @Success 200 {object} GroupIDResponse @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/groups [post]

func CreateGroupIfNotExistsFor added in v0.6.3

func CreateGroupIfNotExistsFor(store *lib.InitStore) fiber.Handler

CreateGroupIfNotExistsFor godoc @Summary Get or create a group for an external mapper @Description Returns a stable group for the given external mapper id, creating it if necessary. The group id is derived deterministically from the mapper, so the same mapper always maps to the same group. @Tags Groups @Accept json @Produce json @Param request body CreateGroupIfNotExistsForRequest true "External mapper id" @Success 200 {object} GroupIDResponse @Failure 400 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/groups/createIfNotExistsFor [post]

func CreateGroupPad added in v0.0.5

func CreateGroupPad(store *lib.InitStore) fiber.Handler

CreateGroupPad godoc @Summary Create a pad in a group @Description Creates a new pad within a group @Tags Groups @Accept json @Produce json @Param groupId path string true "Group ID" @Param request body CreateGroupPadRequest true "Pad data" @Success 200 {object} map[string]string @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 409 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/groups/{groupId}/pads [post]

func DeleteGroup added in v0.0.5

func DeleteGroup(store *lib.InitStore) fiber.Handler

DeleteGroup godoc @Summary Delete a group @Description Deletes a group @Tags Groups @Accept json @Produce json @Param groupId path string true "Group ID" @Success 200 {string} string "OK" @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/groups/{groupId} [delete]

func Init

func Init(store *lib.InitStore)

func ListAllGroups added in v0.6.3

func ListAllGroups(store *lib.InitStore) fiber.Handler

ListAllGroups godoc @Summary List all groups @Description Returns the IDs of all existing groups @Tags Groups @Produce json @Success 200 {object} GroupListResponse @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/groups [get]

func ListGroupPads added in v0.6.3

func ListGroupPads(store *lib.InitStore) fiber.Handler

ListGroupPads godoc @Summary List pads of a group @Description Returns the IDs of all pads belonging to a group @Tags Groups @Produce json @Param groupId path string true "Group ID" @Success 200 {object} PadListResponse @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/groups/{groupId}/pads [get]

Types

type CreateGroupIfNotExistsForRequest added in v0.6.3

type CreateGroupIfNotExistsForRequest struct {
	GroupMapper string `json:"groupMapper"`
}

CreateGroupIfNotExistsForRequest represents the request to map an external id to a stable group

type CreateGroupPadRequest added in v0.0.5

type CreateGroupPadRequest struct {
	PadName  string `json:"padName"`
	Text     string `json:"text"`
	AuthorId string `json:"authorId"`
}

CreateGroupPadRequest represents the request to create a group pad

type GroupIDResponse added in v0.0.5

type GroupIDResponse struct {
	GroupID string `json:"groupID"`
}

GroupIDResponse represents a response with a group ID

type GroupListResponse added in v0.6.3

type GroupListResponse struct {
	GroupIDs []string `json:"groupIDs"`
}

GroupListResponse represents a response with all group IDs

type PadListResponse added in v0.6.3

type PadListResponse struct {
	PadIDs []string `json:"padIDs"`
}

PadListResponse represents a response with the pad IDs of a group

Jump to

Keyboard shortcuts

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