Documentation
¶
Index ¶
- Variables
- func Confirm(ctx context.Context, broker *Broker, confirmation Confirmation) error
- func ConfirmWithin(ctx context.Context, broker *Broker, confirmation Confirmation, ...) error
- type Broker
- func (self *Broker) Ask(ctx context.Context, question Question) (int, error)
- func (self *Broker) AskWithin(ctx context.Context, question Question, lapseAfter time.Duration) (int, error)
- func (self *Broker) Changes() <-chan struct{}
- func (self *Broker) Current() *Request
- func (self *Broker) Open() func()
- type Choice
- type Confirmation
- type Field
- type Option
- type Question
- type Request
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCancelled = errors.New("the question was cancelled") )
View Source
var ErrDenied = errors.New("the request was denied")
Functions ¶
func ConfirmWithin ¶ added in v0.11.0
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
type Confirmation ¶
type Confirmation struct {
Label string
Intent string
Detail string
Language string
Fields []Field
}
func (Confirmation) Question ¶
func (self Confirmation) Question() Question
Click to show internal directories.
Click to hide internal directories.