Documentation ¶
Index ¶
- Variables
- func ListAWSObjectsByName[ListOutput any, DescribeInput any, DescribeOutput any, NamedItem any](ctx context.Context, objectName string, paginator AWSPaginator[ListOutput], ...) (map[arn]string, error)
- func NewUsageError(err error) error
- func RunAddWorkflow() error
- func UsageErrorf(f string, args ...interface{}) error
- type AWSPaginator
- type AddWorkflow
- type AddWorkflowState
- type UnauthorizedOperationError
- type UsageError
Constants ¶
This section is empty.
Variables ¶
var AddToECSCmd = &cobra.Command{ Use: "add", Short: Cmd.Short, Long: Cmd.Long, SilenceUsage: true, RunE: addAgentToECS, }
'postman-lc-agent ecs' should default to 'postman-lc-agent ecs add'
var Cmd = &cobra.Command{ Use: "ecs", Short: "Add the Postman Live Collections Agent to AWS ECS.", Long: "The CLI will collect information from you and add the Postman Live Collections Agent container to an ECS Task.", SilenceUsage: true, RunE: addAgentToECS, }
var NoSuchClusterError = errors.New("No such cluster")
var NoSuchProfileError = errors.New("No such profile")
Error indicating profile is absent. TODO: stop mixing error.Is and error.As usage?
var RemoveFromECSCmd = &cobra.Command{ Use: "remove", Short: "Remove the Postman Live Collections Agent from AWS ECS.", Long: "Remove a previously installed Postman container from an ECS Task.", SilenceUsage: true, RunE: removeAgentFromECS, Hidden: true, }
Functions ¶
func ListAWSObjectsByName ¶ added in v0.22.0
func ListAWSObjectsByName[ ListOutput any, DescribeInput any, DescribeOutput any, NamedItem any, ]( ctx context.Context, objectName string, paginator AWSPaginator[ListOutput], getArns func(ListOutput) []arn, inputFactory func([]arn) DescribeInput, describe func(context.Context, DescribeInput) (DescribeOutput, error), extract func(DescribeOutput) []NamedItem, convert func(NamedItem) (arn, string), ) (map[arn]string, error)
func NewUsageError ¶
func RunAddWorkflow ¶
func RunAddWorkflow() error
Run the "add to ECS" workflow until we complete or get an error. Errors that are UsageErrors should be returned as-is; other errors should be wrapped to avoid showing usage. (This is reversed from the other command conventions, but there are relatively few usage errors here.)
func UsageErrorf ¶
Types ¶
type AWSPaginator ¶ added in v0.22.0
type AWSPaginator[ListOutput any] interface { HasMorePages() bool NextPage(context.Context, ...func(*ecs.Options)) (ListOutput, error) }
Interface of the Paginator returned by the ECS package. TODO: should we make this take the Options type as an extra parameter, so it can be used with other packages?
type AddWorkflow ¶
type AddWorkflow struct {
// contains filtered or unexported fields
}
func (*AddWorkflow) GetDeploymentByID ¶ added in v0.22.0
func (wf *AddWorkflow) GetDeploymentByID(serviceARN arn, deploymentID string) (types.Deployment, error)
func (*AddWorkflow) GetDeploymentMatchingTask ¶ added in v0.22.0
func (wf *AddWorkflow) GetDeploymentMatchingTask(serviceARN arn) (string, types.Deployment, error)
Returns the deployment of the given service that matches the ECS task definition configured in the workflow. For convenience, the deployment ID is also returned as a string.
type AddWorkflowState ¶
type AddWorkflowState func(*AddWorkflow) (next optionals.Optional[AddWorkflowState], err error)
A function which executes the next part of the workflow, and picks a next state (Some) or exits (None), or signals an eror.
type UnauthorizedOperationError ¶
type UnauthorizedOperationError struct {}
Error indicating the user was unauthorized.
func (UnauthorizedOperationError) Error ¶
func (e UnauthorizedOperationError) Error() string
type UsageError ¶
type UsageError struct {
// contains filtered or unexported fields
}
func (UsageError) Error ¶
func (ue UsageError) Error() string