mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-02 14:02:39 +08:00
./goimports -w -local yunion.io/x/onecloud/ -corp yunion.io/x/ $GOPATH/src/yunion.io/x/onecloud/{cmd,pkg}
34 lines
736 B
Go
34 lines
736 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/jsonutils"
|
|
|
|
"yunion.io/x/onecloud/pkg/mcclient"
|
|
"yunion.io/x/onecloud/pkg/mcclient/modules"
|
|
)
|
|
|
|
func init() {
|
|
|
|
/**
|
|
* 通信地址验证
|
|
*/
|
|
type ContactsVerifyOptions struct {
|
|
ID string `help:"Verification process ID"`
|
|
TOKEN string `help:"Temporary token issued to the user when the validation is triggered"`
|
|
}
|
|
R(&ContactsVerifyOptions{}, "contact-verify", "Trigger contact verify", func(s *mcclient.ClientSession, args *ContactsVerifyOptions) error {
|
|
params := jsonutils.NewDict()
|
|
params.Add(jsonutils.NewString(args.TOKEN), "token")
|
|
|
|
result, err := modules.Verifications.Get(s, args.ID, params)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
printObject(result)
|
|
return nil
|
|
})
|
|
|
|
}
|