-
Notifications
You must be signed in to change notification settings - Fork 394
/
prompter.go
16 lines (13 loc) · 963 Bytes
/
prompter.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import "github.com/aws/copilot-cli/internal/pkg/term/prompt"
type prompter interface {
Get(message, help string, validator prompt.ValidatorFunc, promptOpts ...prompt.PromptConfig) (string, error)
GetSecret(message, help string, promptOpts ...prompt.PromptConfig) (string, error)
SelectOne(message, help string, options []string, promptOpts ...prompt.PromptConfig) (string, error)
MultiSelect(message, help string, options []string, validator prompt.ValidatorFunc, promptOpts ...prompt.PromptConfig) ([]string, error)
Confirm(message, help string, promptOpts ...prompt.PromptConfig) (bool, error)
SelectOption(message, help string, opts []prompt.Option, promptCfgs ...prompt.PromptConfig) (value string, err error)
MultiSelectOptions(message, help string, opts []prompt.Option, promptCfgs ...prompt.PromptConfig) ([]string, error)
}