admin

package
v0.0.0-...-1a307e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: MIT-0 Imports: 30 Imported by: 0

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

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, event cfn.Event) (string, map[string]interface{}, error)

Entrypoint for handling custom resource managed by this extension.

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 KmsKeyResolverService interface {
	Resolve(ctx context.Context, info *types.TopicInfo) (string, error)
}

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 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
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL