Documentation ¶
Index ¶
- Constants
- type DBCredentials
- type Dao
- type JsonBytesMap
- type PSQLDao
- func (psqlDao *PSQLDao) CreateTask(wf_id int64, name string, hash string, stats string, input JsonBytesMap, ...) (int64, error)
- func (psqlDao *PSQLDao) CreateUser(name string, email string) (int64, error)
- func (psqlDao *PSQLDao) CreateWorkflow(userId int64, lastTaskCompleted int64, definition string, hash string, ...) (int64, error)
- func (psqlDao *PSQLDao) DeleteTask(id int64) error
- func (psqlDao *PSQLDao) DeleteUser(id int64) error
- func (psqlDao *PSQLDao) DeleteWorkflow(id int64) error
- func (psqlDao *PSQLDao) GetAllTasks() ([]Task, error)
- func (psqlDao *PSQLDao) GetAllUsers() ([]User, error)
- func (psqlDao *PSQLDao) GetAllWorkflows() ([]Workflow, error)
- func (psqlDao *PSQLDao) GetTaskById(id int64) (*Task, error)
- func (psqlDao *PSQLDao) GetUserById(id int64) (*User, error)
- func (psqlDao *PSQLDao) GetWorkflowById(id int64) (*Workflow, error)
- func (psqlDao *PSQLDao) KillDao()
- func (psqlDao *PSQLDao) UpdateTask(task *Task) error
- func (psqlDao *PSQLDao) UpdateUser(user *User) error
- func (psqlDao *PSQLDao) UpdateWorkflow(workflow *Workflow) error
- type Task
- type User
- type Workflow
Constants ¶
View Source
const (
PostgresDB = "psql"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBCredentials ¶
type Dao ¶
type Dao interface { GetAllUsers() ([]User, error) CreateUser(name string, email string) (int64, error) UpdateUser(user *User) error DeleteUser(id int64) error GetUserById(id int64) (*User, error) GetAllWorkflows() ([]Workflow, error) CreateWorkflow(userId int64, lastTaskCompleted int64, definition string, hash string, stats string, inputs JsonBytesMap, output string, status string, metadata JsonBytesMap) (int64, error) UpdateWorkflow(workflow *Workflow) error DeleteWorkflow(id int64) error GetWorkflowById(id int64) (*Workflow, error) GetAllTasks() ([]Task, error) CreateTask(wf_id int64, name string, hash string, stats string, input JsonBytesMap, output string, status string, taskError string, wf_status string) (int64, error) UpdateTask(task *Task) error DeleteTask(id int64) error GetTaskById(id int64) (*Task, error) KillDao() }
func DaoFactory ¶
type JsonBytesMap ¶
type JsonBytesMap map[string]interface{}
func (*JsonBytesMap) Scan ¶
func (p *JsonBytesMap) Scan(src interface{}) error
type PSQLDao ¶
func NewPSQLDao ¶
func NewPSQLDao() *PSQLDao
func (*PSQLDao) CreateTask ¶
func (*PSQLDao) CreateUser ¶
func (*PSQLDao) CreateWorkflow ¶
func (*PSQLDao) DeleteTask ¶
func (*PSQLDao) DeleteUser ¶
func (*PSQLDao) DeleteWorkflow ¶
func (*PSQLDao) GetAllTasks ¶
func (*PSQLDao) GetAllUsers ¶
func (*PSQLDao) GetAllWorkflows ¶
func (*PSQLDao) GetWorkflowById ¶
func (*PSQLDao) UpdateTask ¶
func (*PSQLDao) UpdateUser ¶
func (*PSQLDao) UpdateWorkflow ¶
type Task ¶
type Task struct { TaskId int64 `db:"task_id"` WorkFlowID int64 `db:"wf_id"` Name string `db:"name"` Hash string `db:"hash"` Stats string `db:"stats"` Input JsonBytesMap `db:"input"` Output string `db:"output"` Attempt int64 `db:"attempt"` Status string `db:"status"` ReturnCode int64 `db:"return_code"` Error string `db:"error"` WorkFlowStatus string `db:"wf_status"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
type Workflow ¶
type Workflow struct { WorkFlowID int64 `db:"wf_id"` UserId int64 `db:"usr_id"` LastTaskCompleted int64 `db:"last_task_completed"` Definition string `db:"definition"` Hash string `db:"hash"` Stats string `db:"stats"` Inputs JsonBytesMap `db:"inputs"` Outputs string `db:"outputs"` Status string `db:"status"` StartedAt time.Time `db:"started_at"` EndedAt time.Time `db:"ended_at"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` Metadata JsonBytesMap `db:"metadata"` }
Click to show internal directories.
Click to hide internal directories.