Help us shape the future of Go! Take the 2026 Go Developer Survey

meta

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package meta reads and interprets repo metadata (acyl.yml)

Index

Constants

View Source
const DefaultFallbackBranch = "master"

Variables

View Source
var ErrUnsupportedVersion = errors.New("acyl.yml is previous or unsupported version")

Functions

This section is empty.

Types

type ChartLocation

type ChartLocation struct {
	ChartPath, VarFilePath string
	ValueOverrides         map[string]string
}

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

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 (*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

Jump to

Keyboard shortcuts

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