Documentation
¶
Index ¶
- Constants
- func DefaultPath() string
- type Definition
- type Edge
- type Node
- type Run
- type Store
- func (s *Store) Get(name string) (Definition, bool)
- func (s *Store) GetRun(id string) (Run, bool)
- func (s *Store) Install(def Definition) (Definition, error)
- func (s *Store) InstallFile(path string) (Definition, error)
- func (s *Store) List() []Definition
- func (s *Store) Resume(id string) (Run, error)
- func (s *Store) Run(name string) (Run, error)
- func (s *Store) Save() error
- func (s *Store) Stop(id string) error
Constants ¶
View Source
const ( RunStatusRunning = "running" RunStatusStopped = "stopped" )
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
Types ¶
type Definition ¶
type Definition struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Nodes []Node `json:"nodes" yaml:"nodes"`
Edges []Edge `json:"edges,omitempty" yaml:"edges,omitempty"`
Source string `json:"source,omitempty" yaml:"-"`
CreatedAt time.Time `json:"createdAt" yaml:"-"`
UpdatedAt time.Time `json:"updatedAt" yaml:"-"`
}
type Store ¶
type Store struct {
Definitions map[string]Definition `json:"definitions"`
Runs map[string]Run `json:"runs"`
// contains filtered or unexported fields
}
func LoadDefault ¶
func (*Store) Install ¶
func (s *Store) Install(def Definition) (Definition, error)
func (*Store) InstallFile ¶
func (s *Store) InstallFile(path string) (Definition, error)
func (*Store) List ¶
func (s *Store) List() []Definition
Click to show internal directories.
Click to hide internal directories.