You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
454 B
22 lines
454 B
4 years ago
|
package input
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
type ReadInput interface {
|
||
|
Bind(ctx context.Context, def *Definition) error
|
||
|
|
||
|
ReadOption(ctx context.Context, name string) (Value, error)
|
||
|
SetOption(name string, value Value)
|
||
|
|
||
|
ReadArgument(ctx context.Context, name string) (Value, error)
|
||
|
SetArgument(name string, value Value)
|
||
|
}
|
||
|
|
||
|
type Input interface {
|
||
|
Option(ctx context.Context, name string) Value
|
||
|
Argument(ctx context.Context, name string) Value
|
||
|
ReadInput
|
||
|
}
|