Documentation ¶
Index ¶
- func GetLastMigration(db *database.DB) string
- func InitialTables1() *gormigrate.Migration
- func PrepareMigrations(db *database.DB) *gormigrate.Gormigrate
- func RollbackAll(migrator *gormigrate.Gormigrate) error
- type AccessControl
- type Account
- type App
- type AuthInfo
- type Base
- type Engine
- type Folder
- type Group
- type Log
- type Profile
- type RESTHook
- type Role
- type SocialLogin
- type Theme
- type User
- type Workflow
- type WorkflowInstance
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLastMigration ¶
GetLastMigration get the previous migrations in the database.
func InitialTables1 ¶
func InitialTables1() *gormigrate.Migration
InitialTables1 returns the migration for creating the initial table.
func PrepareMigrations ¶
PrepareMigrations prepares all migrations.
func RollbackAll ¶
func RollbackAll(migrator *gormigrate.Gormigrate) error
RollbackAll rolls back all migrations. The function is not provided by gormigrate.
Types ¶
type AccessControl ¶
type AccessControl struct { Base Name string Description string XRole []*Role `gorm:"many2many:access_controls_x_roles"` }
AccessControl ...
type Account ¶
type Account struct { Base UserID uuid.UUID AccessTokenCredID uuid.UUID `gorm:"unique; type:uuid"` XApp []*App `gorm:"many2many:apps_x_accounts"` }
Account ...
type App ¶
type App struct { Base Name string PublicID uuid.UUID `gorm:"unique; type:uuid"` IsSecurityReviewed bool IsOnAppEntityBehalf bool CreatorID uuid.UUID AuthInfoID uuid.UUID RESTHook []RESTHook XRole []*Role `gorm:"many2many:apps_x_roles"` XAccount []*Account `gorm:"many2many:apps_x_accounts"` }
App ...
type Base ¶
type Base struct { ID uuid.UUID `gorm:"primary_key; unique; type:uuid; column:id; default:uuid_generate_v4()"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `gorm:"index"` }
Base ...
type Folder ¶
type Folder struct { Base Name string Description string Avatar32URL string `gorm:"column:avatar_32_url"` CreatorID uuid.UUID Workflow []Workflow }
Folder ...
type Group ¶
type Group struct { Base Name string Avatar32URL string `gorm:"column:avatar_32_url"` CreatorID uuid.UUID XUser []*User `gorm:"many2many:users_x_groups"` }
Group ...
type Log ¶
type Log struct { Base UserID uuid.UUID EngineID uuid.UUID WorkflowID uuid.UUID WorkflowInstanceID uuid.UUID Message string Level string }
Log ...
type Profile ¶
type Profile struct { Base Username string FirstName string SecondName string Email string Avatar32URL string `gorm:"column:avatar_32_url"` UserID uuid.UUID }
Profile ...
type Role ¶
type Role struct { Base Name string Description string XApp []*App `gorm:"many2many:apps_x_roles"` XUser []*User `gorm:"many2many:users_x_roles"` XAccessControl []*AccessControl `gorm:"many2many:access_controls_x_roles"` XTheme []*Theme `gorm:"many2many:themes_x_roles"` XWorkflow []*Workflow `gorm:"many2many:workflows_x_roles"` }
Role ...
type Theme ¶
type Theme struct { Base Name string Code datatypes.JSON PublicID uuid.UUID `gorm:"unique; type:uuid"` CreatorID uuid.UUID XRole []*Role `gorm:"many2many:themes_x_roles"` }
Theme ...
type User ¶
type User struct { Base PasswordCredID uuid.UUID `gorm:"unique; type:uuid"` Profile Profile SocialLogin SocialLogin Account []Account RESTHook []RESTHook AppID []App `gorm:"foreignKey:CreatorID"` Group []Group `gorm:"foreignKey:CreatorID"` Workflow []Workflow `gorm:"foreignKey:CreatorID"` Workspace []Workspace `gorm:"foreignKey:CreatorID"` Folder []Folder `gorm:"foreignKey:CreatorID"` Theme []Theme `gorm:"foreignKey:CreatorID"` XGroup []*Group `gorm:"many2many:users_x_groups"` XWorkspace []*Workspace `gorm:"many2many:users_x_workspaces"` XRole []*Role `gorm:"many2many:users_x_roles"` }
User ...
type Workflow ¶
type Workflow struct { Base Name string Code datatypes.JSON IsActive bool IsDraft bool FolderID uuid.UUID CreatorID uuid.UUID WorkflowInstance []WorkflowInstance XRole []*Role `gorm:"many2many:workflows_x_roles"` }
Workflow ...
Click to show internal directories.
Click to hide internal directories.