store

package
v0.0.0-...-e7719e2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2018 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildAct

type BuildAct int
const (
	BuildActCreate BuildAct = iota
	BuildActUpdate
	BuildActChange
	BuildActDestroy
)

func (BuildAct) String

func (a BuildAct) String() string

type BuildResult

type BuildResult struct {
	Start  time.Time
	End    time.Time
	Act    BuildAct
	Stdout []byte
	Stderr []byte
	Retval int
	Ticket int64
	Cmd    string
	Stage  string
	Branch string
	SHA1   string
}

type Memory

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

func NewMemory

func NewMemory() *Memory

func (*Memory) Add

func (b *Memory) Add(br *BuildResult) error

func (*Memory) Clean

func (b *Memory) Clean(until time.Time) error

func (*Memory) Delete

func (b *Memory) Delete(stage string) error

func (*Memory) Get

func (b *Memory) Get(stage string) ([]*BuildResult, error)

type Mysql

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

func NewMysql

func NewMysql(dsn, tableName string) (*Mysql, error)

func (*Mysql) Add

func (m *Mysql) Add(br *BuildResult) error

func (*Mysql) Clean

func (m *Mysql) Clean(until time.Time) error

func (*Mysql) Delete

func (m *Mysql) Delete(stage string) error

func (*Mysql) Get

func (m *Mysql) Get(stage string) ([]*BuildResult, error)

type Store

type Store interface {
	Add(br *BuildResult) error
	Get(stage string) ([]*BuildResult, error)
	Delete(stage string) error
	Clean(until time.Time) error
}

Jump to

Keyboard shortcuts

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