Documentation ¶
Index ¶
Constants ¶
View Source
const (
KeyEksctlVersion = "eksctl_version"
)
Variables ¶
View Source
var Bool = Tpe{ Type: schema.TypeBool, Args: func(key, flag string, def interface{}, d api.Getter) (args []string) { if v, ok := d.Get(key).(bool); ok { if def != nil { if def.(bool) != v { args = append(args, "--"+flag) } } else if v { args = append(args, "--"+flag) } } return }, }
View Source
var Int = Tpe{ Type: schema.TypeInt, Args: func(key, flag string, def interface{}, d api.Getter) (args []string) { if v, ok := d.Get(key).(int); ok { if def != nil { if def.(int) != v { args = append(args, "--"+flag) } } else if v > 0 { args = append(args, "--"+flag, fmt.Sprintf("%d", v)) } } return }, }
View Source
var String = Tpe{ Type: schema.TypeString, Args: func(key, flag string, def interface{}, d api.Getter) (args []string) { if v, ok := d.Get(key).(string); ok && v != "" { args = append(args, "--"+flag, v) } return }, }
View Source
var StringMap = Tpe{ Type: schema.TypeMap, Elem: &schema.Schema{ Type: schema.TypeString, }, Args: func(key, flag string, def interface{}, d api.Getter) (args []string) { if m, ok := d.Get(key).(map[string]interface{}); ok && len(m) > 0 { var vs []string for k, v := range m { vs = append(vs, fmt.Sprintf("%s=%v", k, v)) } args = append(args, "--"+flag, strings.Join(vs, ",")) } return }, }
View Source
var Strings = Tpe{ Type: schema.TypeList, Elem: &schema.Schema{ Type: schema.TypeString, }, Args: func(key, flag string, def interface{}, d api.Getter) (args []string) { if vs, ok := d.Get(key).([]interface{}); ok && len(vs) > 0 { var ss []string for _, v := range vs { ss = append(ss, fmt.Sprintf("%v", v)) } args = append(args, "--"+flag, strings.Join(ss, ",")) } return }, }
Functions ¶
Types ¶
type SchemaOption ¶
Click to show internal directories.
Click to hide internal directories.