]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/hashicorp/terraform/terraform/ui_input.go
Merge branch 'fix_read_test' of github.com:alexandreFre/terraform-provider-statuscake
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / terraform / ui_input.go
CommitLineData
bae9f6d2
JC
1package terraform
2
107c1cdb
ND
3import "context"
4
bae9f6d2
JC
5// UIInput is the interface that must be implemented to ask for input
6// from this user. This should forward the request to wherever the user
7// inputs things to ask for values.
8type UIInput interface {
107c1cdb 9 Input(context.Context, *InputOpts) (string, error)
bae9f6d2
JC
10}
11
12// InputOpts are options for asking for input.
13type InputOpts struct {
14 // Id is a unique ID for the question being asked that might be
15 // used for logging or to look up a prior answered question.
16 Id string
17
18 // Query is a human-friendly question for inputting this value.
19 Query string
20
21 // Description is a description about what this option is. Be wary
22 // that this will probably be in a terminal so split lines as you see
23 // necessary.
24 Description string
25
26 // Default will be the value returned if no data is entered.
27 Default string
28}