fake

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fake implements mock Identity interfaces for test purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentityReader

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

IdentityReader is a struct implementing an IdentityReader mock for testing purposes.

func NewIdentityReader

func NewIdentityReader() *IdentityReader

NewIdentityReader creates a new identityReader instance.

func (*IdentityReader) Add

func (i *IdentityReader) Add(clusterID, namespace, secretName string, restcfg *rest.Config) *IdentityReader

Add adds the associations about a remote cluster to the identityReader.

func (*IdentityReader) GetConfig

func (i *IdentityReader) GetConfig(remoteCluster discoveryv1alpha1.ClusterIdentity, namespace string) (*rest.Config, error)

GetConfig retrieves the rest config associated with a remote cluster.

func (*IdentityReader) GetConfigFromSecret added in v0.9.0

func (i *IdentityReader) GetConfigFromSecret(_ *corev1.Secret) (*rest.Config, error)

GetConfigFromSecret retrieves the rest config associated with a remote cluster.

func (*IdentityReader) GetRemoteTenantNamespace

func (i *IdentityReader) GetRemoteTenantNamespace(remoteCluster discoveryv1alpha1.ClusterIdentity, namespace string) (string, error)

GetRemoteTenantNamespace retrieves the tenant namespace associated with a remote cluster.

func (*IdentityReader) GetSecretNamespacedName added in v0.9.0

func (i *IdentityReader) GetSecretNamespacedName(remoteCluster discoveryv1alpha1.ClusterIdentity,
	_ string) (types.NamespacedName, error)

GetSecretNamespacedName retrieves the secret namespaced name associated with a remote cluster.

Jump to

Keyboard shortcuts

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