sql

package
v5.0.0-...-b98a0e9 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDAO

func NewDAO(db *gorm.DB) acl.DAO

Types

type ACL

type ACL struct {
	ID          int64      `gorm:"primaryKey;column:id;autoIncrement;"`
	ActionName  string     `gorm:"column:action_name;type:varchar(500);uniqueIndex:acls_u1"`
	ActionValue string     `gorm:"column:action_value;type:varchar(500)"`
	RoleID      int        `gorm:"column:role_id;default:-1;uniqueIndex:acls_u1"`
	WorkspaceID int        `gorm:"column:workspace_id; default:-1;uniqueIndex:acls_u1"`
	NodeID      int        `gorm:"column:node_id; default:-1;uniqueIndex:acls_u1"`
	Role        Role       `gorm:"foreignKey:RoleID"`
	Workspace   Workspace  `gorm:"foreignKey:WorkspaceID"`
	Node        Node       `gorm:"foreignKey:NodeID"`
	Creation    time.Time  `gorm:"column:created_at;type:timestamp;default:current_timestamp;"`
	Expiry      *time.Time `gorm:"column:expires_at;type:TIMESTAMP NULL DEFAULT NULL"`
}

func (*ACL) TableName

func (*ACL) TableName(namer schema.Namer) string

type Node

type Node struct {
	ID   int    `gorm:"primaryKey; column:id; autoIncrement;"`
	UUID string `gorm:"column:uuid; unique; type:varchar(500)"`
}

func (*Node) TableName

func (*Node) TableName(namer schema.Namer) string

type Role

type Role struct {
	ID   int    `gorm:"primaryKey; column:id; autoIncrement;"`
	UUID string `gorm:"column:uuid; unique; type:varchar(500)"`
}

func (*Role) TableName

func (*Role) TableName(namer schema.Namer) string

type Workspace

type Workspace struct {
	ID   int    `gorm:"primaryKey; column:id; autoIncrement;"`
	UUID string `gorm:"column:uuid; unique; type:varchar(500)"`
}

func (*Workspace) TableName

func (*Workspace) TableName(namer schema.Namer) string

Jump to

Keyboard shortcuts

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