Documentation
¶
Overview ¶
Package asset provides utilities for generating asset filenames based on platform and version information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllArchValues ¶
func GetAllArchValues() []spec.SupportedPlatformArch
GetAllArchValues returns all possible Arch values from spec constants
func GetAllOSValues ¶
func GetAllOSValues() []spec.SupportedPlatformOS
GetAllOSValues returns all possible OS values from spec constants
func GetAllPlatformConstants ¶
GetAllPlatformConstants returns all OS and Arch constants as string slices
Types ¶
type FilenameGenerator ¶
type FilenameGenerator struct {
Spec *spec.InstallSpec
Version string
}
FilenameGenerator generates asset filenames based on templates and rules
func NewFilenameGenerator ¶
func NewFilenameGenerator(spec *spec.InstallSpec, version string) *FilenameGenerator
NewFilenameGenerator creates a new filename generator
func (*FilenameGenerator) GenerateFilename ¶
func (g *FilenameGenerator) GenerateFilename(osInput, archInput string) (string, error)
GenerateFilename creates an asset filename for a specific OS and Arch
func (*FilenameGenerator) GeneratePossibleFilenames ¶
func (g *FilenameGenerator) GeneratePossibleFilenames() map[string]bool
GeneratePossibleFilenames generates all possible asset filenames based on the asset template
func (*FilenameGenerator) GetAllPossiblePlatforms ¶
func (g *FilenameGenerator) GetAllPossiblePlatforms() []spec.Platform
GetAllPossiblePlatforms returns all possible OS/Arch combinations from spec constants