Documentation ¶
Index ¶
- Constants
- Variables
- func GetOutputFormats() []string
- func GetYaml(v interface{}) (string, error)
- func LastItems(items []interface{}, last int) []interface{}
- func LoadConfig(configFile string) error
- func LoadTaskConfig(taskFile string) error
- func MarshalModel(obj interface{}, indent bool) string
- func PathExtSplit(file string) (string, string)
- func PrintAggregate(aggregate nova.Aggregate)
- func PrintPrettyItemTable(table PrettyItemTable) string
- func PrintPrettyTable(table PrettyTable, long bool) string
- func PrintPrettyTableFormat(table PrettyTable, long bool, format string) string
- func RegistryLongFlag(cmd ...*cobra.Command)
- func RepeatFunc(nums int, function func())
- func SplitKeyValue(kv string) ([]string, error)
- func ValidIpv4(cidr string, maxMask ...int) bool
- type Api
- type Auth
- type Column
- type ConfGroup
- type Identity
- type InterfaceHotplug
- type LiveMigrateOptions
- type NeutronConf
- type PrettyItemTable
- type PrettyTable
- func (pt *PrettyTable) AddDisplayFields(fields ...string)
- func (pt *PrettyTable) AddItems(items interface{})
- func (pt *PrettyTable) CleanItems()
- func (pt PrettyTable) GetLongColumnIndex(column string) int
- func (pt PrettyTable) GetShortColumnIndex(column string) int
- func (pt PrettyTable) Print(long bool) string
- func (pt PrettyTable) PrintJson() string
- func (pt PrettyTable) PrintYaml() string
- func (pt *PrettyTable) ReInit()
- func (pt PrettyTable) RenderToJson() (string, error)
- func (pt PrettyTable) RenderToTable(long bool) string
- func (pt PrettyTable) RenderToYaml() (string, error)
- func (pt *PrettyTable) SetStyleLight()
- type QGAChecker
- type ServerActionsTestConf
- type VolumeHotplug
- type Web
Constants ¶
View Source
const ( DEFAULT = "default" TABLE = "table" TABLE_LIGHT = "table-light" JSON = "json" YAML = "yaml" )
Variables ¶
View Source
var ( CONF ConfGroup CONF_FILE string )
View Source
var ( FORMAT_TABLE_LIGHT = "table-light" FORMAT_TABLE = "table" DEFAULT_TOKEN_EXPIRE_TIME = 60 * 30 )
View Source
var ( DEFAULT_GUEST_CONNECT_TIMEOUT = 60 * 5 DEFAULT_QGA_CONNECT_TIMEOUT = 60 * 10 DEFAULT_PING_INTERVAL = float32(1.0) )
View Source
var CONF_FILES = []string{
"etc/skyman.yaml",
"/etc/skyman/skyman.yaml",
}
View Source
var (
STYLE_LIGHT = "light"
)
Functions ¶
func GetOutputFormats ¶
func GetOutputFormats() []string
func LoadConfig ¶
func LoadTaskConfig ¶
func MarshalModel ¶
func PathExtSplit ¶
func PrintAggregate ¶
func PrintPrettyItemTable ¶
func PrintPrettyItemTable(table PrettyItemTable) string
func PrintPrettyTable ¶
func PrintPrettyTable(table PrettyTable, long bool) string
func PrintPrettyTableFormat ¶
func PrintPrettyTableFormat(table PrettyTable, long bool, format string) string
func RegistryLongFlag ¶
func RepeatFunc ¶
func RepeatFunc(nums int, function func())
func SplitKeyValue ¶
Types ¶
type Column ¶
type Column struct { Name string Text string // 只有 Table.Style 等于 light 是才会生效 AutoColor bool ForceColor bool Slot func(item interface{}) interface{} SlotColumn func(item interface{}, column Column) interface{} Sort bool SortMode table.SortMode Filters []string Marshal bool WidthMax int Align text.Align }
type ConfGroup ¶
type ConfGroup struct { Debug bool `yaml:"debug"` Format string `yaml:"format"` Language string `yaml:"language"` HttpTimeout int `yaml:"httpTimeout"` LogFile string `yaml:"logFile"` EnableLogColor bool `yaml:"enableLogColor"` Auth Auth `yaml:"auth"` Identity Identity `yaml:"identity"` Neutron NeutronConf `yaml:"neutron"` }
type InterfaceHotplug ¶
type InterfaceHotplug struct {
Nums int `yaml:"nums"`
}
type LiveMigrateOptions ¶
type NeutronConf ¶
type NeutronConf struct {
Endpoint string `yaml:"endpoint"`
}
type PrettyItemTable ¶
type PrettyItemTable struct { ShortFields []Column LongFields []Column Item interface{} Title string Style string Number2WidthMax int }
func (PrettyItemTable) Print ¶
func (pt PrettyItemTable) Print(long bool) string
func (PrettyItemTable) PrintJson ¶
func (dt PrettyItemTable) PrintJson() string
func (PrettyItemTable) PrintYaml ¶
func (dt PrettyItemTable) PrintYaml() string
type PrettyTable ¶
type PrettyTable struct { Title string ShortColumns []Column LongColumns []Column Items []interface{} ColumnConfigs []table.ColumnConfig Style string StyleSeparateRows bool HideTotalItems bool Filters map[string]string Search string DisplayFields []string // contains filtered or unexported fields }
func (*PrettyTable) AddDisplayFields ¶
func (pt *PrettyTable) AddDisplayFields(fields ...string)
func (*PrettyTable) AddItems ¶
func (pt *PrettyTable) AddItems(items interface{})
func (*PrettyTable) CleanItems ¶
func (pt *PrettyTable) CleanItems()
func (PrettyTable) GetLongColumnIndex ¶
func (pt PrettyTable) GetLongColumnIndex(column string) int
func (PrettyTable) GetShortColumnIndex ¶
func (pt PrettyTable) GetShortColumnIndex(column string) int
func (PrettyTable) Print ¶
func (pt PrettyTable) Print(long bool) string
func (PrettyTable) PrintJson ¶
func (pt PrettyTable) PrintJson() string
func (PrettyTable) PrintYaml ¶
func (pt PrettyTable) PrintYaml() string
func (*PrettyTable) ReInit ¶
func (pt *PrettyTable) ReInit()
func (PrettyTable) RenderToJson ¶
func (pt PrettyTable) RenderToJson() (string, error)
func (PrettyTable) RenderToTable ¶
func (pt PrettyTable) RenderToTable(long bool) string
func (PrettyTable) RenderToYaml ¶
func (pt PrettyTable) RenderToYaml() (string, error)
func (*PrettyTable) SetStyleLight ¶
func (pt *PrettyTable) SetStyleLight()
type QGAChecker ¶
type ServerActionsTestConf ¶
type ServerActionsTestConf struct { Total int `yaml:"total"` Workers int `yaml:"workers"` Web Web `yaml:"web"` ActionTasks []string `yaml:"actionTasks"` DeleteIfError bool `yaml:"deleteIfError"` AvailabilityZone string `yaml:"availabilityZone"` BootFromVolume bool `yaml:"bootFromVolume"` BootVolumeSize uint16 `yaml:"bootVolumeSize"` BootVolumeType string `yaml:"bootVolumeType"` BootWithSG string `yaml:"bootWithSG"` Flavors []string `yaml:"flavors"` Images []string `yaml:"images"` Networks []string `yaml:"networks"` VolumeType string `yaml:"volumeType"` VolumeSize int `yaml:"volumeSize"` InterfaceHotplug InterfaceHotplug `yaml:"interfaceHotplug"` VolumeHotplug VolumeHotplug `yaml:"volumeHotplug"` UseServers []string `yaml:"userServers"` ActionInterval int `yaml:"actionInterval"` QGAChecker QGAChecker `yaml:"qgaChecker"` LiveMigrate LiveMigrateOptions `yaml:"liveMigrate"` }
var (
TASK_CONF ServerActionsTestConf
)
type VolumeHotplug ¶
type VolumeHotplug struct {
Nums int `yaml:"nums"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.