artifactstore

package
v0.0.0-...-7b1ab2b Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Versions map[string]Version `json:"versions"`
}

Artifact represents an artifact and it's available versions in the store

type Config

type Config struct {
	Artifacts map[string]Artifact `json:"artifacts"`
}

Config represents the available artifacts within the store

type Distribution

type Distribution struct {
	FileLocation string `json:"-"`
	SHA256Digest string `json:"sha256digest"`
}

Distribution is a specific distribution of a Version of an Artifact(ex linux-amd64)

type Option

type Option func(*Store) error

func WithConfig

func WithConfig(config Config) Option

WithConfig creates a Store with the provided config

func WithConfigFile

func WithConfigFile(configPath string) Option

WithConfigFile creates a Store with a config loaded from a yaml file on disk

type Store

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

Store is an artifact store served from Archivista

func New

func New(opts ...Option) (Store, error)

New creates a new Store with the provided options

func (Store) Artifacts

func (as Store) Artifacts() map[string]Artifact

Artifacts returns a copy of all the Store's Artifacts

func (Store) Distribution

func (as Store) Distribution(artifact, version, distribution string) (Distribution, bool)

Distribution returns the entry for a specific distribution for a specific version

func (Store) Distributions

func (as Store) Distributions(artifact, version string) (map[string]Distribution, bool)

Distributions returns all of the available Distributions for a specified Version of an Artifact

func (Store) Version

func (as Store) Version(artifact, version string) (Version, bool)

Version returns a specific Version for an artifact, if it exists

func (Store) Versions

func (as Store) Versions(artifact string) (map[string]Version, bool)

Versions returns all of the available Versions for an Artifact.

type Version

type Version struct {
	Distributions map[string]Distribution `json:"distributions"`
	Description   string                  `json:"description"`
}

Version represents a version of an Artifact (ex v0.2.0) with the available Distributions of version

Jump to

Keyboard shortcuts

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