Documentation
¶
Overview ¶
Package assets defines JSON contracts for Microsoft build of Go artifacts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arch ¶
type Arch struct {
// Env identifies the target environment for a binary artifact.
// Env is nil for a source archive.
Env *ArchEnv `json:"env,omitempty"`
// SHA256 is the hexadecimal SHA-256 digest of the artifact at URL.
SHA256 string `json:"sha256"`
// Supported indicates that Docker tooling should generate an image for this artifact. The field
// name matches the upstream Go image format.
Supported bool `json:"supported,omitempty"`
// URL is the download URL for the artifact.
URL string `json:"url"`
// SHA256ChecksumURL is the download URL for a checksum file accepted by "sha256sum -c". An
// empty value indicates URL with ".sha256" appended.
SHA256ChecksumURL string `json:"sha256ChecksumUrl,omitempty"`
// PGPSignatureURL is the download URL for the artifact's PGP signature. An empty value
// indicates URL with ".sig" appended.
PGPSignatureURL string `json:"pgpSignatureUrl,omitempty"`
}
Arch describes one downloadable build artifact.
type ArchEnv ¶
type ArchEnv struct {
// GOARCH is the target architecture.
GOARCH string `json:",omitempty"`
// GOARM is the target ARM architecture version.
GOARM string `json:",omitempty"`
// GOOS is the target operating system.
GOOS string `json:",omitempty"`
}
ArchEnv identifies the Go target environment for a binary artifact.
type ArtifactKind ¶
type ArtifactKind string
ArtifactKind identifies the type of artifact referenced by a LatestLink.
const ( // Archive identifies a ".zip" or ".tar.gz" toolset archive for a specific platform. Archive ArtifactKind = "archive" // Installer identifies a platform-specific installer. The project doesn't currently produce any // installers. Installer ArtifactKind = "installer" // Source identifies a ".tar.gz" source archive. Source ArtifactKind = "source" // Manifest identifies a JSON file that contains a [ToolsetBuild]. Manifest ArtifactKind = "manifest" )
type Branch ¶
type Branch struct {
// Version is the Go major and minor version for the branch, such as "1.20".
Version string `json:"version,omitempty"`
// Stable indicates that the branch contains a stable release.
Stable bool `json:"stable,omitempty"`
// LatestStable indicates that the branch contains the most recent stable release.
LatestStable bool `json:"latestStable,omitempty"`
// PreviousStable indicates that the branch contains the stable release immediately before the
// latest one.
PreviousStable bool `json:"previousStable,omitempty"`
// Files contains the links for the latest artifacts available from the branch.
Files []*LatestLink `json:"files,omitempty"`
}
Branch describes the support status and available artifacts for one branch of the Microsoft build of Go.
type LatestLink ¶
type LatestLink struct {
// Filename is the name of the artifact.
Filename string `json:"filename"`
// OS is the target operating system, if the artifact is platform-specific.
OS string `json:"os,omitempty"`
// Arch is the target architecture, if the artifact is platform-specific.
Arch string `json:"arch,omitempty"`
// Version is the full Go version available through URL.
Version string `json:"version"`
// Kind identifies the type of artifact.
Kind ArtifactKind `json:"kind"`
// URL is the aka.ms URL for the latest patch version of the artifact.
URL string `json:"url,omitempty"`
// ChecksumURL is the aka.ms URL for the artifact's checksum file. ChecksumURL is empty if the
// artifact has no checksum file.
ChecksumURL string `json:"checksumURL,omitempty"`
// SignatureURL is the aka.ms URL for the artifact's signature file. SignatureURL is empty if
// the artifact has no signature file.
SignatureURL string `json:"signatureURL,omitempty"`
}
LatestLink describes the stable URLs for the latest version of one artifact on a branch.
During a release, aka.ms links can change between downloads, so a checksum or signature downloaded after the artifact can refer to a different build. To avoid this race, download the Manifest artifact first and use the URLs from the resulting ToolsetBuild.
type ToolsetBuild ¶
type ToolsetBuild struct {
// Branch is the Git branch that the build used. Only includes the last segment, e.g.
// "release-branch.go1.27".
Branch string `json:"branch"`
// BuildID identifies the Azure DevOps pipeline build that produced the artifacts.
BuildID string `json:"buildId"`
// Version is the Go version and Microsoft revision, such as "1.24.1-2" or "main-1".
Version string `json:"version"`
// Arches contains the artifacts produced for this version. Each binary artifact has a target
// operating system and architecture. A source archive has no Env. The field name matches the
// versions.json format.
Arches []*Arch `json:"arches"`
// GoSrcURL is the download URL for the source archive used by the build. Arches can also
// contain this source archive as an entry with no Env.
GoSrcURL string `json:"goSrcURL"`
// GoSrcSHA256 is the hexadecimal SHA-256 digest of the archive at GoSrcURL.
GoSrcSHA256 string `json:"goSrcSHA256"`
}
ToolsetBuild describes the artifacts produced by a toolset build of the Microsoft build of Go.