app

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 7 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 IsNoResources

func IsNoResources(err error) bool

IsNoResources asserts noResourcesError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type Config

type Config struct {
	Client *client.Client
}

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

type GetOptions

type GetOptions struct {
	Name      string
	Namespace string
}

GetOptions are the parameters that the Get method takes.

type Interface

Interface represents the contract for the app 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 app getter Service.

type ListOptions

type ListOptions struct {
	LabelSelector string
	Namespace     string
}

type Service

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

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

func (*Service) Get

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

Get fetches an App CR by name and namespace.

func (*Service) List

List returns a list of App CRs in a namespace, optionally filtered by a label selector.

Jump to

Keyboard shortcuts

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