distro

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data added in v0.13.0

type Data struct {
	User    string
	Version string
}

type Distro

type Distro interface {
	GetName() string
	GetReleaseName() string
	GetModeState(mode string) (string, error)
	GetCachePath() string
	GetCacheSaltStackSourcePath() string
	GetSaltstackPillars() (pillars map[string]string)
	Download(dir string) error
}

func NewGitHub added in v0.7.0

func NewGitHub(ctx context.Context, distro string, version *string, includePreReleases bool, githubToken string, data map[string]string) (Distro, error)

func NewLocal added in v0.7.0

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

type GitHubDistro added in v0.7.0

type GitHubDistro struct {
	Owner   string
	Repo    string
	Version string
	Name    string
	Dir     string
	SaltDir string

	Alias   string
	IsAlias bool

	Manifest *Manifest

	IncludePreReleases bool
	// contains filtered or unexported fields
}

func (*GitHubDistro) Download added in v0.7.0

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

func (*GitHubDistro) GetCachePath added in v0.7.0

func (d *GitHubDistro) GetCachePath() string

func (*GitHubDistro) GetCacheSaltStackSourcePath added in v0.7.0

func (d *GitHubDistro) GetCacheSaltStackSourcePath() string

func (*GitHubDistro) GetModeState added in v0.7.0

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

func (*GitHubDistro) GetName added in v0.7.0

func (d *GitHubDistro) GetName() string

func (*GitHubDistro) GetRelease added in v0.7.0

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

func (*GitHubDistro) GetReleaseAssets added in v0.7.0

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

func (*GitHubDistro) GetReleaseName added in v0.7.0

func (d *GitHubDistro) GetReleaseName() string

func (*GitHubDistro) GetSaltstackPillars added in v0.7.0

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

type LocalConfig added in v0.7.0

type LocalConfig struct {
	Manifest *Manifest `yaml:"manifest"`
}

type LocalDistro added in v0.7.0

type LocalDistro struct {
	Owner   string
	Repo    string
	Version string
	Name    string
	Dir     string
	SaltDir string

	Alias   string
	IsAlias bool
	IsLocal bool

	Manifest *Manifest

	IncludePreReleases bool
	// contains filtered or unexported fields
}

func (*LocalDistro) Download added in v0.7.0

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

func (*LocalDistro) GetCachePath added in v0.7.0

func (d *LocalDistro) GetCachePath() string

func (*LocalDistro) GetCacheSaltStackSourcePath added in v0.7.0

func (d *LocalDistro) GetCacheSaltStackSourcePath() string

func (*LocalDistro) GetModeState added in v0.7.0

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

func (*LocalDistro) GetName added in v0.7.0

func (d *LocalDistro) GetName() string

func (*LocalDistro) GetReleaseName added in v0.7.0

func (d *LocalDistro) GetReleaseName() string

func (*LocalDistro) GetSaltstackPillars added in v0.7.0

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

type Manifest

type Manifest struct {
	Version     int           `json:"version" yaml:"version" default:"2"`
	Name        string        `json:"name,omitempty" yaml:"name,omitempty"`
	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