v1

package
v0.0.0-...-7d5e071 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MIT Imports: 2 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 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.

func (Project) Key

func (t Project) Key() string

Key returns the project full key, typically to index a build result in backing storage.

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 `json:"-"`
}

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. TODO code does not belong in a types.go file.

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 {
	Meta

	// Team is the github account owner or BitBucket project key.
	Team string `json:"team"`

	// Project is the git repository basename.
	Project string `json:"project"`

	// Ref is the branch or tag to be built.
	Ref string `json:"ref"`

	// ID is an opaque build ID assigned when a build is scheduled.
	ID string `json:"id"`

	// DeferredUnixTime is the time at which a build is deferred, if at all.
	DeferredUnixtime int64 `json:"deferred-unixtime"`
}

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

func (UserBuildEvent) Lockname

func (e UserBuildEvent) Lockname() string

Lockname returns the build locknae, which is the ProjectKey concatenated with "/" followed by the branch.

func (UserBuildEvent) ProjectKey

func (e UserBuildEvent) ProjectKey() string

ProjectKey returns a key that identifies the codebase. For github projects, this is the github account owner concatenated with "/" followed by the basename of the repository.

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