services

package
v0.0.77 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 6 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) GetProviders added in v0.0.77

func (vm *JSONFileProviderVersionManager) GetProviders(providerName string) (*ListProviderItem, error)

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)

func (*JSONFileProviderVersionManager) ListProviders added in v0.0.77

type ListProviderItem added in v0.0.77

type ListProviderItem struct {
	Organization string `json:"organization,omitempty"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	SourceUrl    string `json:"source_url,omitempty"`
	Maturity     string `json:"maturity,omitempty"`
}

type ListProviderResponse added in v0.0.77

type ListProviderResponse struct {
	Providers []*ListProviderItem `json:"providers"`
}

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)
	ListProviders() (*ListProviderResponse, error)
	GetProviders(providerName string) (*ListProviderItem, 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