Documentation ¶
Index ¶
- Constants
- func AnnounceBuild(keybaseToken string, buildA string, buildB string, platform string) error
- func CombineErrors(errs ...error) error
- func CopyLatest(bucketName string, platform string, dryRun bool) error
- func EncodeJSON(version string, name string, descriptionPath string, props []string, ...) ([]byte, error)
- func FromTime(t Time) time.Time
- func KBWebPromote(keybaseToken string, buildA string, platform string, dryRun bool) (releaseTime time.Time, err error)
- func PromoteTestReleases(bucketName string, platformName string, release string) error
- func RandBytes(length int) ([]byte, error)
- func RandomID() (string, error)
- func ReleaseBroken(releaseName string, bucketName string, platformName string) ([]string, error)
- func RemoveNilErrors(errs []error) []error
- func Report(bucketName string, writer io.Writer) error
- func SaveLog(bucketName string, localPath string, maxNumBytes int64) (string, error)
- func SetBuildInTesting(keybaseToken string, buildA string, platform string, inTesting string, ...) error
- func WriteHTML(bucketName string, prefixes string, suffix string, outPath string, ...) error
- func WriteHTMLForLinks(title string, sections []Section, writer io.Writer) error
- type APIResponseWrapper
- type AppResponseBase
- type Asset
- type ByRelease
- type Client
- func (c *Client) CopyLatest(bucketName string, platform string, dryRun bool) error
- func (c *Client) CurrentUpdate(bucketName string, channel string, platformName string, env string) (currentUpdate *Update, path string, err error)
- func (c *Client) PromoteRelease(bucketName string, delay time.Duration, beforeHourEastern int, ...) (*Release, error)
- type Platform
- type Property
- type Release
- type Section
- type Time
- type Type
- type Update
Constants ¶
const ( // PlatformTypeDarwin is platform type for OS X PlatformTypeDarwin = "darwin" // PlatformTypeLinux is platform type for Linux PlatformTypeLinux = "linux" // PlatformTypeWindows is platform type for windows PlatformTypeWindows = "windows" )
Variables ¶
This section is empty.
Functions ¶
func AnnounceBuild ¶
AnnounceBuild tells the API server about the existence of a new build. It does not enroll it in smoke testing.
func CombineErrors ¶
CombineErrors returns a single error for multiple errors, or nil if none
func CopyLatest ¶
CopyLatest copies latest release to a fixed path
func EncodeJSON ¶
func EncodeJSON(version string, name string, descriptionPath string, props []string, src string, uri fmt.Stringer, signaturePath string) ([]byte, error)
EncodeJSON returns JSON (as bytes) for an update
func KBWebPromote ¶
func KBWebPromote(keybaseToken string, buildA string, platform string, dryRun bool) (releaseTime time.Time, err error)
KBWebPromote tells the API server that a new build is promoted.
func PromoteTestReleases ¶
PromoteTestReleases creates test releases for a platform
func ReleaseBroken ¶
ReleaseBroken marks a release as broken. The releaseName is the version, for example, 1.2.3+400-deadbeef.
func RemoveNilErrors ¶
RemoveNilErrors returns error slice with nil errors removed
func SaveLog ¶
SaveLog saves log to S3 bucket (last maxNumBytes) and returns the URL. The log is publicly readable on S3 but the url is not discoverable.
func SetBuildInTesting ¶
func SetBuildInTesting(keybaseToken string, buildA string, platform string, inTesting string, maxTesters int) error
SetBuildInTesting tells the API server to enroll or unenroll a build in smoke testing.
Types ¶
type APIResponseWrapper ¶
type APIResponseWrapper interface {
StatusCode() int
}
type AppResponseBase ¶
func (*AppResponseBase) StatusCode ¶
func (s *AppResponseBase) StatusCode() int
type Asset ¶
type Asset struct { Name string `codec:"name" json:"name"` URL string `codec:"url" json:"url"` Digest string `codec:"digest" json:"digest"` Signature string `codec:"signature" json:"signature"` LocalPath string `codec:"localPath" json:"localPath"` }
Asset describes a downloadable file.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an S3 client
func (*Client) CopyLatest ¶
CopyLatest copies latest release to a fixed path for the Client
type Platform ¶
type Platform struct { Name string Prefix string PrefixSupport string Suffix string LatestName string }
Platform defines where platform specific files are (in darwin, linux, windows)
func Platforms ¶
Platforms returns platforms for a name (linux may have multiple platforms) or all platforms is "" is specified
func (*Platform) FindRelease ¶
FindRelease searches for a release matching a predicate
type Property ¶
type Property struct { Name string `codec:"name" json:"name"` Value string `codec:"value" json:"value"` }
Property is a generic key value pair for custom properties
type Release ¶
type Release struct { Name string Key string URL string Version string DateString string Date time.Time Commit string }
Release defines a release bundle
type Update ¶
type Update struct { Version string `codec:"version" json:"version"` Name string `codec:"name" json:"name"` Description string `codec:"description" json:"description"` Instructions *string `codec:"instructions,omitempty" json:"instructions,omitempty"` Type Type `codec:"type" json:"type"` PublishedAt *Time `codec:"publishedAt,omitempty" json:"publishedAt,omitempty"` Props []Property `codec:"props" json:"props,omitempty"` Asset *Asset `codec:"asset,omitempty" json:"asset,omitempty"` }
Update defines an update