Documentation
¶
Index ¶
- Constants
- func WithNamespace(namespace string) func(*Manager)
- type AccountGetter
- type Manager
- func (a *Manager) Create(ctx context.Context, state *natsv1alpha1.Account) (*controller.AccountResult, error)
- func (a *Manager) Delete(ctx context.Context, state *natsv1alpha1.Account) error
- func (a *Manager) Import(ctx context.Context, state *natsv1alpha1.Account) (*controller.AccountResult, error)
- func (a *Manager) Update(ctx context.Context, state *natsv1alpha1.Account) (*controller.AccountResult, error)
- type NatsClient
- type SecretClient
Constants ¶
View Source
const ( SecretNameAccountRootTemplate = "%s-ac-root-%s" SecretNameAccountSignTemplate = "%s-ac-sign-%s" )
Variables ¶
This section is empty.
Functions ¶
func WithNamespace ¶
Types ¶
type AccountGetter ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(accounts AccountGetter, natsClient NatsClient, secretClient SecretClient, opts ...func(*Manager)) *Manager
func (*Manager) Create ¶
func (a *Manager) Create(ctx context.Context, state *natsv1alpha1.Account) (*controller.AccountResult, error)
func (*Manager) Import ¶
func (a *Manager) Import(ctx context.Context, state *natsv1alpha1.Account) (*controller.AccountResult, error)
func (*Manager) Update ¶
func (a *Manager) Update(ctx context.Context, state *natsv1alpha1.Account) (*controller.AccountResult, error)
type NatsClient ¶
type SecretClient ¶
type SecretClient interface {
// TODO: Keys created should be immutable
Apply(ctx context.Context, owner *secret.Owner, meta metav1.ObjectMeta, valueMap map[string]string) error
Get(ctx context.Context, namespace string, name string) (map[string]string, error)
GetByLabels(ctx context.Context, namespace string, labels map[string]string) (*v1.SecretList, error)
Delete(ctx context.Context, namespace string, name string) error
DeleteByLabels(ctx context.Context, namespace string, labels map[string]string) error
Label(ctx context.Context, namespace, name string, labels map[string]string) error
}
Click to show internal directories.
Click to hide internal directories.