Documentation
¶
Index ¶
- Constants
- Variables
- type Action
- type Build
- type Dep
- type Duration
- type Event
- type File
- type Isolation
- type Meta
- type Milestone
- type Model
- func (m *Model) CreateStatsIfNotExists() (*Stats, error)
- func (m *Model) FindDepByID(id string) (*Dep, error)
- func (m *Model) FindIsolationByID(ID string) (*Isolation, error)
- func (m *Model) FindIsolationByName(name string) (*Isolation, error)
- func (m *Model) GetAllDeps() ([]*Dep, error)
- func (m *Model) GetAllIsolations() ([]*Isolation, error)
- func (m *Model) GetDBMetaData() (*Meta, error)
- func (m *Model) GetIsolationDepsAndStates(iso *Isolation) (map[*Dep]*State, error)
- func (m *Model) InsertDep(dep *Dep) error
- func (m *Model) InsertIsolation(iso *Isolation) error
- func (m *Model) PersistStats() error
- func (m *Model) RemoveDep(dep *Dep) error
- func (m *Model) RemoveDepStateByID(dep *Dep, sid string) error
- func (m *Model) RemoveIsolation(iso *Isolation) error
- func (m *Model) Subscribe(ch chan Event)
- func (m *Model) UpdateDep(dep *Dep) error
- func (m *Model) UpdateDepWithNewState(dep *Dep, sname string) error
- func (m *Model) UpdateIsolation(iso *Isolation) error
- func (m *Model) UpsertDefaultIsolationIfNotExists() error
- func (m *Model) UpsertMetadataIfNotExists() error
- type Output
- type RegexpPattern
- type Run
- type State
- type StateSettings
- type Stats
- type Template
Constants ¶
View Source
const ( ActionCreated = Action(1) ActionRemoved = Action(2) ActionUpdate = Action(3) )
Variables ¶
View Source
var DatabaseMetaKey = "_db"
View Source
var DefaultIsolationID = "default"
View Source
var DefaultStateID = "default"
View Source
var DepBucketName = "deps"
View Source
var ( FirstDep = Milestone{"first_dep", func(s *Stats) bool { return s.NrOfDepsCreated > 0 }, false} )
View Source
var IsolationBucketName = "isolations"
View Source
var MetaBucketName = "meta"
View Source
var StatsMetaKey = "_stats"
Functions ¶
This section is empty.
Types ¶
type Build ¶ added in v0.2.1
type Dep ¶
type Dep struct {
ID string `json:"id"`
Name string `json:"name"`
States []*State `json:"states"`
Template *Template `json:"template"`
}
func NewDepFromSerialized ¶
func (*Dep) UpdateState ¶ added in v0.2.1
type Duration ¶ added in v0.3.1
A JSON Serializable time duration
func (Duration) MarshalJSON ¶ added in v0.3.1
func (*Duration) UnmarshalJSON ¶ added in v0.3.1
type Isolation ¶
type Isolation struct {
ID string `json:"id"`
Name string `json:"name"`
States map[string]string `json:"states"`
}
func NewIsolation ¶
type Meta ¶
type Meta struct {
ID string `json:"name"`
}
db meta struct contains meta information about the db itself
func NewMetaFromSerialized ¶
type Milestone ¶ added in v0.4.1
type Milestone struct {
ID string `json:"id"`
IsUnlocked func(*Stats) bool `json:"-"`
Shown bool `json:"shown"`
}
func Milestones ¶ added in v0.4.1
func Milestones() []Milestone
type Model ¶
type Model struct {
DBPath string
Stats *Stats
Events chan Event
Out []chan Event
// contains filtered or unexported fields
}
func (*Model) CreateStatsIfNotExists ¶ added in v0.4.1
func (*Model) FindIsolationByID ¶ added in v0.1.2
func (*Model) FindIsolationByName ¶
func (*Model) GetAllDeps ¶
func (*Model) GetAllIsolations ¶
func (*Model) GetDBMetaData ¶
func (*Model) GetIsolationDepsAndStates ¶
func (*Model) InsertIsolation ¶
func (*Model) PersistStats ¶ added in v0.4.1
func (*Model) RemoveDepStateByID ¶ added in v0.3.1
func (*Model) RemoveIsolation ¶
func (*Model) UpdateDepWithNewState ¶ added in v0.4.1
func (*Model) UpdateIsolation ¶
func (*Model) UpsertDefaultIsolationIfNotExists ¶ added in v0.4.1
func (*Model) UpsertMetadataIfNotExists ¶ added in v0.4.1
type Output ¶ added in v0.2.1
A JSON Serializable output buffer
func (*Output) MarshalJSON ¶ added in v0.2.1
type RegexpPattern ¶ added in v0.3.1
A JSON Serializable regexp pattern
func (RegexpPattern) MarshalJSON ¶ added in v0.3.1
func (r RegexpPattern) MarshalJSON() ([]byte, error)
func (*RegexpPattern) UnmarshalJSON ¶ added in v0.3.1
func (r *RegexpPattern) UnmarshalJSON(data []byte) error
type Run ¶ added in v0.3.1
type Run struct {
ID string `json:"id"`
State State `json:"state"`
ContainerID string `json:"container_id"`
Error string `json:"error"`
IsReady bool `json:"is_ready"`
Output *Output `json:"output"`
ContainerInfo *dockerclient.ContainerInfo `json:"container_info"`
}
type State ¶
type StateSettings ¶ added in v0.3.1
type StateSettings struct {
ReadyTimeout Duration `json:"ready_timeout"`
ReadyPattern *RegexpPattern `json:"ready_pattern"`
HostConfig *dockerclient.HostConfig `json:"host_config"`
ContainerConfig *dockerclient.ContainerConfig `json:"container_config"`
}
type Stats ¶ added in v0.4.1
type Stats struct {
NrOfDepsCreated int `json:"nr_of_deps_created"`
Achievements map[string]Milestone `json:"achievements"`
}
func NewStatsFromSerialized ¶ added in v0.4.1
func (*Stats) UpdateAchievements ¶ added in v0.4.1
func (s *Stats) UpdateAchievements()
Click to show internal directories.
Click to hide internal directories.