2015-12-09 17:15:46 +00:00
|
|
|
package altsrc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2016-05-22 22:30:07 +00:00
|
|
|
"github.com/urfave/cli"
|
2015-12-09 17:15:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// InputSourceContext is an interface used to allow
|
|
|
|
// other input sources to be implemented as needed.
|
|
|
|
type InputSourceContext interface {
|
|
|
|
Int(name string) (int, error)
|
|
|
|
Duration(name string) (time.Duration, error)
|
|
|
|
Float64(name string) (float64, error)
|
|
|
|
String(name string) (string, error)
|
|
|
|
StringSlice(name string) ([]string, error)
|
|
|
|
IntSlice(name string) ([]int, error)
|
|
|
|
Generic(name string) (cli.Generic, error)
|
|
|
|
Bool(name string) (bool, error)
|
|
|
|
}
|