accessGroups

package
v0.2.65 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemKeyEveryone   = "everyone"
	SystemKeyRegistered = "registered"
)
View Source
const (
	JoinModeSystem      = "system"
	JoinModeInviteOnly  = "invite_only"
	JoinModeApplication = "application"
)
View Source
const (
	StatusDisabled int8 = 0
	StatusEnabled  int8 = 1
)

Variables

This section is empty.

Functions

func Create

func Create(entity *Entity) error

func Delete

func Delete(entity *Entity) 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"`
	Name      string    `gorm:"column:name;type:varchar(128);not null;default:'';" json:"name"`
	SystemKey *string   `gorm:"column:system_key;type:varchar(32);uniqueIndex:uniq_access_group_system_key;" json:"systemKey,omitempty"`
	JoinMode  string    `gorm:"column:join_mode;type:varchar(32);not null;default:'invite_only';" json:"joinMode"`
	Status    int8      `gorm:"column:status;type:tinyint;not null;default:1;index:idx_access_groups_status,priority:1;" json:"status"`
	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 Get

func Get(id uint64) (Entity, error)

func GetBySystemKeys

func GetBySystemKeys(systemKeys []string) ([]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