models

package
v0.0.0-...-834c3ea Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControl

type AccessControl struct {
	Base
	Name        string
	Description string
	XRole       []*Role `gorm:"many2many:access_controls_x_roles"`
}

AccessControl represents access control for managing access to resources.

type Account

type Account struct {
	Base
	UserID            uuid.UUID
	AccessTokenCredID uuid.UUID `gorm:"unique; type:uuid"`
	XApp              []*App    `gorm:"many2many:apps_x_accounts"`
}

Account represents credentials needed for an app to authorize access.

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 represents the application a workflow step runs.

type AuthInfo

type AuthInfo struct {
	Base
	Name string
	Code datatypes.JSON
	App  App
}

AuthInfo represents information an application needs for authentication to take place.

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 is the base model for other models.

type Engine

type Engine struct {
	Base
	WorkflowInstance []WorkflowInstance
}

Engine represents an engine.

type Folder

type Folder struct {
	Base
	Name        string
	Description string
	Avatar32URL string `gorm:"column:avatar_32_url"`
	CreatorID   uuid.UUID
	Workflow    []Workflow
}

Folder represents the folder workflows and the likes can be kept.

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 represents a group.

type Log

type Log struct {
	Base
	UserID             uuid.UUID
	EngineID           uuid.UUID
	WorkflowID         uuid.UUID
	WorkflowInstanceID uuid.UUID
	Message            string
	Level              string
}

Log represents a log information. Log does not use foreign key constraints because it is supposed to exist even after associated keys are removed.

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 stores information about the user.

type RESTHook

type RESTHook struct {
	Base
	UserID  uuid.UUID
	AppID   uuid.UUID
	HookURL string
}

RESTHook represents a webhook used by an app on behalf of a user.

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 represents roles with assigned permissions.

type SocialLogin

type SocialLogin struct {
	Base
	AppName string
	UserID  uuid.UUID
}

SocialLogin for social login information.

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 represents a theme used to change the look of the application.

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 stores information about the 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 represents a workflow.

type WorkflowInstance

type WorkflowInstance struct {
	Base
	CurrentTaskIndex int
	Dataflow         datatypes.JSON
	WorkflowID       uuid.UUID
	EngineID         uuid.UUID
}

WorkflowInstance represents a running workflow instance.

type Workspace

type Workspace struct {
	Base
	Name        string
	Avatar32URL string `gorm:"column:avatar_32_url"`
	CreatorID   uuid.UUID
	XUser       []*User `gorm:"many2many:users_x_workspaces"`
}

Workspace represents a workspace.

Jump to

Keyboard shortcuts

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