build

package
v0.0.0-...-2b9d83f Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2013 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthHandler

func AuthHandler(h dashHandler) http.HandlerFunc

AuthHandler wraps a http.HandlerFunc with a handler that validates the supplied key and builder query parameters.

func PutLog

func PutLog(c appengine.Context, text string) (hash string, err error)

Types

type BuilderKey

type BuilderKey struct {
	Secret string
}

func (*BuilderKey) Key

type Commit

type Commit struct {
	PackagePath string // (empty for Go commits)
	Hash        string
	ParentHash  string
	Num         int // Internal monotonic counter unique to this package.

	User string
	Desc string `datastore:",noindex"`
	Time time.Time

	// ResultData is the Data string of each build Result for this Commit.
	// For non-Go commits, only the Results for the current Go tip, weekly,
	// and release Tags are stored here. This is purely de-normalized data.
	// The complete data set is stored in Result entities.
	ResultData []string `datastore:",noindex"`

	FailNotificationSent bool
}

A Commit describes an individual commit in a package.

Each Commit entity is a descendant of its associated Package entity. In other words, all Commits with the same PackagePath belong to the same datastore entity group.

func (*Commit) AddResult

func (com *Commit) AddResult(c appengine.Context, r *Result) error

AddResult adds the denormalized Reuslt data to the Commit's Result field. It must be called from inside a datastore transaction.

func (*Commit) Key

func (com *Commit) Key(c appengine.Context) *datastore.Key

func (*Commit) Result

func (c *Commit) Result(builder, goHash string) *Result

Result returns the build Result for this Commit for the given builder/goHash.

func (*Commit) Results

func (c *Commit) Results(goHash string) (results []*Result)

Results returns the build Results for this Commit for the given goHash.

func (*Commit) Valid

func (c *Commit) Valid() error

type Log

type Log struct {
	CompressedLog []byte
}

A Log is a gzip-compressed log file stored under the SHA1 hash of the uncompressed log text.

func (*Log) Text

func (l *Log) Text() ([]byte, error)

type Package

type Package struct {
	Kind    string // "subrepo", "external", or empty for the main Go tree
	Name    string
	Path    string // (empty for the main Go tree)
	NextNum int    // Num of the next head Commit
}

A Package describes a package that is listed on the dashboard.

func GetPackage

func GetPackage(c appengine.Context, path string) (*Package, error)

GetPackage fetches a Package by path from the datastore.

func Packages

func Packages(c appengine.Context, kind string) ([]*Package, error)

Packages returns packages of the specified kind. Kind must be one of "external" or "subrepo".

func (*Package) Key

func (p *Package) Key(c appengine.Context) *datastore.Key

func (*Package) LastCommit

func (p *Package) LastCommit(c appengine.Context) (*Commit, error)

LastCommit returns the most recent Commit for this Package.

func (*Package) String

func (p *Package) String() string

type PackageState

type PackageState struct {
	Package *Package
	Commit  *Commit
}

PackageState represents the state of a Package at a Tag.

type Pagination

type Pagination struct {
	Next, Prev int
	HasPrev    bool
}

type Result

type Result struct {
	Builder     string // "os-arch[-note]"
	Hash        string
	PackagePath string // (empty for Go commits)

	// The Go Commit this was built against (empty for Go commits).
	GoHash string

	OK      bool
	Log     string `datastore:"-"`        // for JSON unmarshaling only
	LogHash string `datastore:",noindex"` // Key to the Log record.

	RunTime int64 // time to build+test in nanoseconds
}

A Result describes a build result for a Commit on an OS/architecture.

Each Result entity is a descendant of its associated Commit entity.

func (*Result) Data

func (r *Result) Data() string

Data returns the Result in string format to be stored in Commit's ResultData field.

func (*Result) Key

func (r *Result) Key(c appengine.Context) *datastore.Key

func (*Result) Valid

func (r *Result) Valid() error

type Tag

type Tag struct {
	Kind string // "weekly", "release", or "tip"
	Name string // the tag itself (for example: "release.r60")
	Hash string
}

A Tag is used to keep track of the most recent Go weekly and release tags. Typically there will be one Tag entity for each kind of hg tag.

func GetTag

func GetTag(c appengine.Context, tag string) (*Tag, error)

GetTag fetches a Tag by name from the datastore.

func (*Tag) Commit

func (t *Tag) Commit(c appengine.Context) (*Commit, error)

Commit returns the Commit that corresponds with this Tag.

func (*Tag) Key

func (t *Tag) Key(c appengine.Context) *datastore.Key

func (*Tag) Valid

func (t *Tag) Valid() error

type TagState

type TagState struct {
	Tag      *Commit
	Packages []*PackageState
}

TagState represents the state of all Packages at a Tag.

func TagStateByName

func TagStateByName(c appengine.Context, name string) (*TagState, error)

TagStateByName fetches the results for all Go subrepos at the specified Tag.

type Todo

type Todo struct {
	Kind string // "build-go-commit" or "build-package"
	Data interface{}
}

Todo is a todoHandler response.

Jump to

Keyboard shortcuts

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