Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackageVersion ¶
type PackageVersion interface {
fmt.Stringer
// Required.
// Will always be >=1.
Major() int
// Required.
StabilityLevel() StabilityLevel
// Optional.
// Only potentially set if the stability level is alpha or beta.
// Will always be >=1.
Minor() int
// Optional.
// Only potentially set if the stability level is alpha or beta.
// Will always be >=1.
Patch() int
// Optional.
// Only potentially set if the stability level is test.
Suffix() string
// contains filtered or unexported methods
}
PackageVersion is a package version.
A package has a version if the last component is a version of the form v\d+, v\d+test.*, v\d+(alpha|beta)\d*, or v\d+p\d+(alpha|beta)\d* where numbers are >=1.
See https://cloud.google.com/apis/design/versioning#channel-based_versioning See https://cloud.google.com/apis/design/versioning#release-based_versioning
func NewPackageVersionForPackage ¶
func NewPackageVersionForPackage(pkg string) (PackageVersion, bool)
NewPackageVersionForPackage returns the PackageVersion for the package.
Returns false if the package has no package version per the specifications.
type StabilityLevel ¶
type StabilityLevel int
StabilityLevel is the stability level.
const ( // StabilityLevelStable is stable. StabilityLevelStable StabilityLevel = iota + 1 // StabilityLevelAlpha is alpha stability. StabilityLevelAlpha // StabilityLevelBeta is beta stability. StabilityLevelBeta // StabilityLevelTest is test stability. StabilityLevelTest )
func (StabilityLevel) String ¶
func (s StabilityLevel) String() string
String implements fmt.Stringer.
Click to show internal directories.
Click to hide internal directories.