plugins

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	URL  string `json:"url,omitempty"`
	SHA  string `json:"sha,omitempty"`
	Name string `json:"name,omitempty"`
}

type Config

type Config struct {
	Providers providers.Config
	Parser    parser.Config

	// ManifestURL points to where the plugin manifest can be retrieved.
	ManifestURL string `env:"INFRACOST_CLI_PLUGIN_MANIFEST_URL" default:"https://releases.infracost.io/plugins/manifest.json"`

	// Cache is where the plugins should go.
	Cache string `env:"INFRACOST_CLI_PLUGIN_CACHE_DIRECTORY"`

	// AutoUpdate controls whether plugins are always updated to the latest
	// version. When false, an existing cached version is used if available.
	AutoUpdate bool `env:"INFRACOST_CLI_PLUGIN_AUTO_UPDATE" default:"true"`
	// contains filtered or unexported fields
}

func (*Config) Ensure

func (c *Config) Ensure(plugin, wantVersion string) (string, error)

func (*Config) EnsureParser

func (c *Config) EnsureParser() error

func (*Config) EnsureProvider

func (c *Config) EnsureProvider(provider proto.Provider) error

func (*Config) Process added in v0.0.3

func (c *Config) Process()

type Manifest

type Manifest struct {
	Plugins map[string]Plugin `json:"plugins"`
}

type Plugin

type Plugin struct {
	Latest   string             `json:"latest,omitempty"`
	Versions map[string]Version `json:"versions,omitempty"`
}

type Version

type Version struct {
	Artifacts map[string]Artifact `json:"artifacts,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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