artifact

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package artifact provides utilities to configure a system to use a Platypus artifact. Platypus artifacts are simple tar files with some extra metadata in the form of YAML files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerificationDataForLocation

func VerificationDataForLocation(location *url.URL) auth.VerificationData

Types

type AppManifest

type AppManifest struct {
	Ports           map[int][]string `yaml:"ports"`
	Owners          []string         `yaml:"owners"`
	RolloutStrategy string           `yaml:"rollout_strategy"`
}

func ManifestFromBytes

func ManifestFromBytes(bytes []byte) (*AppManifest, error)

func ManifestFromPath

func ManifestFromPath(path string) (*AppManifest, error)

type Application

type Application struct {
	Name string
}

type Artifact

type Artifact struct {
	Path string
}

func NewArtifact

func NewArtifact(path string) (*Artifact, error)

func (*Artifact) App

func (a *Artifact) App() *Application

func (*Artifact) AppManifest

func (a *Artifact) AppManifest() (*AppManifest, error)

type Downloader

type Downloader interface {
	// Downloads the artifact represented by the Downloader to the
	// specified path and transfers file ownership to the specified user
	Download(location *url.URL, verificationData auth.VerificationData, destination string, owner string) error
}

Interface for downloading a single artifact.

func NewLocationDownloader

func NewLocationDownloader(fetcher uri.Fetcher, verifier auth.ArtifactVerifier) Downloader

type Registry

type Registry interface {
	// Given a LaunchableStanza from a pod manifest, returns a URL from which the
	// artifact can be fetched an a struct containing the locations of files that
	// can be used to verify artifact integrity
	LocationDataForLaunchable(podID types.PodID, launchableID launch.LaunchableID, stanza launch.LaunchableStanza) (*url.URL, auth.VerificationData, error)

	CheckArtifactExists(u *url.URL) (bool, error)
}

interface for running operations against an artifact registry.

func NewRegistry

func NewRegistry(registryURL *url.URL, fetcher uri.Fetcher, osVersionDetector osversion.Detector) Registry

type RegistryResponse

type RegistryResponse struct {
	ArtifactLocation          string `json:"location"`
	ManifestLocation          string `json:"manifest_location"`
	ManifestSignatureLocation string `json:"manifest_signature_location"`
	BuildSignatureLocation    string `json:"signature_location"`
}

Jump to

Keyboard shortcuts

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