client

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyStateCreating        = "Creating"
	KeyStateEnabled         = "Enabled"
	KeyStatePendingDeletion = "PendingDeletion"
	KeyStatePendingImport   = "PendingImport"
	KeyStateUpdating        = "Updating"
	KeyStateUnavailable     = "Unavailable"
	KeyStateDisabled        = "Disabled"
)
View Source
const CurrentVersionMark = "AWSCURRENT"

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

type AWSClient struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config, logger log.Logger) (*AWSClient, error)

func (*AWSClient) CreateKey

func (c *AWSClient) CreateKey(ctx context.Context, keyID, keyType string, tags []*kms.Tag) (*kms.CreateKeyOutput, error)

func (*AWSClient) CreateSecret

func (c *AWSClient) CreateSecret(_ context.Context, id, value string) (*secretsmanager.CreateSecretOutput, error)

func (*AWSClient) DeleteKey

func (c *AWSClient) DeleteKey(ctx context.Context, keyID string) (*kms.ScheduleKeyDeletionOutput, error)

func (*AWSClient) DeleteSecret

func (*AWSClient) DescribeKey

func (c *AWSClient) DescribeKey(_ context.Context, keyID string) (*kms.DescribeKeyOutput, error)

func (*AWSClient) DescribeSecret

func (c *AWSClient) DescribeSecret(_ context.Context, id string) (tags map[string]string, metadata *entities.Metadata, err error)

func (*AWSClient) DestroySecret

func (c *AWSClient) DestroySecret(ctx context.Context, id string) (*secretsmanager.DeleteSecretOutput, error)

func (*AWSClient) GetAlias

func (c *AWSClient) GetAlias(_ context.Context, keyID string) (string, error)

func (*AWSClient) GetPublicKey

func (c *AWSClient) GetPublicKey(_ context.Context, keyID string) (*kms.GetPublicKeyOutput, error)

func (*AWSClient) GetSecret

func (c *AWSClient) GetSecret(_ context.Context, id, version string) (*secretsmanager.GetSecretValueOutput, error)

func (*AWSClient) ListKeys

func (c *AWSClient) ListKeys(_ context.Context, limit int64, marker string) (*kms.ListKeysOutput, error)

func (*AWSClient) ListSecrets

func (c *AWSClient) ListSecrets(_ context.Context, maxResults int64, nextToken string) (*secretsmanager.ListSecretsOutput, error)

func (*AWSClient) ListTags

func (c *AWSClient) ListTags(_ context.Context, keyID, marker string) (*kms.ListResourceTagsOutput, error)

func (*AWSClient) PutSecretValue

func (c *AWSClient) PutSecretValue(_ context.Context, id, value string) (*secretsmanager.PutSecretValueOutput, error)

func (*AWSClient) RestoreKey

func (c *AWSClient) RestoreKey(ctx context.Context, keyID string) (*kms.CancelKeyDeletionOutput, error)

func (*AWSClient) RestoreSecret

func (*AWSClient) Sign

func (c *AWSClient) Sign(_ context.Context, keyID string, msg []byte, signingAlgorithm string) (*kms.SignOutput, error)

func (*AWSClient) TagResource

func (c *AWSClient) TagResource(_ context.Context, keyID string, tags []*kms.Tag) (*kms.TagResourceOutput, error)

func (*AWSClient) TagSecretResource

func (c *AWSClient) TagSecretResource(_ context.Context, id string, tags map[string]string) (*secretsmanager.TagResourceOutput, error)

func (*AWSClient) UntagResource

func (c *AWSClient) UntagResource(_ context.Context, keyID string, tagKeys []*string) (*kms.UntagResourceOutput, error)

func (*AWSClient) UpdateSecret

func (c *AWSClient) UpdateSecret(_ context.Context, id, value, keyID, desc string) (*secretsmanager.UpdateSecretOutput, error)

type Config

type Config struct {
	Region    string
	AccessID  string
	SecretKey string
	Debug     bool
}

func NewConfig

func NewConfig(cfg *entities.AWSConfig) *Config

func (*Config) ToAWSConfig

func (c *Config) ToAWSConfig() *aws.Config

Jump to

Keyboard shortcuts

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