provider

package
v0.0.0-...-b7639d7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeName

func NormalizeName(name string) string

func NormalizeNamespace

func NormalizeNamespace(namespace string) string

Types

type Addr

type Addr struct {
	Namespace string `json:"-"`
	Name      string `json:"-"`
}

Addr represents a full provider address (NAMESPACE/NAME). It currently translates to github.com/NAMESPACE/terraform-provider-NAME .

func AddrFromRepository

func AddrFromRepository(repository vcs.RepositoryAddr) (Addr, error)

AddrFromRepository parses a repository name and returns a provider address from it if valid.

func NormalizeAddr

func NormalizeAddr(providerAddr Addr) Addr

func (Addr) Compare

func (a Addr) Compare(other Addr) int

func (Addr) Equals

func (a Addr) Equals(other Addr) bool

func (Addr) MarshalJSON

func (a Addr) MarshalJSON() ([]byte, error)

func (Addr) Normalize

func (a Addr) Normalize() Addr

func (Addr) String

func (a Addr) String() string

func (Addr) ToRepositoryAddr

func (a Addr) ToRepositoryAddr() vcs.RepositoryAddr

func (*Addr) UnmarshalJSON

func (a *Addr) UnmarshalJSON(b []byte) error

type InvalidVersionNumber

type InvalidVersionNumber struct {
	VersionNumber VersionNumber
}

func (InvalidVersionNumber) Error

func (i InvalidVersionNumber) Error() string

type Key

type Key struct {
	ASCIIArmor string `json:"ascii_armor"`
	KeyID      string `json:"key_id"`
}

Key is the key data with a key ID.

type Metadata

type Metadata struct {
	CustomRepository string    `json:"repository,omitempty"` // Optional. Custom repository from which to fetch the provider's metadata.
	Versions         []Version `json:"versions"`             // A list of version data, for each supported provider version.
	Warnings         []string  `json:"warnings,omitempty"`   // Warnings for this provider.
}

Metadata contains information about the provider.

func (Metadata) Equals

func (m Metadata) Equals(other Metadata) bool

type Target

type Target struct {
	OS          string `json:"os"`           // The operating system for which the provider is built.
	Arch        string `json:"arch"`         // The architecture for which the provider is built.
	Filename    string `json:"filename"`     // The filename of the provider binary.
	DownloadURL string `json:"download_url"` // The direct URL to download the provider binary.
	SHASum      string `json:"shasum"`       // The SHA checksum of the provider binary.
}

Target contains information about a specific provider version for a specific target platform.

func (Target) Equals

func (t Target) Equals(other Target) bool

type Version

type Version struct {
	Version             VersionNumber `json:"version"`               // The version number of the provider.
	Protocols           []string      `json:"protocols"`             // The protocol versions the provider supports.
	SHASumsURL          string        `json:"shasums_url"`           // The URL to the SHA checksums file.
	SHASumsSignatureURL string        `json:"shasums_signature_url"` // The URL to the GPG signature of the SHA checksums file.
	Targets             []Target      `json:"targets"`               // A list of target platforms for which this provider version is available.
}

Version contains information about a specific provider version.

func (Version) Compare

func (v Version) Compare(other Version) int

func (Version) Equals

func (v Version) Equals(other Version) bool

func (Version) Normalize

func (v Version) Normalize() Version

func (Version) Validate

func (v Version) Validate() error

type VersionList

type VersionList []Version

VersionList is a slice of versions.

func (VersionList) Equals

func (v VersionList) Equals(other VersionList) bool

func (VersionList) Merge

func (v VersionList) Merge(other VersionList) VersionList

Merge merges the current list with another list and returns the new merged list.

func (VersionList) Sort

func (v VersionList) Sort()

Sort returns a sorted copy of the version list.

type VersionNumber

type VersionNumber string

VersionNumber describes the semver version number.

swagger:model ProviderVersionNumber

func VersionFromVCS

func VersionFromVCS(vcsVersion vcs.VersionNumber) (VersionNumber, error)

VersionFromVCS converts a vcs.VersionNumber into a VersionNumber.

func (VersionNumber) Compare

func (v VersionNumber) Compare(other VersionNumber) int

func (VersionNumber) Normalize

func (v VersionNumber) Normalize() VersionNumber

func (VersionNumber) Parse

func (v VersionNumber) Parse() (major int, minor int, patch int, stability string, stabilityNumber int, err error)

func (VersionNumber) ToVCSVersion

func (v VersionNumber) ToVCSVersion() vcs.VersionNumber

ToVCSVersion creates a vcs.VersionNumber from the VersionNumber. Call ToVCSVersion() before you call Normalize() in order to get the correct VCS version.

func (VersionNumber) Validate

func (v VersionNumber) Validate() error

Jump to

Keyboard shortcuts

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