Documentation
¶
Index ¶
- func NormalizeName(name string) string
- func NormalizeNamespace(namespace string) string
- type Addr
- type InvalidVersionNumber
- type Key
- type Metadata
- type Target
- type Version
- type VersionList
- type VersionNumber
- func (v VersionNumber) Compare(other VersionNumber) int
- func (v VersionNumber) Normalize() VersionNumber
- func (v VersionNumber) Parse() (major int, minor int, patch int, stability string, stabilityNumber int, ...)
- func (v VersionNumber) ToVCSVersion() vcs.VersionNumber
- func (v VersionNumber) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeName ¶
func NormalizeNamespace ¶
Types ¶
type Addr ¶
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 (Addr) MarshalJSON ¶
func (Addr) ToRepositoryAddr ¶
func (a Addr) ToRepositoryAddr() vcs.RepositoryAddr
func (*Addr) UnmarshalJSON ¶
type InvalidVersionNumber ¶
type InvalidVersionNumber struct {
VersionNumber VersionNumber
}
func (InvalidVersionNumber) Error ¶
func (i InvalidVersionNumber) Error() string
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.
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.
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.
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) 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