cmd

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download added in v0.8.0

func Download(packages []Package, opts DownloadOpts) error

func Execute

func Execute() error

Execute is the main entrypoint of furyctl

Types

type Config added in v0.8.0

type Config struct {
	Packages     []Package
	DownloadOpts DownloadOpts
	Prefix       string
}

type DirSpec added in v0.2.0

type DirSpec struct {
	VendorFolder string
	Kind         string
	Name         string
	Registry     bool
	Provider     ProviderOptSpec
}

DirSpec is the abstraction of the fields needed for generating a destination directory

type DownloadOpts added in v0.8.0

type DownloadOpts struct {
	Parallel bool
	Https    bool
	Fallback bool
}

type Furyconf

type Furyconf struct {
	VendorFolderName string          `yaml:"vendorFolderName"`
	Versions         VersionPattern  `yaml:"versions"`
	Roles            []Package       `yaml:"roles"`
	Modules          []Package       `yaml:"modules"`
	Bases            []Package       `yaml:"bases"`
	Provider         ProviderPattern `mapstructure:"provider"`
}

Furyconf is reponsible for the structure of the Furyfile

func (*Furyconf) Parse

func (f *Furyconf) Parse(prefix string) ([]Package, error)

Parse reads the furyconf structs and created a list of packaged to be downloaded

func (*Furyconf) Validate

func (f *Furyconf) Validate() error

Validate is used for validation of configuration and initization of default parameters

type Package

type Package struct {
	Name         string          `yaml:"name"`
	Version      string          `yaml:"version"`
	Url          string          `yaml:"url"`
	Dir          string          `yaml:"dir"`
	Kind         string          `yaml:"kind"`
	ProviderOpt  ProviderOptSpec `mapstructure:"provider"`
	ProviderKind ProviderKind    `mapstructure:"providerKind"`
	Registry     bool            `mapstructure:"registry"`
}

Package is the type to contain the definition of a single package

type PackageURL added in v0.8.0

type PackageURL struct {
	Prefix        string
	Blocks        []string
	Kind          string
	Version       string
	Registry      bool
	CloudProvider ProviderOptSpec
	KindSpec      ProviderKind
}

PackageURL is the representation of the fields needed to elaborate an url

type ProviderKind added in v0.2.0

type ProviderKind map[string][]RegistrySpec

ProviderKind is the abstraction of the following structure:

modules:

aws
 - uri: https://github.com/terraform-aws-modules
   label: official-modules

type ProviderOptSpec added in v0.2.0

type ProviderOptSpec struct {
	Name  string `mapstructure:"name"`
	Label string `mapstructure:"label"`
}

ProviderOptSpec is the type that allows to explicit name of cloud provider and referenced label

type ProviderPattern added in v0.2.0

type ProviderPattern map[string]ProviderKind

ProviderPattern is the abstraction of the following structure: provider:

modules:
  aws
   - uri: https://github.com/terraform-aws-modules
     label: official-modules

type RegistrySpec added in v0.2.0

type RegistrySpec struct {
	BaseURI string `mapstructure:"url"`
	Label   string `mapstructure:"label"`
}

RegistrySpec contains the couple uri/label to identify each tf new repo declared

type VersionPattern added in v0.1.3

type VersionPattern map[string]string

VersionPattern Map from glob pattern to version associated (e.g. {"aws/*" : "v1.15.4-1"}

Jump to

Keyboard shortcuts

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