appcatalog

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 17 modules, 28 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go Reference CircleCI

appcatalog

This repo contains 2 components that support the Giant Swarm App Platform.

  • A Helm chart used by opsctl ensure appcatalogs.
  • A Go library we use in integration tests to get the correct version of managed apps.

Getting Project

Clone the git repository: https://github.com/giantswarm/appcatalog.git

How to build

Build it using the standard go build command.

go build github.com/giantswarm/appcatalog

Contact

Contributing & Reporting Bugs

See CONTRIBUTING for details on submitting patches, the contribution workflow as well as reporting bugs.

License

appcatalog is under the Apache 2.0 license. See the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestChart

func GetLatestChart(ctx context.Context, storageURL, app, appVersion string) (string, error)

GetLatestChart returns the latest chart tarball file for the specified storage URL and app and returns notFoundError when it can't find a specified app.

func GetLatestVersion

func GetLatestVersion(ctx context.Context, storageURL, app, appVersion string) (string, error)

GetLatestVersion returns the latest app version for the specified storage URL and app and returns notFoundError when it can't find a specified app.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func MatchesVersion added in v1.1.0

func MatchesVersion(chartVersion, appVersion string) bool

MatchesVersion reports whether a published chart version satisfies the requested appVersion.

It is exported because the same rule is needed outside chart resolution: apptest compares a deployed App CR's status version against the commit SHA under test with the very same suffix assumption, and would otherwise have to duplicate this logic.

architect used to publish charts as "<version>-<full 40 character SHA>", so a plain suffix test matched a caller passing CIRCLE_SHA1. Since architect orb 9.x the format is a gitsemver development version as shown above (v2 schema with architect, v3 schema with App Build Suite); both abbreviate the trailing SHA to seven characters -- a full SHA can never match that by suffix, and every lookup fails with notFoundError even though the chart was published correctly. Accept all formats so callers can keep passing the full SHA whichever tool published the chart.

appVersion is also legitimately a plain chart version: apptest passes App.Version when App.SHA is empty. The abbreviated comparison therefore only applies when appVersion actually looks like a git object name, leaving the version path exactly as it was.

func NewTarballURL

func NewTarballURL(baseURL string, appName string, version string) (string, error)

NewTarballURL returns the chart tarball URL for the specified app and version.

Types

type Entry added in v0.4.0

type Entry struct {
	AppVersion  string    `json:"appVersion"`
	Created     time.Time `json:"created"`
	Description string    `json:"description"`
	Home        string    `json:"home"`
	Icon        string    `json:"icon"`
	Keywords    []string  `json:"keywords"`
	Name        string    `json:"name"`
	Urls        []string  `json:"urls"`
	Version     string    `json:"version"`
}

func GetLatestEntry added in v0.4.0

func GetLatestEntry(ctx context.Context, storageURL, app, appVersion string) (Entry, error)

GetLatestEntry returns the latest app entry for the specified storage URL and app and returns notFoundError when it can't find a specified app.

Jump to

Keyboard shortcuts

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