entity

package
v0.0.0-...-63fb21e Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.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 DynamicField

type DynamicField struct {
	ID           string     `json:"id"`
	Name         string     `json:"name"`
	VariableType string     `json:"variable_type"`
	DynamicTable Identifier `json:"dynamic_table,omitempty"`
	Meta         MetaData   `json:"meta"`
}

type DynamicTable

type DynamicTable struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	// Variables []DynamicField `json:"variables"`
	Meta MetaData `json:"meta"`
}

type Identifier

type Identifier struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Login

type Login struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type MetaData

type MetaData struct {
	CreatedAt  time.Time `json:"created_at"`
	CreatedBy  string    `json:"created_by"`
	ModifiedAt time.Time `json:"modified_at"`
	ModifiedBy string    `json:"modified_by"`
}

type NewDynamicField

type NewDynamicField struct {
	ID             string
	Name           string `json:"name"`
	VariableType   string `json:"variable_type"`
	DynamicTableID string `json:"dynamic_table_id"`
}

type NewDynamicTable

type NewDynamicTable struct {
	ID   string
	Name string `json:"name"`
}

type NewRun

type NewRun struct {
	ID         string
	WorkflowID string
	UserID     string
	Error      *string
	StartTime  time.Time
	FinishTime time.Time
	Logs       []NewRunLog
}

type NewRunLog

type NewRunLog struct {
	ID        string
	RunID     string
	Message   string
	Timestamp time.Time
}

type NewToken

type NewToken struct {
	ID      string    `json:"id"`
	Value   string    `json:"value"`
	Active  bool      `json:"active"`
	UserID  string    `json:"user_id"`
	Expires time.Time `json:"expires"`
}

func CreateNewToken

func CreateNewToken(userID string, expiration time.Time) NewToken

type NewUser

type NewUser struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Password string `json:"password,omitempty"`
	Active   bool   `json:"active"`
}

type NewWorkflow

type NewWorkflow struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Code        string       `json:"code"`
	BuildIn     bool         `json:"build_in"`
	FailOnError bool         `json:"fail_on_error"`
	ObjectType  WorkflowType `json:"object_type"`
	Children    []Identifier `json:"children"`
}

func (NewWorkflow) Validate

func (w NewWorkflow) Validate() *apperror.AppError

TODO add more data, what is wrong.

type Run

type Run struct {
	ID         string     `json:"id"`
	Workflow   Identifier `json:"workflow"`
	User       Identifier `json:"user"`
	Error      *string    `json:"error"`
	StartTime  time.Time  `json:"start_time"`
	FinishTime time.Time  `json:"finish_time"`
	RunTime    string     `json:"run_time"`
	Meta       MetaData   `json:"meta"`
}

func (*Run) CalculateRuntime

func (r *Run) CalculateRuntime()

type RunLog

type RunLog struct {
	ID        string    `json:"id"`
	RunID     string    `json:"run_id"`
	Message   string    `json:"message"`
	Timestamp time.Time `json:"timestamp"`
}

type Task

type Task struct {
	ID         string
	WorkflowID string
	UserID     string
	RequestID  string
}

type Token

type Token struct {
	ID      string     `json:"id"`
	Value   string     `json:"value"`
	Active  bool       `json:"active"`
	User    Identifier `json:"user"`
	Expires time.Time  `json:"expires"`
	Meta    MetaData   `json:"meta"`
}

type UpdateWorkflow

type UpdateWorkflow struct {
	Name        *string       `json:"name"`
	Code        *string       `json:"code"`
	BuildIn     *bool         `json:"build_in"`
	FailOnError *bool         `json:"fail_on_error"`
	ObjectType  *WorkflowType `json:"object_type"`
	Children    []Identifier  `json:"children"`
}

type User

type User struct {
	ID       string   `json:"id"`
	Username string   `json:"username"`
	Password string   `json:"password,omitempty"`
	Active   bool     `json:"active"`
	Meta     MetaData `json:"meta"`
}

func (*User) Redact

func (u *User) Redact()

type Workflow

type Workflow struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Code        string       `json:"code"`
	BuildIn     bool         `json:"build_in"`
	FailOnError bool         `json:"fail_on_error"`
	ObjectType  WorkflowType `json:"object_type"`
	Children    []Workflow   `json:"children"`
	Meta        MetaData     `json:"meta"`
}

type WorkflowType

type WorkflowType string
const (
	Javascript WorkflowType = "javascript"
	External   WorkflowType = "external"
	Folder     WorkflowType = "folder"
)

Jump to

Keyboard shortcuts

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