state

package
v0.0.0-...-4be93cc Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLstId

func GetLstId() int64

func Save

func Save(state Store) error

Types

type Job

type Job struct {
	Id         int      `json:"id"`
	Workflow   Workflow `json:"workflow"`
	Created_at string   `json:"created_at"`
	Updated_at string   `json:"updated_at"`
}

type Script

type Script struct {
	Name       string `json:"name"`
	Path       string `json:"path"`
	Created_at string `json:"created_at"`
	Updated_at string `json:"updated_at"`
}

type Server

type Server struct {
	Name        string   `json:"name"`
	Site        string   `json:"site"`
	Description string   `json:"description"`
	Tag         []string `json:"tag"`
	Ipv4        []string `json:"ipv4"`
	Ipv6        []string `json:"ipv6"`
	Hostname    string   `json:"hostname"`
	Created_at  string   `json:"created_at"`
	Updated_at  string   `json:"updated_at"`
}

type St

type St *map[int64]*Store

func Make

func Make(Id int64) St

func Mutate

func Mutate(state St, new Store) St

type Store

type Store struct {
	Job      []Job      `json:"job"`
	Workflow []Workflow `json:"workflow"`
	Server   []Server   `json:"server"`
	Script   []Script   `json:"script"`
}

func CloneStore

func CloneStore(s *Store) Store

func Init

func Init() *Store

func Load

func Load() (Store, error)

TODO: load previous state of program

type Work

type Work struct {
	Id      int               `json:"id"`
	Script  Script            `json:"script"`
	Server  Server            `json:"server"`
	Rel     int               `json:"rel"`
	Inputs  map[string]string `json:"inputs"`
	Outputs map[string]string `json:"outputs"`
}

type Workflow

type Workflow struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Works       []Work `json:"works"`
	Created_at  string `json:"created_at"`
	Updated_at  string `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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