secretsmanager

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secret

type Secret struct {
	Name            string
	ARN             string
	Description     string
	SecretString    string
	SecretBinary    []byte
	VersionId       string
	VersionStages   []string
	CreatedDate     time.Time
	LastChangedDate time.Time
	DeletedDate     *time.Time
	Tags            map[string]string
	IsDeleted       bool
}

Secret holds all metadata and value for a Secrets Manager secret.

type SecretsManagerService

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

SecretsManagerService is the cloudmock implementation of the AWS Secrets Manager API.

func New

func New(accountID, region string) *SecretsManagerService

New returns a new SecretsManagerService for the given AWS account ID and region.

func (*SecretsManagerService) Actions

func (s *SecretsManagerService) Actions() []service.Action

Actions returns the list of Secrets Manager API actions supported by this service.

func (*SecretsManagerService) HandleRequest

HandleRequest routes an incoming Secrets Manager request to the appropriate handler. Secrets Manager uses the JSON protocol; the action is parsed from X-Amz-Target by the gateway and placed in ctx.Action (e.g. "CreateSecret").

func (*SecretsManagerService) HealthCheck

func (s *SecretsManagerService) HealthCheck() error

HealthCheck always returns nil (no external dependencies).

func (*SecretsManagerService) Name

func (s *SecretsManagerService) Name() string

Name returns the AWS service name used for routing.

func (*SecretsManagerService) ResourceSchemas

func (s *SecretsManagerService) ResourceSchemas() []schema.ResourceSchema

ResourceSchemas returns the schema for Secrets Manager resource types.

type Store

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

Store is the in-memory store for Secrets Manager secrets.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty Secrets Manager Store.

func (*Store) CreateSecret

func (s *Store) CreateSecret(name, description, secretString string, secretBinary []byte, tags map[string]string) (*Secret, *service.AWSError)

CreateSecret adds a new secret to the store.

func (*Store) DeleteSecret

func (s *Store) DeleteSecret(secretID string, forceDelete bool) (*Secret, *service.AWSError)

DeleteSecret marks a secret as deleted.

func (*Store) DescribeSecret

func (s *Store) DescribeSecret(secretID string) (*Secret, *service.AWSError)

DescribeSecret returns metadata for a secret.

func (*Store) GetSecret

func (s *Store) GetSecret(secretID string) (*Secret, *service.AWSError)

GetSecret retrieves a secret by name or ARN.

func (*Store) ListSecrets

func (s *Store) ListSecrets() []*Secret

ListSecrets returns all non-deleted secrets.

func (*Store) PutSecretValue

func (s *Store) PutSecretValue(secretID, secretString string, secretBinary []byte) (*Secret, *service.AWSError)

PutSecretValue creates a new version of the secret value.

func (*Store) RestoreSecret

func (s *Store) RestoreSecret(secretID string) (*Secret, *service.AWSError)

RestoreSecret undeletes a secret.

func (*Store) TagResource

func (s *Store) TagResource(secretID string, tags map[string]string) *service.AWSError

TagResource adds or replaces tags on a secret.

func (*Store) UntagResource

func (s *Store) UntagResource(secretID string, tagKeys []string) *service.AWSError

UntagResource removes tags from a secret.

func (*Store) UpdateSecret

func (s *Store) UpdateSecret(secretID, description, secretString string) (*Secret, *service.AWSError)

UpdateSecret updates description and/or secret value.

Jump to

Keyboard shortcuts

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