accessadminservice

package
v0.2.63 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidGroup          = errors.New("invalid access group")
	ErrSystemGroupImmutable  = errors.New("system access group is immutable")
	ErrInvalidMember         = errors.New("invalid access group member")
	ErrInvalidGrant          = errors.New("invalid category grant")
	ErrApplicationNotAllowed = errors.New("access group does not accept applications")
)

Functions

func ApplyToGroup

func ApplyToGroup(groupID, userID uint64) error

func DeleteCategory

func DeleteCategory(entity *category.Entity) error

func DeleteGroup

func DeleteGroup(groupID uint64) error

func DeleteMember

func DeleteMember(groupID, memberID uint64) error

func ReplaceCategoryGrants

func ReplaceCategoryGrants(categoryID uint64, grants []GrantInput) error

ReplaceCategoryGrants swaps a category's grants. A public category cannot be made restricted while it is still attached to multi-category topics: the single-restricted-category invariant must hold before visibility narrows.

func ReviewApplication

func ReviewApplication(groupID, memberID uint64, approve bool) error

func SaveCategoryWithDefaults

func SaveCategoryWithDefaults(entity *category.Entity, create bool) error

func SaveGroup

func SaveGroup(input GroupInput) (accessGroups.Entity, error)

func SaveMember

func SaveMember(groupID, userID uint64, role string, actorID uint64) (accessGroupMembers.Entity, error)

Types

type CategoryRestrictionConflictError

type CategoryRestrictionConflictError struct {
	TopicCount int64
}

func (*CategoryRestrictionConflictError) Error

type GrantInput

type GrantInput struct {
	AccessGroupID uint64 `json:"accessGroupId"`
	Level         int8   `json:"level"`
}

type GroupInput

type GroupInput struct {
	ID        uint64
	Name      string
	JoinMode  string
	Status    int8
	CreatedBy uint64
}

Jump to

Keyboard shortcuts

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