Documentation
¶
Index ¶
- type Secret
- type SecretsManagerService
- func (s *SecretsManagerService) Actions() []service.Action
- func (s *SecretsManagerService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
- func (s *SecretsManagerService) HealthCheck() error
- func (s *SecretsManagerService) Name() string
- func (s *SecretsManagerService) ResourceSchemas() []schema.ResourceSchema
- type Store
- func (s *Store) CreateSecret(name, description, secretString string, secretBinary []byte, ...) (*Secret, *service.AWSError)
- func (s *Store) DeleteSecret(secretID string, forceDelete bool) (*Secret, *service.AWSError)
- func (s *Store) DescribeSecret(secretID string) (*Secret, *service.AWSError)
- func (s *Store) GetSecret(secretID string) (*Secret, *service.AWSError)
- func (s *Store) ListSecrets() []*Secret
- func (s *Store) PutSecretValue(secretID, secretString string, secretBinary []byte) (*Secret, *service.AWSError)
- func (s *Store) RestoreSecret(secretID string) (*Secret, *service.AWSError)
- func (s *Store) TagResource(secretID string, tags map[string]string) *service.AWSError
- func (s *Store) UntagResource(secretID string, tagKeys []string) *service.AWSError
- func (s *Store) UpdateSecret(secretID, description, secretString string) (*Secret, *service.AWSError)
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 ¶
func (s *SecretsManagerService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
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 (*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 ¶
DeleteSecret marks a secret as deleted.
func (*Store) DescribeSecret ¶
DescribeSecret returns metadata for a secret.
func (*Store) ListSecrets ¶
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 ¶
RestoreSecret undeletes a secret.
func (*Store) TagResource ¶
TagResource adds or replaces tags on a secret.
func (*Store) UntagResource ¶
UntagResource removes tags from a secret.