Documentation
¶
Overview ¶
Package veladist installs owner-requested, signed Vela releases. It does no background work and is independent of viewer requests.
Index ¶
Constants ¶
View Source
const ( // CacheControlImmutable is sent for content-hashed and version-addressed // static Vela assets whose bytes never change at the same URL. CacheControlImmutable = "public, max-age=31536000, immutable" // CacheControlRevalidate is sent for stable shell documents and unhashed // files whose bytes can change at the same URL across Vela releases. CacheControlRevalidate = "no-cache" )
View Source
const StableURL = "https://github.com/braedonsaunders/vela/releases/download/vela-stable/channel.json"
Variables ¶
View Source
var NextPublicKeyB64 string
View Source
var PublicKeyB64 = productionPublicKeyB64
Functions ¶
func IsImmutableStaticAsset ¶
IsImmutableStaticAsset reports whether rel identifies a static Vela asset whose URL is content-hashed or version-addressed so browsers can cache it immutably for a year. HTML documents, web manifests, service workers, and stable shell files are never immutable.
func StaticCacheControl ¶
StaticCacheControl returns the HTTP Cache-Control header value for a static file served under /vela/ at path rel (relative to the installed Vela root).
Types ¶
type Release ¶
type Release struct {
SchemaVersion int `json:"schemaVersion"`
Kind string `json:"kind"`
Channel string `json:"channel"`
Version string `json:"version"`
PublishedAt time.Time `json:"publishedAt"`
ExpiresAt time.Time `json:"expiresAt"`
SourceRevision string `json:"sourceRevision"`
SourceDirty *bool `json:"sourceDirty"`
Protocol struct {
MinInclusive *int `json:"minInclusive"`
MaxInclusive *int `json:"maxInclusive"`
} `json:"protocol"`
MinimumEtherVersion string `json:"minimumEtherVersion"`
Archive Asset `json:"archive"`
Manifest Asset `json:"manifest"`
Engines map[string]struct {
Manifest Asset `json:"manifest"`
} `json:"engines"`
UniversalRuntimeKey string `json:"universalRuntimeKey"`
}
type Status ¶
type Status struct {
InstalledVersion string `json:"installedVersion"`
AvailableVersion string `json:"availableVersion"`
Installed bool `json:"installed"`
RollbackAvailable bool `json:"rollbackAvailable"`
Busy bool `json:"busy"`
Phase string `json:"phase"`
Downloaded int64 `json:"downloaded"`
Total int64 `json:"total"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.