models

package
v0.68.13 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package models provides the data structures used to represent Terraform providers and their details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform added in v0.58.7

type Platform struct {
	OS   string `json:"os"`
	Arch string `json:"arch"`
}

type Provider

type Provider struct {
	*ResponseBody

	RegistryName string
	Namespace    string
	Name         string
	Version      string
	OS           string
	Arch         string
}

Provider represents the details of the Terraform provider.

func ParseProvider added in v0.58.7

func ParseProvider(str string) *Provider

func (*Provider) Address added in v0.58.3

func (provider *Provider) Address() string

func (*Provider) Match

func (provider *Provider) Match(target *Provider) bool

Match returns true if all defined provider properties are matched.

func (*Provider) Platform

func (provider *Provider) Platform() string

func (*Provider) String

func (provider *Provider) String() string

type Providers added in v0.58.7

type Providers []*Provider

func ParseProviders added in v0.58.7

func ParseProviders(strs ...string) Providers

func (Providers) Find added in v0.58.7

func (providers Providers) Find(target *Provider) *Provider

type ResponseBody added in v0.58.7

type ResponseBody struct {
	Platform

	Protocols []string `json:"protocols,omitempty"`
	Filename  string   `json:"filename"`

	DownloadURL            string `json:"download_url"`
	SHA256SumsURL          string `json:"shasums_url,omitempty"`
	SHA256SumsSignatureURL string `json:"shasums_signature_url,omitempty"`

	SHA256Sum   string         `json:"shasum,omitempty"`
	SigningKeys SigningKeyList `json:"signing_keys,omitempty"`
}

ResponseBody represents the details of the Terraform provider received from a registry.

func (ResponseBody) ResolveRelativeReferences added in v0.66.1

func (body ResponseBody) ResolveRelativeReferences(base *url.URL) *ResponseBody

type SigningKey added in v0.58.7

type SigningKey struct {
	ASCIIArmor     string `json:"ascii_armor"`
	TrustSignature string `json:"trust_signature"`
}

SigningKey represents a key used to sign packages from a registry, along with an optional trust signature from the registry operator. These are both in ASCII armored OpenPGP format.

type SigningKeyList added in v0.57.9

type SigningKeyList struct {
	GPGPublicKeys []*SigningKey `json:"gpg_public_keys"`
}

func (SigningKeyList) Keys added in v0.58.7

func (list SigningKeyList) Keys() map[string]string

type Version added in v0.58.7

type Version struct {
	Version   string      `json:"version"`
	Protocols []string    `json:"protocols"`
	Platforms []*Platform `json:"platforms"`
}

Jump to

Keyboard shortcuts

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