Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_files_node_id"` ParentID zero.Int `db:"parent_id" json:"parent_id" foreign:"fk_ra_files_parent_id"` JobID zero.Int `db:"job_id" json:"job_id" foreign:"fk_ra_files_job_id"` Dir string `db:"dir" json:"dir" validate:"required"` File string `db:"file" json:"file" validate:"required"` Type model.Node `db:"type" json:"type"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
File job scripts database structure
type FileLog ¶
type FileLog struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_file_logs_node_id"` FileID int64 `db:"file_id" json:"file_id" foreign:"fk_ra_file_logs_file_id"` SourceUserID zero.Int `db:"source_user_id" json:"source_user_id" foreign:"fk_ra_file_logs_source_user_id"` Type model.Process `db:"type" json:"type"` Data FileLogData `db:"data" json:"data,omitempty"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` }
FileLog log for file database structure
type FileLogData ¶
type FileLogData struct { Dir string `json:"dir,omitempty"` File string `json:"file,omitempty"` Type model.Node `json:"type,omitempty"` }
FileLogData jsonb structure
func (*FileLogData) Scan ¶
func (a *FileLogData) Scan(value interface{}) error
Scan file log data sql.Scanner
type Job ¶
type Job struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_jobs_node_id" validate:"required"` SourceUserID zero.Int `db:"source_user_id" json:"source_user_id" foreign:"fk_ra_jobs_source_user_id"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` Detail *JobDetail `json:"detail"` }
Job user defined background job structure
type JobDetail ¶
type JobDetail struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_job_details_node_id" validate:"required"` JobID int64 `db:"job_id" json:"job_id" foreign:"fk_ra_job_details_job_id" validate:"required"` SourceUserID zero.Int `db:"source_user_id" foreign:"fk_ra_job_details_source_user_id" json:"source_user_id"` Code string `db:"code" json:"code" validate:"required,gte=3,lte=64"` Name string `db:"name" json:"name" validate:"required,gte=3,lte=200"` Type model.JobType `db:"type" json:"type"` Detail zero.String `db:"detail" json:"detail"` Before bool `db:"before" json:"before"` BeforeJobs zero.String `db:"before_jobs" json:"before_jobs"` After bool `db:"after" json:"after"` AfterJobs zero.String `db:"after_jobs" json:"after_jobs"` ScriptFile zero.String `db:"script_file" json:"script_file"` Script zero.String `db:"script" json:"script"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` }
JobDetail user defined background job detail structure
func NewJobDetail ¶
func NewJobDetail() *JobDetail
NewJobDetail generate user defined background job detail
type Node ¶
type Node struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` Name string `db:"name" json:"name" validate:"required,gte=3,lte=200"` Code string `db:"code" json:"code" unique:"ra_nodes_code_unique_index" validate:"required,gte=3,lte=200"` Detail zero.String `db:"detail" json:"detail"` Type model.Node `db:"type" json:"type"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
Node application type structure
type User ¶
type User struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_users_node_id" validate:"required"` Username string `db:"username" json:"username" unique:"ra_users_username_unique_index" validate:"required"` PasswordDigest string `db:"password_digest" json:"-"` Password string `db:"-" json:"password" validate:"required"` Email string `db:"email" json:"email" unique:"ra_users_email_unique_index" validate:"required,email"` IsActive bool `db:"is_active" json:"is_active"` InsertedAt zero.Time `db:"inserted_at" json:"inserted_at"` UpdatedAt zero.Time `db:"updated_at" json:"updated_at"` }
User Authentication/authorization base database model
type UserPassphrase ¶
type UserPassphrase struct { database.DBInterface `json:"-"` ID int64 `db:"id" json:"id"` NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_user_passphrases_node_id" validate:"required"` UserID int64 `db:"user_id" json:"user_id" foreign:"fk_ra_user_passphrases_user_id"` Passphrase string `db:"passphrase" json:"passphrase" unique:"ra_user_passphrases_passphrase_unique_index"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` }
UserPassphrase authentication access token struct
func NewUserPassphrase ¶
func NewUserPassphrase(userID int64) *UserPassphrase
NewUserPassphrase generate authentication access token
func (UserPassphrase) PassphraseQuery ¶
func (d UserPassphrase) PassphraseQuery(db *database.Database) string
PassphraseQuery generate user_passphrase query string for database type
func (UserPassphrase) TableName ¶
func (d UserPassphrase) TableName() string
TableName user_passphrase database table name
func (UserPassphrase) ToJSON ¶
func (d UserPassphrase) ToJSON() string
ToJSON UserPassphrase database model to json string
type UserPassphraseInvalidation ¶
type UserPassphraseInvalidation struct { database.DBInterface `json:"-"` PassphraseID int64 `` /* 133-byte string literal not displayed */ NodeID int64 `db:"node_id" json:"node_id" foreign:"fk_ra_user_passphrases_invalidations_node_id" validate:"required"` SourceUserID int64 `db:"source_user_id" json:"source_user_id" foreign:"fk_ra_user_passphrases_source_user_id"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` }
UserPassphraseInvalidation authentication access token invalidation struct
func NewUserPassphraseInvalidation ¶
func NewUserPassphraseInvalidation() *UserPassphraseInvalidation
NewUserPassphraseInvalidation generate authentication access token invalidation
func (UserPassphraseInvalidation) TableName ¶
func (d UserPassphraseInvalidation) TableName() string
TableName user_passphrase_invalidation database table name
func (UserPassphraseInvalidation) ToJSON ¶
func (d UserPassphraseInvalidation) ToJSON() string
ToJSON user passphrase invalidation structure to json string