apprclient

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// RetrieveAll retrieves all visible packages from the given source
	// When namespace is specified, only package(s) associated with the given namespace are returned.
	// If namespace is empty then visible package(s) across all namespaces are returned.
	RetrieveAll(namespace string) ([]*OperatorMetadata, error)

	// RetrieveOne retrieves a given package from the source
	RetrieveOne(name, release string) (*OperatorMetadata, error)

	// ListPackages returns metadata associated with each package in the
	// specified namespace.
	ListPackages(namespace string) ([]*RegistryMetadata, error)
}

Client exposes the functionality of app registry server

func New added in v1.2.0

func New(options Options) (Client, error)

type OperatorMetadata

type OperatorMetadata struct {
	// Metadata that uniquely identifies the given operator manifest in registry.
	RegistryMetadata RegistryMetadata

	// Operator manifest(s) in raw YAML format that contains a set of CRD(s),
	// CSV(s) and package(s).
	Blob []byte
}

OperatorMetadata encapsulates registry metadata and blob associated with an operator manifest.

When an operator manifest is downloaded from a remote registry, it should be serialized into this type so that it can be further processed by datastore package.

type Options

type Options struct {
	// Source refers to the URL of the remote app registry server.
	Source string

	// AuthToken refers to the authorization token required to access operator
	// manifest in private repositories.
	//
	// If not set, it is assumed that the remote registry is public.
	AuthToken string
}

type RegistryMetadata

type RegistryMetadata struct {
	// Namespace is the namespace in application registry server
	// under which the given operator manifest is hosted.
	Namespace string

	// Repository is the repository that contains the given operator manifest.
	// The repository is located under the given namespace in application
	// registry.
	Name string

	// Release represents the latest version number of the given operator manifest.
	Release string

	// Releases represents all the available releases of the given operator manifest
	Releases []string

	// Digest is the sha256 hash value that uniquely corresponds to the blob
	// associated with this particular release of the operator manifest.
	Digest string
}

RegistryMetadata encapsulates metadata that uniquely describes the source of the given operator manifest in registry.

func (*RegistryMetadata) ID

func (rm *RegistryMetadata) ID() string

ID returns the unique identifier associated with this operator manifest.

func (*RegistryMetadata) ReleaseMap added in v1.5.8

func (rm *RegistryMetadata) ReleaseMap() map[string]bool

ReleaseMap returns a map between all the available releases of a package to a bool, usefull for checking is some release is available for a package.

func (*RegistryMetadata) String

func (rm *RegistryMetadata) String() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
Package appregistry is a generated GoMock package.
Package appregistry is a generated GoMock package.

Jump to

Keyboard shortcuts

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