apprclient

package
v0.0.7-test Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 version number of the given operator manifest.
	Release 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) 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