openshift

package
v0.0.0-...-34b34ea Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 14 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

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrAlreadyExists = errors.New("already exists")
)

Functions

func AddSchemes

func AddSchemes(scheme *apiruntime.Scheme) error

Types

type CatalogSourceData

type CatalogSourceData struct {
	Name    string
	Image   string
	Secrets []string
}

type Client

type Client interface {
	CreateNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	DeleteNamespace(ctx context.Context, name string) error
	GetNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	CreateSecret(ctx context.Context, name string, content map[string]string, secretType corev1.SecretType, namespace string) (*corev1.Secret, error)
	DeleteSecret(ctx context.Context, name string, namespace string) error
	GetSecret(ctx context.Context, name string, namespace string) (*corev1.Secret, error)
	CreateOperatorGroup(ctx context.Context, data OperatorGroupData, namespace string) (*operatorsv1.OperatorGroup, error)
	DeleteOperatorGroup(ctx context.Context, name string, namespace string) error
	GetOperatorGroup(ctx context.Context, name string, namespace string) (*operatorsv1.OperatorGroup, error)
	CreateCatalogSource(ctx context.Context, data CatalogSourceData, namespace string) (*operatorsv1alpha1.CatalogSource, error)
	DeleteCatalogSource(ctx context.Context, name string, namespace string) error
	GetCatalogSource(ctx context.Context, name string, namespace string) (*operatorsv1alpha1.CatalogSource, error)
	CreateSubscription(ctx context.Context, data SubscriptionData, namespace string) (*operatorsv1alpha1.Subscription, error)
	DeleteSubscription(ctx context.Context, name string, namespace string) error
	GetSubscription(ctx context.Context, name string, namespace string) (*operatorsv1alpha1.Subscription, error)
	GetCSV(ctx context.Context, name string, namespace string) (*operatorsv1alpha1.ClusterServiceVersion, error)
	GetImages(ctx context.Context) (map[string]struct{}, error)
	CreateRoleBinding(ctx context.Context, data RoleBindingData, namespace string) (*rbacv1.RoleBinding, error)
	GetRoleBinding(ctx context.Context, name string, namespace string) (*rbacv1.RoleBinding, error)
	DeleteRoleBinding(ctx context.Context, name string, namespace string) error
}

func NewClient

func NewClient(client crclient.Client) Client

NewClient provides a wrapper around the passed in client in order to present convenience functions for each of the object types that are interacted with.

type OperatorGroupData

type OperatorGroupData struct {
	Name             string
	TargetNamespaces []string
}

type RoleBindingData

type RoleBindingData struct {
	Name      string
	Subjects  []string
	Role      string
	Namespace string
}

type SubscriptionData

type SubscriptionData struct {
	Name                   string
	Channel                string
	CatalogSource          string
	CatalogSourceNamespace string
	Package                string
}

Jump to

Keyboard shortcuts

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