Documentation
¶
Overview ¶
Package secret provides use cases for Secrets Manager operations.
Index ¶
- type CreateClient
- type CreateInput
- type CreateOutput
- type CreateUseCase
- type DeleteClient
- type DeleteInput
- type DeleteOutput
- type DeleteUseCase
- type DiffClient
- type DiffInput
- type DiffOutput
- type DiffUseCase
- type ListClient
- type ListEntry
- type ListInput
- type ListOutput
- type ListUseCase
- type LogClient
- type LogEntry
- type LogInput
- type LogOutput
- type LogUseCase
- type RestoreClient
- type RestoreInput
- type RestoreOutput
- type RestoreUseCase
- type ShowClient
- type ShowInput
- type ShowOutput
- type ShowTag
- type ShowUseCase
- type TagClient
- type TagInput
- type TagUseCase
- type UpdateClient
- type UpdateInput
- type UpdateOutput
- type UpdateUseCase
- type VersionResolverClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateClient ¶
type CreateClient interface {
secretapi.CreateSecretAPI
}
CreateClient is the interface for the create use case.
type CreateInput ¶
CreateInput holds input for the create use case.
type CreateOutput ¶
CreateOutput holds the result of the create use case.
type CreateUseCase ¶
type CreateUseCase struct {
Client CreateClient
}
CreateUseCase executes create operations.
func (*CreateUseCase) Execute ¶
func (u *CreateUseCase) Execute(ctx context.Context, input CreateInput) (*CreateOutput, error)
Execute runs the create use case.
type DeleteClient ¶
type DeleteClient interface {
secretapi.DeleteSecretAPI
secretapi.GetSecretValueAPI
}
DeleteClient is the interface for the delete use case.
type DeleteInput ¶
type DeleteInput struct {
Name string
Force bool // Force immediate deletion
RecoveryWindow int64 // Days before permanent deletion (7-30)
}
DeleteInput holds input for the delete use case.
type DeleteOutput ¶
DeleteOutput holds the result of the delete use case.
type DeleteUseCase ¶
type DeleteUseCase struct {
Client DeleteClient
}
DeleteUseCase executes delete operations.
func (*DeleteUseCase) Execute ¶
func (u *DeleteUseCase) Execute(ctx context.Context, input DeleteInput) (*DeleteOutput, error)
Execute runs the delete use case.
func (*DeleteUseCase) GetCurrentValue ¶
GetCurrentValue fetches the current secret value for preview.
type DiffClient ¶
type DiffClient = VersionResolverClient
DiffClient is the interface for the diff use case.
type DiffInput ¶
type DiffInput struct {
Spec1 *secretversion.Spec
Spec2 *secretversion.Spec
}
DiffInput holds input for the diff use case.
type DiffOutput ¶
type DiffOutput struct {
OldName string
OldVersionID string
OldValue string
NewName string
NewVersionID string
NewValue string
}
DiffOutput holds the result of the diff use case.
type DiffUseCase ¶
type DiffUseCase struct {
Client DiffClient
}
DiffUseCase executes diff operations.
func (*DiffUseCase) Execute ¶
func (u *DiffUseCase) Execute(ctx context.Context, input DiffInput) (*DiffOutput, error)
Execute runs the diff use case.
type ListClient ¶
type ListClient interface {
secretapi.ListSecretsAPI
secretapi.GetSecretValueAPI
}
ListClient is the interface for the list use case.
type ListInput ¶
type ListInput struct {
Prefix string // AWS-side name filter (substring match)
Filter string // Regex filter pattern (client-side)
WithValue bool // Include secret values
MaxResults int // Max results per page (0 = all)
NextToken string // Pagination token
}
ListInput holds input for the list use case.
type ListOutput ¶
ListOutput holds the result of the list use case.
type ListUseCase ¶
type ListUseCase struct {
Client ListClient
}
ListUseCase executes list operations.
func (*ListUseCase) Execute ¶
func (u *ListUseCase) Execute(ctx context.Context, input ListInput) (*ListOutput, error)
Execute runs the list use case.
type LogClient ¶
type LogClient = VersionResolverClient
LogClient is the interface for the log use case.
type LogEntry ¶
type LogEntry struct {
VersionID string
VersionStage []string
Value string
CreatedDate *time.Time
IsCurrent bool
Error error // Error from fetching value, if any
}
LogEntry represents a single version entry.
type LogInput ¶
type LogInput struct {
Name string
MaxResults int32
Since *time.Time
Until *time.Time
Reverse bool // Reverse chronological order
}
LogInput holds input for the log use case.
type RestoreClient ¶
type RestoreClient interface {
secretapi.RestoreSecretAPI
}
RestoreClient is the interface for the restore use case.
type RestoreInput ¶
type RestoreInput struct {
Name string
}
RestoreInput holds input for the restore use case.
type RestoreOutput ¶
RestoreOutput holds the result of the restore use case.
type RestoreUseCase ¶
type RestoreUseCase struct {
Client RestoreClient
}
RestoreUseCase executes restore operations.
func (*RestoreUseCase) Execute ¶
func (u *RestoreUseCase) Execute(ctx context.Context, input RestoreInput) (*RestoreOutput, error)
Execute runs the restore use case.
type ShowClient ¶
type ShowClient interface {
secretapi.GetSecretValueAPI
secretapi.ListSecretVersionIDsAPI
secretapi.DescribeSecretAPI
}
ShowClient is the interface for the show use case.
type ShowInput ¶
type ShowInput struct {
Spec *secretversion.Spec
}
ShowInput holds input for the show use case.
type ShowOutput ¶
type ShowOutput struct {
Name string
ARN string
Value string
VersionID string
VersionStage []string
Description string
CreatedDate *time.Time
Tags []ShowTag
}
ShowOutput holds the result of the show use case.
type ShowUseCase ¶
type ShowUseCase struct {
Client ShowClient
}
ShowUseCase executes show operations.
func (*ShowUseCase) Execute ¶
func (u *ShowUseCase) Execute(ctx context.Context, input ShowInput) (*ShowOutput, error)
Execute runs the show use case.
type TagClient ¶ added in v0.2.0
type TagClient interface {
secretapi.DescribeSecretAPI
secretapi.TagResourceAPI
secretapi.UntagResourceAPI
}
TagClient is the interface for the tag use case.
type TagInput ¶ added in v0.2.0
type TagInput struct {
Name string
Add map[string]string // Tags to add or update
Remove []string // Tag keys to remove
}
TagInput holds input for the tag use case.
type TagUseCase ¶ added in v0.2.0
type TagUseCase struct {
Client TagClient
}
TagUseCase executes tag operations.
type UpdateClient ¶
type UpdateClient interface {
secretapi.GetSecretValueAPI
secretapi.UpdateSecretAPI
secretapi.PutSecretValueAPI
}
UpdateClient is the interface for the update use case.
type UpdateInput ¶
UpdateInput holds input for the update use case.
type UpdateOutput ¶
UpdateOutput holds the result of the update use case.
type UpdateUseCase ¶
type UpdateUseCase struct {
Client UpdateClient
}
UpdateUseCase executes update operations.
func (*UpdateUseCase) Execute ¶
func (u *UpdateUseCase) Execute(ctx context.Context, input UpdateInput) (*UpdateOutput, error)
Execute runs the update use case.
func (*UpdateUseCase) GetCurrentValue ¶
GetCurrentValue fetches the current secret value.
type VersionResolverClient ¶ added in v0.7.0
type VersionResolverClient interface {
secretapi.GetSecretValueAPI
secretapi.ListSecretVersionIDsAPI
}
VersionResolverClient is the shared interface for use cases that need secret version resolution (listing versions and fetching values).