store

package
v0.0.1-0...-bc4131f Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Commit string    `json:"commit"`
	Ref    string    `json:"ref"`
	Start  time.Time `json:"start"`
	End    time.Time `json:"end"`
	Status Status    `json:"status"`
	// contains filtered or unexported fields
}

func (*Build) ForEachJob

func (b *Build) ForEachJob(fun func(*Job))

func (*Build) GetId

func (b *Build) GetId() uint64

func (*Build) NewJob

func (b *Build) NewJob(name string) (*Job, error)

func (*Build) Update

func (b *Build) Update(fun func()) error

type Job

type Job struct {
	Status       Status            `json:"status"`
	Start        time.Time         `json:"start"`
	End          time.Time         `json:"end"`
	Script       string            `json:"script"`
	Runner       string            `json:"runner"`
	RunnerConfig map[string]string `json:"runner_config"`
	Env          []string          `json:"env"`
	Error        string            `json:"error"`
	// contains filtered or unexported fields
}

func (*Job) GetDataReader

func (j *Job) GetDataReader() (io.ReadCloser, error)

func (*Job) GetDataWriter

func (j *Job) GetDataWriter() (io.WriteCloser, error)

func (*Job) GetName

func (j *Job) GetName() string

func (*Job) Update

func (j *Job) Update(fun func()) error

type Repository

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

func (*Repository) ForEachBuild

func (r *Repository) ForEachBuild(fun func(*Build))

func (*Repository) GetDescription

func (r *Repository) GetDescription() string

func (*Repository) GetName

func (r *Repository) GetName() string

func (*Repository) GetNextBuildId

func (r *Repository) GetNextBuildId() uint64

func (*Repository) GetURL

func (r *Repository) GetURL() string

func (*Repository) NewBuild

func (r *Repository) NewBuild(commit string, ref string) (*Build, error)

type Status

type Status byte
const (
	Pending Status = iota
	Running
	Passed
	Error
	Failed
)

type Store

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

func NewStore

func NewStore(dir string) (*Store, error)

func (*Store) GetRepository

func (s *Store) GetRepository(name string) (*Repository, error)

func (*Store) ListRepositories

func (s *Store) ListRepositories() []string

func (*Store) NewRepository

func (s *Store) NewRepository(name string, url string, description string) error

Jump to

Keyboard shortcuts

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