Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSecretNotFound = errors.New("secret not found")
ErrSecretNotFound represents an error case when the specified secret doesn't exist
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { // GetOrganizationID returns the organization ID of the cluster. GetOrganizationID() uint // GetUID returns the unique ID of the cluster. GetUID() string }
Cluster represents a Kubernetes cluster.
type Clusters ¶
type Clusters interface { // GetCluster returns a new cluster based on it's ID. GetCluster(ctx context.Context, id uint) (Cluster, error) }
Clusters provides access to the list of clusters.
type SecretCreateRequest ¶
SecretCreateRequest represents a new secret.
type SecretResponse ¶
type SecretStore ¶
type SecretStore interface { // EnsureSecretExists creates a secret for an organization if it cannot be found and returns it's ID. EnsureSecretExists(organizationID uint, secret SecretCreateRequest) (string, error) // GetSecret gets a secret for an organization, if it doesn't exists it returns an ErrSecretNotFound GetSecret(organizationID uint, name string) (SecretResponse, error) }
SecretStore is a generic secret store.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages cluster level secrets.
func NewStore ¶
func NewStore(clusters Clusters, secrets SecretStore) *Store
NewStore returns a new cluster secret store.
func (*Store) EnsureSecretExists ¶
func (s *Store) EnsureSecretExists(ctx context.Context, clusterID uint, secret SecretCreateRequest) (string, error)
EnsureSecretExists creates a secret for a cluster if it cannot be found and returns it's ID.
Click to show internal directories.
Click to hide internal directories.