accessGroupMembers

package
v0.2.68 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemberRoleMember  = "member"
	MemberRoleManager = "manager"
)
View Source
const (
	StatusDisabled int8 = 0
	StatusEnabled  int8 = 1
	StatusPending  int8 = 2
)

Variables

This section is empty.

Functions

func ActiveGroupIDsByUser

func ActiveGroupIDsByUser(userID uint64) ([]uint64, error)

func ActiveUserIDsWithCategoryCapability

func ActiveUserIDsWithCategoryCapability(userIDs []uint64, categoryID uint64, minimumLevel int8) ([]uint64, error)

ActiveUserIDsWithCategoryCapability filters a notification/audience batch in one query. System groups are handled by accesscontrol before this call; this query only considers enabled custom-group memberships and enabled grants.

func CountActiveCustomGroupsByUser

func CountActiveCustomGroupsByUser(userID uint64) (int64, error)

func CountActiveCustomGroupsByUserWithDB

func CountActiveCustomGroupsByUserWithDB(db *gorm.DB, userID uint64) (int64, error)

func Delete

func Delete(entity *Entity) error

func ManagedGroupIDsByUser

func ManagedGroupIDsByUser(userID uint64) ([]uint64, error)

func Save

func Save(entity *Entity) error

Types

type Entity

type Entity struct {
	Id            uint64    `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"`
	AccessGroupId uint64    `` /* 129-byte string literal not displayed */
	UserId        uint64    `` /* 174-byte string literal not displayed */
	MemberRole    string    `gorm:"column:member_role;type:varchar(32);not null;default:'member';" json:"memberRole"`
	Status        int8      `` /* 127-byte string literal not displayed */
	CreatedBy     uint64    `gorm:"column:created_by;type:bigint unsigned;not null;default:0;" json:"createdBy"`
	CreatedAt     time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"`
	UpdatedAt     time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}

func All

func All() ([]Entity, error)

func ByGroupID

func ByGroupID(groupID uint64) ([]Entity, error)

func GetByGroupUser

func GetByGroupUser(groupID, userID uint64) (Entity, error)

func (*Entity) TableName

func (itself *Entity) TableName() string

Jump to

Keyboard shortcuts

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