services

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadData

func LoadData() (map[string]ProviderData, error)

Types

type GPGPublicKey

type GPGPublicKey struct {
	KeyID          string `json:"key_id"`
	ASCIIArmor     string `json:"ascii_armor"`
	TrustSignature string `json:"trust_signature"`
	Source         string `json:"source"`
	SourceURL      string `json:"source_url"`
}

Structs to load data into (from a JSON file for now, will be from DB later)

type JSONFileProviderVersionManager

type JSONFileProviderVersionManager struct {
	// contains filtered or unexported fields
}

func (*JSONFileProviderVersionManager) GetVersionData

func (vm *JSONFileProviderVersionManager) GetVersionData(providerName string, version string, os string, arch string) (*PlatformMetadataResponse, error)

func (*JSONFileProviderVersionManager) ListProviderVersions

func (vm *JSONFileProviderVersionManager) ListProviderVersions(providerName string) (*ProviderVersionsResponse, error)

type Platform

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

type PlatformMetadataResponse

type PlatformMetadataResponse struct {
	Protocols     []string    `json:"protocols"`
	OS            string      `json:"os"`
	Arch          string      `json:"arch"`
	Filename      string      `json:"filename"`
	DownloadURL   string      `json:"download_url"`
	ShasumsURL    string      `json:"shasums_url"`
	ShasumsSigURL string      `json:"shasums_signature_url"`
	Shasum        string      `json:"shasum"`
	SigningKeys   SigningKeys `json:"signing_keys"`
}

type ProviderData

type ProviderData map[string]VersionData

type ProviderMetadata

type ProviderMetadata struct {
	OS                  string      `json:"os"`
	Arch                string      `json:"arch"`
	Filename            string      `json:"filename"`
	DownloadURL         string      `json:"download_url"`
	ShasumsURL          string      `json:"shasums_url"`
	ShasumsSignatureURL string      `json:"shasums_signature_url"`
	Shasum              string      `json:"shasum"`
	SigningKeys         SigningKeys `json:"signing_keys"`
}

type ProviderVersionManager

type ProviderVersionManager interface {
	ListProviderVersions(providerName string) (*ProviderVersionsResponse, error)
	GetVersionData(providerName string, version string, os string, arch string) (*PlatformMetadataResponse, error)
}

func NewJSONFileProviderVersionManager

func NewJSONFileProviderVersionManager() (ProviderVersionManager, error)

type ProviderVersionsResponse

type ProviderVersionsResponse struct {
	Versions []VersionItem `json:"versions"`
}

type SigningKeys

type SigningKeys struct {
	GPGPublicKeys []GPGPublicKey `json:"gpg_public_keys"`
}

type VersionData

type VersionData struct {
	Protocols []string           `json:"protocols"`
	Platforms []ProviderMetadata `json:"platforms"`
}

type VersionItem

type VersionItem 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