Documentation
¶
Index ¶
- func CreateGroup(store *lib.InitStore) fiber.Handler
- func CreateGroupIfNotExistsFor(store *lib.InitStore) fiber.Handler
- func CreateGroupPad(store *lib.InitStore) fiber.Handler
- func DeleteGroup(store *lib.InitStore) fiber.Handler
- func Init(store *lib.InitStore)
- func ListAllGroups(store *lib.InitStore) fiber.Handler
- func ListGroupPads(store *lib.InitStore) fiber.Handler
- type CreateGroupIfNotExistsForRequest
- type CreateGroupPadRequest
- type GroupIDResponse
- type GroupListResponse
- type PadListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGroup ¶ added in v0.0.5
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
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
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
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 ListAllGroups ¶ added in v0.6.3
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
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