fake

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 3 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 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) GetRemoteTenantNamespace

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

GetRemoteTenantNamespace retrieves the tenant namespace associated with a remote cluster.

Jump to

Keyboard shortcuts

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