Documentation ¶
Index ¶
Constants ¶
View Source
const (
PropUsernameSuffix string = "UsernameSuffix"
)
View Source
const SecretPolicyTemplate string = `` /* 183-byte string literal not displayed */
View Source
const SecretTemplate string = `{"username":"%s", "password":"%s"}`
View Source
const TagKmsKey = "TR-KMS-KEY"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements CloudFormation custom resource extension interface.
func NewHandler ¶
func NewHandler(mskClient MskClient, kmsClient KmsClient, secretsManagerClient SecretsManagerClient, kafkaClientProvider KafkaClientProvider) *Handler
type IamKafkaClientProvider ¶
type IamKafkaClientProvider struct {
// contains filtered or unexported fields
}
func NewIamKafkaClientProvider ¶
func NewIamKafkaClientProvider(mskClient MskClient) *IamKafkaClientProvider
func (*IamKafkaClientProvider) NewKafkaClient ¶
func (p *IamKafkaClientProvider) NewKafkaClient(ctx context.Context, clusterArn string) (KafkaClient, error)
type KafkaClient ¶
type KafkaClient interface { CreateTopic(ctx context.Context, partitions int32, replicationFactor int16, configs map[string]*string, topic string) (kadm.CreateTopicResponse, error) ListTopics(ctx context.Context, topics ...string) (kadm.TopicDetails, error) DescribeTopicConfigs(ctx context.Context, topics ...string) (kadm.ResourceConfigs, error) AlterTopicConfigs(ctx context.Context, configs []kadm.AlterConfig, topics ...string) (kadm.AlterConfigsResponses, error) DeleteTopics(ctx context.Context, topics ...string) (kadm.DeleteTopicResponses, error) CreateACLs(ctx context.Context, b *kadm.ACLBuilder) (kadm.CreateACLsResults, error) DescribeACLs(ctx context.Context, b *kadm.ACLBuilder) (kadm.DescribeACLsResults, error) DeleteACLs(ctx context.Context, b *kadm.ACLBuilder) (kadm.DeleteACLsResults, error) }
type KafkaClientProvider ¶
type KafkaClientProvider interface {
NewKafkaClient(ctx context.Context, clusterArn string) (KafkaClient, error)
}
type KmsClient ¶
type KmsClient interface { CreateGrant(ctx context.Context, params *kms.CreateGrantInput, optFns ...func(*kms.Options)) (*kms.CreateGrantOutput, error) RevokeGrant(ctx context.Context, params *kms.RevokeGrantInput, optFns ...func(*kms.Options)) (*kms.RevokeGrantOutput, error) }
type KmsKeyResolverService ¶
type MskClient ¶
type MskClient interface { GetBootstrapBrokers(ctx context.Context, params *kafka.GetBootstrapBrokersInput, optFns ...func(*kafka.Options)) (*kafka.GetBootstrapBrokersOutput, error) DescribeCluster(ctx context.Context, params *kafka.DescribeClusterInput, optFns ...func(*kafka.Options)) (*kafka.DescribeClusterOutput, error) BatchAssociateScramSecret(ctx context.Context, params *kafka.BatchAssociateScramSecretInput, optFns ...func(*kafka.Options)) (*kafka.BatchAssociateScramSecretOutput, error) BatchDisassociateScramSecret(ctx context.Context, params *kafka.BatchDisassociateScramSecretInput, optFns ...func(*kafka.Options)) (*kafka.BatchDisassociateScramSecretOutput, error) }
type SecretsManagerClient ¶
type SecretsManagerClient interface { DescribeSecret(ctx context.Context, params *secretsmanager.DescribeSecretInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.DescribeSecretOutput, error) CreateSecret(ctx context.Context, params *secretsmanager.CreateSecretInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.CreateSecretOutput, error) DeleteSecret(ctx context.Context, params *secretsmanager.DeleteSecretInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.DeleteSecretOutput, error) ListSecrets(ctx context.Context, params *secretsmanager.ListSecretsInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.ListSecretsOutput, error) PutResourcePolicy(ctx context.Context, params *secretsmanager.PutResourcePolicyInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.PutResourcePolicyOutput, error) }
type UserManagerService ¶
type UserManagerService interface { CreateUser(ctx context.Context, shortStackID, topic, kmsKeyID, clusterArn string, u *tt.User) error DeleteUser(ctx context.Context, u *tt.User, kmsKeyID, topic, shortStackID, clusterArn string) error CreateACLs(ctx context.Context, topic, username, shortStackID string, permissions []tt.Permission) error DeleteACLs(ctx context.Context, topic, username, shortStackID string, permissions []tt.Permission) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.