Documentation ¶
Overview ¶
Package fake implements mock Identity interfaces for test purposes.
Index ¶
- type IdentityReader
- func (i *IdentityReader) Add(clusterID, namespace, secretName string, restcfg *rest.Config) *IdentityReader
- func (i *IdentityReader) GetConfig(remoteCluster discoveryv1alpha1.ClusterIdentity, namespace string) (*rest.Config, error)
- func (i *IdentityReader) GetConfigFromSecret(_ *corev1.Secret) (*rest.Config, error)
- func (i *IdentityReader) GetRemoteTenantNamespace(remoteCluster discoveryv1alpha1.ClusterIdentity, namespace string) (string, error)
- func (i *IdentityReader) GetSecretNamespacedName(remoteCluster discoveryv1alpha1.ClusterIdentity, _ string) (types.NamespacedName, error)
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
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.
Click to show internal directories.
Click to hide internal directories.