Documentation
¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( // ErrNotFound is returned when queried build does not exist ErrNotFound = errors.New("Build not found") // ErrNilProject is returned when a build is created with no project ErrNilProject = errors.New("Project is nil") // ErrContainerType is returned when trying to create an unknwon container type ErrContainerType = errors.New("Invalid container type") // ErrStageType is returned when trying to create an unknwon stage type ErrStageType = errors.New("Invalid stage type") // ErrStageOrder is returned when stage is added in an invalid order. ErrStageOrder = errors.New("Invalid stage order") )
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build interface {
ID() string
ExecutorType() string
ProjectID() string
Script() string
Completed() bool
Stages() []Stage
Created() int64
AddStage(stage Stage) error
Output([]byte) error
Stdout() []byte
}
Build describes a single build
type Container ¶
type Container interface {
Init() error
Close() error
Purge() error
Builds(projectID *string) []string
Build(ID string) (Build, error)
New(b Buildable) (Build, error)
AddStage(buildID string, stage Stage) error
Output(buildID string, output []byte) error
}
Container is the container for builds
func NewContainer ¶
NewContainer creates a new build container
type Stage ¶
type Stage struct {
Type StageType `json:"type"`
Timestamp int64 `json:"timestamp"`
Name string `json:"name"`
Data []byte `json:"-"`
}
Stage is a build stage
func (Stage) ValidateWithPredecessor ¶
ValidateWithPredecessor validates a stage together with its predecessor
Click to show internal directories.
Click to hide internal directories.