asset

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 4 Imported by: 0

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

func GetAllPlatformConstants() ([]string, []string)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL