Documentation
¶
Index ¶
- Constants
- type AccountManager
- func (a *AccountManager) Create(ctx context.Context, state *v1alpha1.Account) (*domain.AccountResult, error)
- func (a *AccountManager) Delete(ctx context.Context, state *v1alpha1.Account) error
- func (a *AccountManager) Import(ctx context.Context, state *v1alpha1.Account) (*domain.AccountResult, error)
- func (a *AccountManager) SignUserJWT(ctx context.Context, accountRef domain.NamespacedName, claims *jwt.UserClaims) (*SignedUserJWT, error)
- func (a *AccountManager) Update(ctx context.Context, state *v1alpha1.Account) (*domain.AccountResult, error)
- type ClusterManager
- type Config
- type OperatorNatsCluster
- type Secrets
- type SignedUserJWT
- type UserJWTSigner
- type UserManager
Constants ¶
View Source
const ( SecretNameAccountRootTemplate = "%s-ac-root-%s" SecretNameAccountSignTemplate = "%s-ac-sign-%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountManager ¶
type AccountManager struct {
// contains filtered or unexported fields
}
func NewAccountManager ¶
func NewAccountManager( natsClient outbound.NatsClient, accountReader outbound.AccountReader, secretClient outbound.SecretClient, clusterManager *ClusterManager, ) (*AccountManager, error)
func (*AccountManager) Create ¶
func (a *AccountManager) Create(ctx context.Context, state *v1alpha1.Account) (*domain.AccountResult, error)
func (*AccountManager) Import ¶
func (a *AccountManager) Import(ctx context.Context, state *v1alpha1.Account) (*domain.AccountResult, error)
func (*AccountManager) SignUserJWT ¶
func (a *AccountManager) SignUserJWT(ctx context.Context, accountRef domain.NamespacedName, claims *jwt.UserClaims) (*SignedUserJWT, error)
func (*AccountManager) Update ¶
func (a *AccountManager) Update(ctx context.Context, state *v1alpha1.Account) (*domain.AccountResult, error)
type ClusterManager ¶
type ClusterManager struct {
// contains filtered or unexported fields
}
func NewClusterManager ¶
func NewClusterManager( natsClusterReader outbound.NatsClusterReader, natsClient outbound.NatsClient, secretReader outbound.SecretReader, configMapReader outbound.ConfigMapReader, config *Config, ) (*ClusterManager, error)
func (*ClusterManager) GetClusterTarget ¶
func (r *ClusterManager) GetClusterTarget(ctx context.Context, accountClusterRef *v1alpha1.NatsClusterRef) (*clusterTarget, error)
func (*ClusterManager) Validate ¶
func (r *ClusterManager) Validate(ctx context.Context, state *v1alpha1.NatsCluster) error
type Config ¶
type Config struct {
OperatorNatsCluster *OperatorNatsCluster
// OperatorNamespace is the Kubernetes namespace where the operator is deployed.
// TODO: [#102][#144] When sunsetting DefaultNatsURL, remove this field if it no longer serves a purpose.
OperatorNamespace domain.Namespace
// DefaultNatsURL is a comma-separated list of NATS server URLs to use when OperatorNatsCluster is not configured.
// Deprecated: This field is deprecated and will be removed in a future release.
// TODO: [#102][#144] Sunset DefaultNatsURL (NATS_URL)
DefaultNatsURL string
}
type OperatorNatsCluster ¶
type OperatorNatsCluster struct {
ClusterRef v1alpha1.NatsClusterRef
// Optional controls account-level overrides when ClusterRef is configured.
// false (default) means account-level cluster refs must not deviate.
Optional bool
}
func NewOperatorNatsCluster ¶
func NewOperatorNatsCluster(clusterRef v1alpha1.NatsClusterRef, optional bool) (*OperatorNatsCluster, error)
type SignedUserJWT ¶
type UserJWTSigner ¶
type UserJWTSigner interface {
SignUserJWT(ctx context.Context, accountRef domain.NamespacedName, claims *jwt.UserClaims) (*SignedUserJWT, error)
}
type UserManager ¶
type UserManager struct {
// contains filtered or unexported fields
}
func NewUserManager ¶
func NewUserManager(userJWTSigner UserJWTSigner, secretClient outbound.SecretClient) *UserManager
func (*UserManager) CreateOrUpdate ¶
Click to show internal directories.
Click to hide internal directories.