models

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Waiting int = iota
	Ready
	Succeeded
	Failed
	Interrupted
)

Variables

View Source
var CommandTypes = []string{"sh", "psql"}

Functions

This section is empty.

Types

type Command

type Command struct {
	Text       string
	File       string
	Type       string
	URI        string
	Connection string
}

func (Command) Run

func (c Command) Run() TaskResult

func (Command) VerifyType

func (c Command) VerifyType() error

type Connection

type Connection struct {
	Name     string `yaml:"name"`
	URI      string `yaml:"uri"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Dbname   string `yaml:"dbname"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

func (Connection) CombinedURI

func (c Connection) CombinedURI() string

type Connections

type Connections []Connection

func (Connections) GetURIByName

func (c Connections) GetURIByName(name string) (string, error)

type StatusMap

type StatusMap struct {
	// contains filtered or unexported fields
}

func (*StatusMap) Load

func (dm *StatusMap) Load(taskID int) int

func (*StatusMap) Store

func (dm *StatusMap) Store(taskID int, newStatus int)

type Task

type Task struct {
	ID      int
	Name    string
	Command Command
	Depends []int
	QueryID int
}

func (Task) VerifyDependencies

func (t Task) VerifyDependencies(identifiers []int) error

func (Task) VerifyRequired

func (t Task) VerifyRequired() error

type TaskResult

type TaskResult struct {
	ID        int
	QueryID   int
	WorkerID  int
	StartTime time.Time
	EndTime   time.Time
	Elapsed   time.Duration
	Status    int
	Output    string
	Error     string
}

Jump to

Keyboard shortcuts

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