store

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStore

type DataStore interface {
	Save(key string, data *Stage) error
	Delete(key string) error
	Load() ([]Stage, error)
}

type DiskStore

type DiskStore struct {
	RootDir string
	// contains filtered or unexported fields
}

func NewDisk

func NewDisk(dir string) *DiskStore

func (*DiskStore) Delete

func (d *DiskStore) Delete(key string) error

func (*DiskStore) Load

func (d *DiskStore) Load() ([]Stage, error)

func (*DiskStore) Save

func (d *DiskStore) Save(key string, data *Stage) error

type Edge

type Edge struct {
	ID     uuid.UUID  `json:"id"`
	Source EdgeTarget `json:"source"`
	Target EdgeTarget `json:"target"`
	Type   string     `json:"type"`
}

type EdgeTarget

type EdgeTarget struct {
	ID        uuid.UUID `json:"id"`
	Type      string    `json:"type"`
	Connector string    `json:"connector"`
}

type MemStore

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

func NewMemory

func NewMemory() *MemStore

func (*MemStore) Delete

func (d *MemStore) Delete(key string) error

func (*MemStore) Load

func (d *MemStore) Load() ([]Stage, error)

func (*MemStore) Reset

func (d *MemStore) Reset()

func (*MemStore) Save

func (d *MemStore) Save(key string, data *Stage) error

type Node

type Node struct {
	ID        string          `json:"id"`
	Name      string          `json:"name"`
	Type      string          `json:"type"`
	Labels    []string        `json:"labels"`
	Connector []NodeConnector `json:"connector"`
	Children  []string        `json:"children"`
	Bounds    NodeBounds      `json:"bounds"`
}

type NodeBounds

type NodeBounds struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type NodeConnector

type NodeConnector struct {
	ID    uuid.UUID `json:"id"`
	Name  string    `json:"name"`
	Label string    `json:"label"`
}

type Stage

type Stage struct {
	ID    uuid.UUID `json:"id"`
	Name  string    `json:"name"`
	Edges []Edge    `json:"edges"`
	Nodes []Node    `json:"nodes"`
}

Jump to

Keyboard shortcuts

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