Documentation ¶
Overview ¶
Package meta reads and interprets repo metadata (acyl.yml)
Index ¶
- Constants
- Variables
- type ChartLocation
- type ChartLocations
- type DataGetter
- func (g DataGetter) FetchCharts(ctx context.Context, rc *models.RepoConfig, basePath string) (ChartLocations, error)
- func (g DataGetter) Get(ctx context.Context, rd models.RepoRevisionData) (*models.RepoConfig, error)
- func (g DataGetter) GetAcylYAML(ctx context.Context, rc *models.RepoConfig, repo, ref string) (err error)
- type FakeGetter
- func (fg *FakeGetter) FetchCharts(ctx context.Context, rc *models.RepoConfig, basePath string) (ChartLocations, error)
- func (fg *FakeGetter) Get(ctx context.Context, rd models.RepoRevisionData) (*models.RepoConfig, error)
- func (fg *FakeGetter) GetAcylYAML(ctx context.Context, rc *models.RepoConfig, repo, ref string) (err error)
- type Getter
Constants ¶
const DefaultFallbackBranch = "master"
Variables ¶
var ErrUnsupportedVersion = errors.New("acyl.yml is previous or unsupported version")
Functions ¶
This section is empty.
Types ¶
type ChartLocation ¶
ChartLocation models the local filesystem path for the chart and the associated vars file
type ChartLocations ¶
type ChartLocations map[string]ChartLocation
ChartLocations is a map of dependency name to ChartLocation
type DataGetter ¶
type DataGetter struct { // RepoRefOverrides is a map for reponame to ref override (primarily for local development) RepoRefOverrides map[string]string RC ghclient.RepoClient FS billy.Filesystem }
DataGetter is an object that fetches and parses metadata (acyl.yml) from a set of repositories
func (DataGetter) FetchCharts ¶
func (g DataGetter) FetchCharts(ctx context.Context, rc *models.RepoConfig, basePath string) (ChartLocations, error)
FetchCharts fetches the charts for the repo and all dependencies, writing them to the filesystem g.FS at basePath/[offset]/[name] and returns a map of dependency name to filesystem path
func (DataGetter) Get ¶
func (g DataGetter) Get(ctx context.Context, rd models.RepoRevisionData) (*models.RepoConfig, error)
Get fetches and parses acyl.yml from owner/repo and any dependent repositories, calculates refs and returns the parsed data.
func (DataGetter) GetAcylYAML ¶
func (g DataGetter) GetAcylYAML(ctx context.Context, rc *models.RepoConfig, repo, ref string) (err error)
GetAcylYAML fetches acyl.yaml from repo at ref and deserializes it into rc, returning an error if the version is < 2.
type FakeGetter ¶
type FakeGetter struct { GetFunc func(ctx context.Context, rd models.RepoRevisionData) (*models.RepoConfig, error) FetchChartsFunc func(ctx context.Context, rc *models.RepoConfig, basePath string) (ChartLocations, error) GetAcylYAMLFunc func(ctx context.Context, rc *models.RepoConfig, repo, ref string) (err error) }
func (*FakeGetter) FetchCharts ¶
func (fg *FakeGetter) FetchCharts(ctx context.Context, rc *models.RepoConfig, basePath string) (ChartLocations, error)
func (*FakeGetter) Get ¶
func (fg *FakeGetter) Get(ctx context.Context, rd models.RepoRevisionData) (*models.RepoConfig, error)
func (*FakeGetter) GetAcylYAML ¶
func (fg *FakeGetter) GetAcylYAML(ctx context.Context, rc *models.RepoConfig, repo, ref string) (err error)
type Getter ¶
type Getter interface { Get(ctx context.Context, rd models.RepoRevisionData) (*models.RepoConfig, error) FetchCharts(ctx context.Context, rc *models.RepoConfig, basePath string) (ChartLocations, error) GetAcylYAML(ctx context.Context, rc *models.RepoConfig, repo, ref string) (err error) }
Getter describes an object that fetches and parses metadata (acyl.yml) from a set of repositories