Documentation ¶
Index ¶
- Constants
- Variables
- func ExportList(list *printutils.ListResult, file string, exportKeys string, ...)
- func InvalidUpdateError() error
- func OutputFormat(s string)
- func PrintList(list *printutils.ListResult, columns []string)
- func PrintObject(obj jsonutils.JSONObject)
- func R(options interface{}, command string, desc string, callback interface{})
- type CMD
- type IBatchCreateOpt
- type IBatchDeleteOpt
- type IBatchDeleteWithParamOpt
- type IBatchPerformOpt
- type IBatchPutOpt
- type ICreateOpt
- type IDeleteOpt
- type IDeleteWithParamOpt
- type IGetActionOpt
- type IGetOpt
- type IIdOpt
- type IIdsOpt
- type IJointListOpt
- type IJointOpt
- type IListOpt
- type IMetadataOpt
- type IOpt
- type IPerformOpt
- type IPropertyOpt
- type IShowOpt
- type IUpdateOpt
- type IWithDescOpt
- type JointCmd
- type ResourceCmd
- func (cmd ResourceCmd) BatchCreate(args IBatchCreateOpt)
- func (cmd ResourceCmd) BatchCreateWithKeyword(keyword string, args IBatchCreateOpt)
- func (cmd ResourceCmd) BatchDelete(args IBatchDeleteOpt)
- func (cmd ResourceCmd) BatchDeleteWithParam(args IBatchDeleteWithParamOpt)
- func (cmd ResourceCmd) BatchPerform(action string, args IBatchPerformOpt)
- func (cmd ResourceCmd) BatchPut(args IBatchPutOpt)
- func (cmd ResourceCmd) ClassShow(args IShowOpt)
- func (cmd ResourceCmd) Create(args ICreateOpt)
- func (cmd ResourceCmd) CreateWithKeyword(keyword string, args ICreateOpt)
- func (cmd ResourceCmd) Custom(action TCustomAction, funcname string, args IGetActionOpt)
- func (cmd ResourceCmd) Delete(args IDeleteOpt)
- func (cmd ResourceCmd) DeleteWithParam(args IDeleteWithParamOpt)
- func (cmd ResourceCmd) Get(specific string, args IGetOpt)
- func (cmd ResourceCmd) GetMetadata(args IMetadataOpt)
- func (cmd ResourceCmd) GetProperty(args IPropertyOpt)
- func (cmd ResourceCmd) GetPropertyWithShowFunc(args IPropertyOpt, showFunc func(jsonutils.JSONObject) error)
- func (cmd ResourceCmd) GetWithCustomOptionShow(specific string, show func(data jsonutils.JSONObject, args IGetOpt), ...)
- func (cmd ResourceCmd) GetWithCustomShow(specific string, show func(data jsonutils.JSONObject), args IGetOpt)
- func (cmd ResourceCmd) List(args IListOpt)
- func (cmd ResourceCmd) Perform(action string, args IPerformOpt)
- func (cmd ResourceCmd) PerformClass(action string, args IOpt)
- func (cmd ResourceCmd) PerformClassWithKeyword(keyword, action string, args IOpt)
- func (cmd ResourceCmd) PerformWithKeyword(keyword, action string, args IPerformOpt)
- func (cmd *ResourceCmd) PrintObjectFlattenKV() *ResourceCmd
- func (cmd *ResourceCmd) PrintObjectKV() *ResourceCmd
- func (cmd *ResourceCmd) PrintObjectTable() *ResourceCmd
- func (cmd *ResourceCmd) PrintObjectYAML() *ResourceCmd
- func (cmd ResourceCmd) Run(action string, args interface{}, callback interface{})
- func (cmd ResourceCmd) RunWithDesc(action, desc string, args interface{}, callback interface{})
- func (cmd *ResourceCmd) SetKeyword(keyword string) *ResourceCmd
- func (cmd *ResourceCmd) SetPrefix(prefix string) *ResourceCmd
- func (cmd ResourceCmd) Show(args IShowOpt)
- func (cmd ResourceCmd) Update(args IUpdateOpt)
- func (cmd ResourceCmd) UpdateWithKeyword(keyword string, args IUpdateOpt)
- func (cmd *ResourceCmd) WithContextManager(manager modulebase.IBaseManager) *ResourceCmd
- func (cmd *ResourceCmd) WithKeyword(keyword string) *ResourceCmd
- type TCustomAction
Constants ¶
View Source
const ( CustomActionGet = TCustomAction("Get") CustomActionDo = TCustomAction("Do") )
View Source
const ( OUTPUT_FORMAT_TABLE = "table" // pretty table OUTPUT_FORMAT_FLATTEN_TABLE = "flatten-table" // pretty table with flattened keys OUTPUT_FORMAT_JSON = "json" // json string OUTPUT_FORMAT_YAML = "yaml" // yaml string OUTPUT_FORMAT_KV = "kv" // "key: value" as separate line OUTPUT_FORMAT_FLATTEN_KV = "flatten-kv" // kv with flattened keys )
Variables ¶
View Source
var CommandTable []CMD = make([]CMD, 0)
View Source
var ErrEmtptyUpdate = errors.New("No valid update data")
Functions ¶
func ExportList ¶
func ExportList(list *printutils.ListResult, file string, exportKeys string, exportTexts string, columns []string)
func InvalidUpdateError ¶
func InvalidUpdateError() error
func OutputFormat ¶
func OutputFormat(s string)
func PrintList ¶
func PrintList(list *printutils.ListResult, columns []string)
func PrintObject ¶
func PrintObject(obj jsonutils.JSONObject)
Types ¶
type IBatchCreateOpt ¶
type IBatchDeleteOpt ¶
type IBatchDeleteWithParamOpt ¶
type IBatchDeleteWithParamOpt interface { IBatchDeleteOpt QueryParams() (jsonutils.JSONObject, error) }
type IBatchPerformOpt ¶
type IBatchPutOpt ¶
type ICreateOpt ¶
type ICreateOpt interface { IOpt }
type IDeleteOpt ¶
type IDeleteWithParamOpt ¶
type IDeleteWithParamOpt interface { IDeleteOpt QueryParams() (jsonutils.JSONObject, error) }
type IGetActionOpt ¶
type IJointListOpt ¶
type IMetadataOpt ¶
type IOpt ¶
type IOpt interface {
Params() (jsonutils.JSONObject, error)
}
type IPerformOpt ¶
type IPropertyOpt ¶
type IUpdateOpt ¶
type IWithDescOpt ¶
type IWithDescOpt interface {
Description() string
}
type JointCmd ¶
type JointCmd struct {
*ResourceCmd
}
func NewJointCmd ¶
func NewJointCmd(manager modulebase.JointManager) *JointCmd
func (JointCmd) List ¶
func (cmd JointCmd) List(args IJointListOpt)
type ResourceCmd ¶
type ResourceCmd struct {
// contains filtered or unexported fields
}
func NewResourceCmd ¶
func NewResourceCmd(manager modulebase.IBaseManager) *ResourceCmd
func (ResourceCmd) BatchCreate ¶
func (cmd ResourceCmd) BatchCreate(args IBatchCreateOpt)
func (ResourceCmd) BatchCreateWithKeyword ¶
func (cmd ResourceCmd) BatchCreateWithKeyword(keyword string, args IBatchCreateOpt)
func (ResourceCmd) BatchDelete ¶
func (cmd ResourceCmd) BatchDelete(args IBatchDeleteOpt)
func (ResourceCmd) BatchDeleteWithParam ¶
func (cmd ResourceCmd) BatchDeleteWithParam(args IBatchDeleteWithParamOpt)
func (ResourceCmd) BatchPerform ¶
func (cmd ResourceCmd) BatchPerform(action string, args IBatchPerformOpt)
func (ResourceCmd) BatchPut ¶
func (cmd ResourceCmd) BatchPut(args IBatchPutOpt)
func (ResourceCmd) ClassShow ¶
func (cmd ResourceCmd) ClassShow(args IShowOpt)
func (ResourceCmd) Create ¶
func (cmd ResourceCmd) Create(args ICreateOpt)
func (ResourceCmd) CreateWithKeyword ¶
func (cmd ResourceCmd) CreateWithKeyword(keyword string, args ICreateOpt)
func (ResourceCmd) Custom ¶
func (cmd ResourceCmd) Custom(action TCustomAction, funcname string, args IGetActionOpt)
func (ResourceCmd) Delete ¶
func (cmd ResourceCmd) Delete(args IDeleteOpt)
func (ResourceCmd) DeleteWithParam ¶
func (cmd ResourceCmd) DeleteWithParam(args IDeleteWithParamOpt)
func (ResourceCmd) Get ¶
func (cmd ResourceCmd) Get(specific string, args IGetOpt)
func (ResourceCmd) GetMetadata ¶
func (cmd ResourceCmd) GetMetadata(args IMetadataOpt)
func (ResourceCmd) GetProperty ¶
func (cmd ResourceCmd) GetProperty(args IPropertyOpt)
func (ResourceCmd) GetPropertyWithShowFunc ¶
func (cmd ResourceCmd) GetPropertyWithShowFunc(args IPropertyOpt, showFunc func(jsonutils.JSONObject) error)
func (ResourceCmd) GetWithCustomOptionShow ¶
func (cmd ResourceCmd) GetWithCustomOptionShow(specific string, show func(data jsonutils.JSONObject, args IGetOpt), args IGetOpt)
func (ResourceCmd) GetWithCustomShow ¶
func (cmd ResourceCmd) GetWithCustomShow(specific string, show func(data jsonutils.JSONObject), args IGetOpt)
func (ResourceCmd) List ¶
func (cmd ResourceCmd) List(args IListOpt)
func (ResourceCmd) Perform ¶
func (cmd ResourceCmd) Perform(action string, args IPerformOpt)
func (ResourceCmd) PerformClass ¶
func (cmd ResourceCmd) PerformClass(action string, args IOpt)
func (ResourceCmd) PerformClassWithKeyword ¶
func (cmd ResourceCmd) PerformClassWithKeyword(keyword, action string, args IOpt)
func (ResourceCmd) PerformWithKeyword ¶
func (cmd ResourceCmd) PerformWithKeyword(keyword, action string, args IPerformOpt)
func (*ResourceCmd) PrintObjectFlattenKV ¶
func (cmd *ResourceCmd) PrintObjectFlattenKV() *ResourceCmd
func (*ResourceCmd) PrintObjectKV ¶
func (cmd *ResourceCmd) PrintObjectKV() *ResourceCmd
func (*ResourceCmd) PrintObjectTable ¶
func (cmd *ResourceCmd) PrintObjectTable() *ResourceCmd
func (*ResourceCmd) PrintObjectYAML ¶
func (cmd *ResourceCmd) PrintObjectYAML() *ResourceCmd
func (ResourceCmd) Run ¶
func (cmd ResourceCmd) Run(action string, args interface{}, callback interface{})
func (ResourceCmd) RunWithDesc ¶
func (cmd ResourceCmd) RunWithDesc(action, desc string, args interface{}, callback interface{})
func (*ResourceCmd) SetKeyword ¶
func (cmd *ResourceCmd) SetKeyword(keyword string) *ResourceCmd
func (*ResourceCmd) SetPrefix ¶
func (cmd *ResourceCmd) SetPrefix(prefix string) *ResourceCmd
func (ResourceCmd) Show ¶
func (cmd ResourceCmd) Show(args IShowOpt)
func (ResourceCmd) Update ¶
func (cmd ResourceCmd) Update(args IUpdateOpt)
func (ResourceCmd) UpdateWithKeyword ¶
func (cmd ResourceCmd) UpdateWithKeyword(keyword string, args IUpdateOpt)
func (*ResourceCmd) WithContextManager ¶
func (cmd *ResourceCmd) WithContextManager(manager modulebase.IBaseManager) *ResourceCmd
func (*ResourceCmd) WithKeyword ¶
func (cmd *ResourceCmd) WithKeyword(keyword string) *ResourceCmd
type TCustomAction ¶
type TCustomAction string
Click to show internal directories.
Click to hide internal directories.