appcatalog

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNoMatch added in v1.28.0

func IsNoMatch(err error) bool

IsNoMatch asserts noMatchError.

func IsNoResources

func IsNoResources(err error) bool

IsNoResources asserts noResourcesError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type AppCatalog added in v1.28.0

type AppCatalog struct {
	CR      *applicationv1alpha1.AppCatalog
	Entries *applicationv1alpha1.AppCatalogEntryList
}

AppCatalog abstracts away the custom resource so it can be returned as a runtime object or a typed custom resource.

func (*AppCatalog) Object added in v1.28.0

func (a *AppCatalog) Object() runtime.Object

type Collection added in v1.28.0

type Collection struct {
	Items []AppCatalog
}

Collection wraps a list of appcatalogs.

func (*Collection) Object added in v1.28.0

func (cc *Collection) Object() runtime.Object

type Config

type Config struct {
	Client *client.Client
}

Config represent the input parameters that New takes to produce a valid appcatalog getter Service.

type GetOptions

type GetOptions struct {
	LabelSelector labels.Selector
	Name          string
}

GetOptions are the parameters that the Get method takes.

type Interface

type Interface interface {
	Get(context.Context, GetOptions) (Resource, error)
}

Interface represents the contract for the appcatalog data service. Using this instead of a regular 'struct' makes mocking the service in tests much simpler.

func New

func New(config Config) (Interface, error)

New returns a new appcatalog getter Service.

type Resource added in v1.28.0

type Resource interface {
	Object() runtime.Object
}

type Service

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

Service is the object we'll hang the appcatalog getter methods on.

func (*Service) Get

func (s *Service) Get(ctx context.Context, options GetOptions) (Resource, error)

Get fetches a list of appcatalog CRs optionally filtered by name.

Jump to

Keyboard shortcuts

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