distro

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distro

type Distro struct {
	Owner   string
	Repo    string
	Version string
	Name    string

	Alias   string
	IsAlias bool

	Manifest *Manifest

	IncludePreReleases bool
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, distro string, version *string, includePreReleases bool, githubToken string, data interface{}) (*Distro, error)

func (*Distro) Download

func (d *Distro) Download(dir string) error

func (*Distro) DownloadAssets

func (d *Distro) DownloadAssets(dir string) error

func (*Distro) ExtractArchiveFile

func (d *Distro) ExtractArchiveFile(dir string) error

func (*Distro) GetCachePath

func (d *Distro) GetCachePath() string

func (*Distro) GetModeState

func (d *Distro) GetModeState(mode string) (string, error)

func (*Distro) GetName

func (d *Distro) GetName() string

func (*Distro) GetRelease

func (d *Distro) GetRelease() *github.RepositoryRelease

func (*Distro) GetReleaseAssets

func (d *Distro) GetReleaseAssets() []*github.ReleaseAsset

func (*Distro) GetReleaseName

func (d *Distro) GetReleaseName() string

func (*Distro) GetSaltstackPillars added in v0.3.0

func (d *Distro) GetSaltstackPillars() (pillars map[string]string)

func (*Distro) ValidateAssets

func (d *Distro) ValidateAssets(dir string) error

type Manifest

type Manifest struct {
	Version     int           `json:"version" yaml:"version" default:"2"`
	Name        string        `json:"project_name" yaml:"project_name"`
	Base        string        `json:"base_dir" yaml:"base_dir" default:"."`
	Modes       []Mode        `json:"modes" yaml:"modes"`
	Saltstack   Saltstack     `json:"saltstack,omitempty" yaml:"saltstack,omitempty"`
	SupportedOS []SupportedOS `json:"supported_os,omitempty" yaml:"supported_os,omitempty"`
}

func ParseManifest

func ParseManifest(contents []byte) (m *Manifest, err error)

func (*Manifest) Render added in v0.3.0

func (m *Manifest) Render(data interface{}) error

type Mode

type Mode struct {
	Name        string `json:"name" yaml:"name"`
	State       string `json:"state" yaml:"state"`
	Deprecated  bool   `json:"deprecated" yaml:"deprecated,omitempty"`
	Replacement string `json:"replacement" yaml:"replacement,omitempty"`
	Default     bool   `json:"default" yaml:"default,omitempty"`
}

type Saltstack

type Saltstack struct {
	Pillars map[string]string `json:"pillars,omitempty" yaml:"pillars,omitempty"`
}

type SupportedOS

type SupportedOS struct {
	ID       string `yaml:"id"`
	Release  string `yaml:"release,omitempty"`
	Codename string `yaml:"codename,omitempty"`
}

Jump to

Keyboard shortcuts

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