2014-09-29 08:37:36 +02:00
|
|
|
package terraform
|
|
|
|
|
|
|
|
// UIInput is the interface that must be implemented to ask for input
|
|
|
|
// from this user. This should forward the request to wherever the user
|
|
|
|
// inputs things to ask for values.
|
|
|
|
type UIInput interface {
|
|
|
|
Input(*InputOpts) (string, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
// InputOpts are options for asking for input.
|
|
|
|
type InputOpts struct {
|
|
|
|
// Id is a unique ID for the question being asked that might be
|
|
|
|
// used for logging or to look up a prior answered question.
|
2014-09-29 22:51:16 +02:00
|
|
|
Id string
|
2014-09-29 08:37:36 +02:00
|
|
|
|
|
|
|
// Query is a human-friendly question for inputting this value.
|
|
|
|
Query string
|
2014-09-29 22:12:06 +02:00
|
|
|
|
|
|
|
// Description is a description about what this option is. Be wary
|
|
|
|
// that this will probably be in a terminal so split lines as you see
|
|
|
|
// necessary.
|
|
|
|
Description string
|
2014-09-29 22:51:16 +02:00
|
|
|
|
|
|
|
// Default will be the value returned if no data is entered.
|
2014-09-29 23:00:35 +02:00
|
|
|
Default string
|
2014-09-29 08:37:36 +02:00
|
|
|
}
|