v1

package
v0.0.0-...-305ec12 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2015 License: MIT Imports: 4 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 {
	ID         string `json:"id"`
	ProjectKey string `json:"projectKey"`
	Branch     string `json:"branch"`
	Result     int    `json:"result"`
	Duration   uint64 `json:"duration"`
	UnixTime   uint64 `json:"startTime"`
}

Build models the historical build information available to Decap in the backing storage system.

type Builds

type Builds struct {
	Meta
	Builds []Build `json:"builds"`
}

Builds is a collection of historical Build's.

type Deferred

type Deferred struct {
	Meta
	DeferredEvents []UserBuildEvent `json:"deferred"`
}

Deferred models a deferred build. Builds are deferred when they cannot get a lock on their backing branch. Decap uses locks to prevent concurrent builds of the same branch.

type Meta

type Meta struct {
	Error string `json:"error,omitempty"`
}

Meta models fields common to most publicly exposed types.

type Project

type Project struct {
	Team        string            `json:"team"`
	ProjectName string            `json:"project"`
	Descriptor  ProjectDescriptor `json:"descriptor,omitempty"`
	Sidecars    []string          `json:"sidecars,omitempty"`
}

Project models a specific project. Sidecars are literal Kubernetes container specs articulated in JSON. A user can include any amount of detail in the side car spec, which will be deserialized into a native Kubernetes container type for inclusion in the materialized build pod.

type ProjectDescriptor

type ProjectDescriptor struct {
	// Image is the container image the associated project should be built in.
	Image string `json:"buildImage"`
	// RepoManager is the source code management system the project source is contained in.
	RepoManager string `json:"repoManager"`
	// RepoURL is largely informational for the human managing this project.  It is currently unused by Decap.
	RepoURL string `json:"repoUrl"`
	// RepoDescription is a human readable description of this project.
	RepoDescription string `json:"repoDescription"`
	// ManagedRegexStr is a regular expression that defines which refs (branches and tags) is willing to build as a result of
	// a post-commit hook.  Manual builds are not subject to this regex.
	ManagedRefRegexStr string `json:"managedRefRegex"`
	// The formal regex associated with ManagedRefRegexStr above.
	Regex *regexp.Regexp
}

ProjectDescriptor models required information about a project.

func (ProjectDescriptor) IsRefManaged

func (d ProjectDescriptor) IsRefManaged(ref string) bool

IsRefManaged is used by Decap to determine if a build should be launched as a result of a post-commit hook on a given ref.

type Projects

type Projects struct {
	Meta
	Projects []Project `json:"projects"`
}

Projects models the collection of projects managed by Decap

type Ref

type Ref struct {
	RefID string `json:"ref"`
	Type  string `json:"type"`
}

Ref models a git branch or tag.

type Refs

type Refs struct {
	Meta
	Refs []Ref `json:"refs"`
}

Refs models a collection of logical Ref's.

type ShutdownState

type ShutdownState struct {
	Meta
	State string `json:"state"`
}

ShutdownState models whether the build queue is open or closed.

type Team

type Team struct {
	Name string `json:"name"`
}

Team models the name of a group of developers or a project.

type Teams

type Teams struct {
	Meta
	Teams []Team `json:"teams"`
}

Teams models a collection of logical Team's.

type UserBuildEvent

type UserBuildEvent struct {
	Team_    string         `json:"team"`
	Project_ string         `json:"project"`
	Refs_    []string       `json:"refs"`
	Deferral locks.Deferral `json:"deferral"`
}

UserBuildEvent models an abstract build, independent of the source code management system that backs it.

func (UserBuildEvent) Hash

func (e UserBuildEvent) Hash() string

func (UserBuildEvent) Key

func (e UserBuildEvent) Key() string

func (UserBuildEvent) Project

func (e UserBuildEvent) Project() string

func (UserBuildEvent) Refs

func (e UserBuildEvent) Refs() []string

func (UserBuildEvent) Team

func (e UserBuildEvent) Team() string

type Version

type Version struct {
	Meta
	Version string `json:"version"`
	Commit  string `json:"commit"`
	Date    string `json:"date"`
	SDK     string `json:"sdk"`
}

Version models the version of Decap

Jump to

Keyboard shortcuts

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