Documentation ¶
Index ¶
- Variables
- func AllowedNamespace(rmq topology.RabbitmqClusterReference, requestNamespace string, ...) bool
- func AllowedNamespaceSecret(rmq topology.RabbitmqClusterReference, requestNamespace string, ...) bool
- func InitializeClient() func()
- func LoginToVault(vaultClient *vault.Client, authPath string, params map[string]interface{}) (*vault.Secret, error)
- func ParseReference(ctx context.Context, c client.Client, rmq topology.RabbitmqClusterReference, ...) (map[string]string, bool, error)
- func ReadServiceAccountToken() ([]byte, error)
- func ReadVaultClientSecret(vaultClient *vault.Client, jwtToken string, vaultRole string, authPath string) (*vault.Secret, error)
- type Client
- type ClusterCredentials
- type Factory
- type SecretReader
- type SecretStoreClient
- type VaultClient
- type VaultSecretReader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoSuchRabbitmqClusterError = errors.New("RabbitmqCluster object does not exist") ResourceNotAllowedError = errors.New("resource is not allowed to reference defined cluster reference. Check the namespace of the resource is allowed as part of the cluster's `rabbitmq.com/topology-allowed-namespaces` annotation") NoServiceReferenceSetError = errors.New("RabbitmqCluster has no ServiceReference set in status.defaultUser") )
View Source
var ( ReadServiceAccountTokenFunc = ReadServiceAccountToken ReadVaultClientSecretFunc = ReadVaultClientSecret LoginToVaultFunc = LoginToVault )
Created - and exported from package - for testing purposes
View Source
var ( SecretClient SecretStoreClient SecretClientCreationError error )
View Source
var SecretStoreClientProvider = GetSecretStoreClient
Functions ¶
func AllowedNamespace ¶
func AllowedNamespace(rmq topology.RabbitmqClusterReference, requestNamespace string, cluster *rabbitmqv1beta1.RabbitmqCluster) bool
func AllowedNamespaceSecret ¶
func InitializeClient ¶
func InitializeClient() func()
func LoginToVault ¶
func ParseReference ¶
func ReadServiceAccountToken ¶
Types ¶
type Client ¶
type Client interface { PutUser(string, rabbithole.UserSettings) (*http.Response, error) DeleteUser(string) (*http.Response, error) DeclareBinding(string, rabbithole.BindingInfo) (*http.Response, error) DeleteBinding(string, rabbithole.BindingInfo) (*http.Response, error) ListQueueBindingsBetween(string, string, string) ([]rabbithole.BindingInfo, error) ListExchangeBindingsBetween(string, string, string) ([]rabbithole.BindingInfo, error) UpdatePermissionsIn(string, string, rabbithole.Permissions) (*http.Response, error) ClearPermissionsIn(string, string) (*http.Response, error) PutPolicy(string, string, rabbithole.Policy) (*http.Response, error) DeletePolicy(string, string) (*http.Response, error) DeclareQueue(string, string, rabbithole.QueueSettings) (*http.Response, error) DeleteQueue(string, string, ...rabbithole.QueueDeleteOptions) (*http.Response, error) DeclareExchange(string, string, rabbithole.ExchangeSettings) (*http.Response, error) DeleteExchange(string, string) (*http.Response, error) PutVhost(string, rabbithole.VhostSettings) (*http.Response, error) DeleteVhost(string) (*http.Response, error) PutGlobalParameter(name string, value interface{}) (*http.Response, error) DeleteGlobalParameter(name string) (*http.Response, error) PutFederationUpstream(vhost, name string, def rabbithole.FederationDefinition) (res *http.Response, err error) DeleteFederationUpstream(vhost, name string) (res *http.Response, err error) DeclareShovel(vhost, shovel string, info rabbithole.ShovelDefinition) (res *http.Response, err error) DeleteShovel(vhost, shovel string) (res *http.Response, err error) GetVhost(vhost string) (rec *rabbithole.VhostInfo, err error) PutOperatorPolicy(string, string, rabbithole.OperatorPolicy) (*http.Response, error) DeleteOperatorPolicy(vhost, name string) (res *http.Response, err error) UpdateTopicPermissionsIn(vhost, username string, TopicPermissions rabbithole.TopicPermissions) (res *http.Response, err error) DeleteTopicPermissionsIn(vhost, username string, exchange string) (res *http.Response, err error) }
type ClusterCredentials ¶
type ClusterCredentials struct {
// contains filtered or unexported fields
}
type Factory ¶
type SecretStoreClient ¶
func GetSecretStoreClient ¶
func GetSecretStoreClient() (SecretStoreClient, error)
type VaultClient ¶
type VaultClient struct {
Reader SecretReader
}
func (VaultClient) ReadCredentials ¶
func (vc VaultClient) ReadCredentials(path string) (string, string, error)
type VaultSecretReader ¶
type VaultSecretReader struct {
// contains filtered or unexported fields
}
func (VaultSecretReader) ReadSecret ¶
func (s VaultSecretReader) ReadSecret(path string) (*vault.Secret, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.