Documentation
¶
Index ¶
- func AuthHandler(h dashHandler) http.HandlerFunc
- func PutLog(c appengine.Context, text string) (hash string, err error)
- type BuilderKey
- type Commit
- func (com *Commit) AddResult(c appengine.Context, r *Result) error
- func (com *Commit) Key(c appengine.Context) *datastore.Key
- func (c *Commit) OK(builder, goHash string) (ok, present bool)
- func (c *Commit) Result(builder, goHash string) *Result
- func (c *Commit) Results(goHash string) (results []*Result)
- func (c *Commit) Valid() error
- type Log
- type Package
- type PackageState
- type Pagination
- type Result
- type Tag
- type TagState
- type Todo
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.
Types ¶
type BuilderKey ¶
type BuilderKey struct {
Secret string
}
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 ¶
AddResult adds the denormalized Reuslt data to the Commit's Result field. It must be called from inside a datastore transaction.
func (*Commit) Result ¶
Result returns the build Result for this Commit for the given builder/goHash.
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.
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
Installs int // All-time total install count
InstallsByDay []string `datastore:",noindex"` // "yyyy-mm-dd,n"
InstallsThisWeek int // Rolling weekly count
}
A Package describes a package that is listed on the dashboard.
func GetPackage ¶
GetPackage fetches a Package by path from the datastore.
func Packages ¶
Packages returns packages of the specified kind. Kind must be one of "external" or "subrepo".
func (*Package) IncrementInstalls ¶
func (p *Package) IncrementInstalls()
IncrementInstalls increments the total install count and today's install count. Daily install counts for dates older than 30 days are discarded.
func (*Package) LastCommit ¶
LastCommit returns the most recent Commit for this Package.
func (*Package) UpdateInstallsThisWeek ¶
func (p *Package) UpdateInstallsThisWeek()
UpdateInstallsThisWeek updates the package's InstallsThisWeek field using data from the InstallsByDay list.
type PackageState ¶
PackageState represents the state of a Package at a Tag.
type Pagination ¶
type Result ¶
type Result struct {
Builder string // "arch-os[-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.
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.
type TagState ¶
type TagState struct {
Tag *Commit
Packages []*PackageState
}
TagState represents the state of all Packages at a Tag.