Documentation
¶
Index ¶
- func DoesTagExist(tag string) (bool, error)
- func EvaluateYqToString(expr string, files ...string) (string, error)
- func FetchSboms(repoOwner, packageUrl, tag string, outputDir string, logger *slog.Logger) ([]string, error)
- func GetBundleConfig(config types.ReleaseConfig, bundleName string) (types.Bundle, error)
- func GetFlavorConfig(flavor string, config types.ReleaseConfig, packageName string) (string, types.Flavor, error)
- func GetFormattedVersion(packageName string, version string, flavor string) string
- func GetGithubToken() string
- func GetPackageName() (string, error)
- func GetRepoInfo() (remoteURL string, defaultBranch string, err error)
- func JoinNonEmpty(sep string, elems ...string) string
- func LoadReleaseConfig(dir string) (types.ReleaseConfig, error)
- func LoadYaml(path string, destVar any) error
- func OpenRepo() (*git.Repository, error)
- func UpdateYaml(path string, srcVar any) error
- type CommandRunner
- type ImageIndex
- type ImageManifest
- type IndexEntry
- type Layer
- type RealCommand
- type RunProcess
- type ShortHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoesTagExist ¶
func FetchSboms ¶ added in v0.1.2
func FetchSboms(repoOwner, packageUrl, tag string, outputDir string, logger *slog.Logger) ([]string, error)
FetchSboms fetches the sboms from the given Zarf image reference it expects the image to have a single manifest of type `application/vnd.oci.image.index.v1+json` that contains a single manifest of type `application/vnd.oci.image.manifest.v1+json` in this manifest, it searches for sboms.tar. Contents of this file are extracted to the outputDir, and their names are returned
func GetBundleConfig ¶ added in v0.1.1
func GetFlavorConfig ¶
func GetFormattedVersion ¶ added in v0.0.13
func GetGithubToken ¶ added in v0.1.2
func GetGithubToken() string
func GetPackageName ¶
func GetRepoInfo ¶
func JoinNonEmpty ¶ added in v0.0.14
JoinNonEmpty works like strings.Join but drops any empty elements.
func LoadReleaseConfig ¶
func LoadReleaseConfig(dir string) (types.ReleaseConfig, error)
func OpenRepo ¶
func OpenRepo() (*git.Repository, error)
func UpdateYaml ¶
Types ¶
type CommandRunner ¶ added in v0.1.2
type ImageIndex ¶ added in v0.1.2
type ImageIndex struct {
Manifests []IndexEntry `json:"manifests"`
}
type ImageManifest ¶ added in v0.1.2
type ImageManifest struct {
Layers []Layer `json:"layers"`
}
type IndexEntry ¶ added in v0.1.2
type IndexEntry struct {
Digest string `json:"digest"`
}
type RealCommand ¶ added in v0.1.2
type RealCommand struct {
// contains filtered or unexported fields
}
func (*RealCommand) CombinedOutput ¶ added in v0.1.2
func (r *RealCommand) CombinedOutput() ([]byte, error)
func (*RealCommand) Run ¶ added in v0.1.2
func (r *RealCommand) Run() error
func (*RealCommand) SetStderr ¶ added in v0.1.2
func (r *RealCommand) SetStderr(stderr io.Writer)
func (*RealCommand) SetStdout ¶ added in v0.1.2
func (r *RealCommand) SetStdout(stdout io.Writer)
type RunProcess ¶ added in v0.1.2
type RunProcess func(name string, arg ...string) CommandRunner
var OsRunProcess RunProcess = func(name string, arg ...string) CommandRunner { return &RealCommand{cmd: exec.Command(name, arg...)} }
Update ExecCommand to use CommandRunner
type ShortHandler ¶ added in v0.1.2
type ShortHandler struct {
// contains filtered or unexported fields
}
func PrettyLogHandler ¶ added in v0.1.2
func PrettyLogHandler(w io.Writer, level slog.Level) *ShortHandler
Click to show internal directories.
Click to hide internal directories.