Documentation
¶
Overview ¶
Package param provides use cases for SSM Parameter Store operations.
Index ¶
- Variables
- 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 ShowClient
- type ShowInput
- type ShowOutput
- type ShowTag
- type ShowUseCase
- type TagClient
- type TagInput
- type TagUseCase
- type UpdateClient
- type UpdateInput
- type UpdateOutput
- type UpdateUseCase
Constants ¶
This section is empty.
Variables ¶
var ( // ErrParameterNotFound is returned when a parameter is not found. ErrParameterNotFound = errors.New("parameter not found") )
Functions ¶
This section is empty.
Types ¶
type CreateClient ¶ added in v0.5.0
type CreateClient interface {
paramapi.PutParameterAPI
}
CreateClient is the interface for the create use case.
type CreateInput ¶ added in v0.5.0
type CreateInput struct {
Name string
Value string
Type paramapi.ParameterType
Description string
}
CreateInput holds input for the create use case.
type CreateOutput ¶ added in v0.5.0
CreateOutput holds the result of the create use case.
type CreateUseCase ¶ added in v0.5.0
type CreateUseCase struct {
Client CreateClient
}
CreateUseCase executes create operations.
func (*CreateUseCase) Execute ¶ added in v0.5.0
func (u *CreateUseCase) Execute(ctx context.Context, input CreateInput) (*CreateOutput, error)
Execute runs the create use case. It creates a new parameter. If the parameter already exists, returns an error.
type DeleteClient ¶
type DeleteClient interface {
paramapi.DeleteParameterAPI
paramapi.GetParameterAPI
}
DeleteClient is the interface for the delete use case.
type DeleteInput ¶
type DeleteInput struct {
Name string
}
DeleteInput holds input for the delete use case.
type DeleteOutput ¶
type DeleteOutput struct {
Name string
}
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 value for preview.
type DiffClient ¶
type DiffClient interface {
paramapi.GetParameterAPI
paramapi.GetParameterHistoryAPI
}
DiffClient is the interface for the diff use case.
type DiffInput ¶
type DiffInput struct {
Spec1 *paramversion.Spec
Spec2 *paramversion.Spec
}
DiffInput holds input for the diff use case.
type DiffOutput ¶
type DiffOutput struct {
OldName string
OldVersion int64
OldValue string
NewName string
NewVersion int64
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 {
paramapi.DescribeParametersAPI
paramapi.GetParametersAPI
}
ListClient is the interface for the list use case.
type ListEntry ¶
type ListEntry struct {
Name string
Type string // String, SecureString, or StringList
Value *string // nil when error or not requested
Error error
}
ListEntry represents a single parameter in list output.
type ListInput ¶
type ListInput struct {
Prefix string
Recursive bool
Filter string // Regex filter pattern
WithValue bool // Include parameter 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 interface {
paramapi.GetParameterHistoryAPI
}
LogClient is the interface for the log use case.
type LogEntry ¶
type LogEntry struct {
Version int64
Type paramapi.ParameterType
Value string
LastModified *time.Time
IsCurrent bool
}
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 ShowClient ¶
type ShowClient interface {
paramapi.GetParameterAPI
paramapi.GetParameterHistoryAPI
paramapi.ListTagsForResourceAPI
}
ShowClient is the interface for the show use case.
type ShowInput ¶
type ShowInput struct {
Spec *paramversion.Spec
}
ShowInput holds input for the show use case.
type ShowOutput ¶
type ShowOutput struct {
Name string
Value string
Version int64
Type paramapi.ParameterType
Description string
LastModified *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 {
paramapi.AddTagsToResourceAPI
paramapi.RemoveTagsFromResourceAPI
}
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 ¶ added in v0.5.0
type UpdateClient interface {
paramapi.GetParameterAPI
paramapi.PutParameterAPI
}
UpdateClient is the interface for the update use case.
type UpdateInput ¶ added in v0.5.0
type UpdateInput struct {
Name string
Value string
Type paramapi.ParameterType
Description string
}
UpdateInput holds input for the update use case.
type UpdateOutput ¶ added in v0.5.0
UpdateOutput holds the result of the update use case.
type UpdateUseCase ¶ added in v0.5.0
type UpdateUseCase struct {
Client UpdateClient
}
UpdateUseCase executes update operations.
func (*UpdateUseCase) Execute ¶ added in v0.5.0
func (u *UpdateUseCase) Execute(ctx context.Context, input UpdateInput) (*UpdateOutput, error)
Execute runs the update use case. It updates an existing parameter. If the parameter doesn't exist, returns an error.