sensuasset

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: BlueOak-1.0.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAsset

func NewAsset() modules.Pluggable

func Register

func Register()

Types

type Asset

type Asset struct {
	// AssetURL is a template for Build artifact's publicly available URL,
	// from where sensu-go agent will be able to download URLs.
	// There is no default, and this is a required parameter.
	AssetURL string `yaml:"asset_url"`
	// Build specifies which build name should be added to the asset.
	// There is no default, and this is a required parameter.
	Build string
	// ID contains the artifact's name used by later stages of the build
	// pipeline. Archives, and Publishes may refer to this name for
	// referencing build results.
	// Default: "sensu-asset".
	ID string
	// Output is where the checksum file is going to be created
	// Default: "{{.ProjectName}}-{{.Version}}-asset.yml"
	Output string
}

func (*Asset) Run

func (mod *Asset) Run(cx context.Context) error

type AssetSpec

type AssetSpec struct {
	Type       string       `yaml:"type"`
	APIVersion string       `yaml:"api_version"`
	Metadata   MetadataSpec `yaml:"metadata"`
	Spec       struct {
		Builds []*BuildSpec `yaml:"builds"`
	} `yaml:"spec"`
}

func NewAssetSpec

func NewAssetSpec(packageName string) *AssetSpec

func (*AssetSpec) AddBuild

func (a *AssetSpec) AddBuild(build *BuildSpec)

func (*AssetSpec) Write

func (a *AssetSpec) Write(wr io.Writer) (int, error)

type BuildSpec

type BuildSpec struct {
	URL     string            `yaml:"url"`
	SHA512  string            `yaml:"sha512"`
	Filters []string          `yaml:"filters"`
	Headers map[string]string `yaml:"headers,omitempty"`
}

type MetadataSpec

type MetadataSpec struct {
	Name        string            `yaml:"name"`
	Namespace   string            `yaml:"namespace"`
	Labels      map[string]string `yaml:"labels,omitempty"`
	Annotations map[string]string `yaml:"annotations,omitempty"`
}

Jump to

Keyboard shortcuts

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