當前位置: 首頁>>代碼示例>>Golang>>正文


Golang cli.Router類代碼示例

本文整理匯總了Golang中github.com/dynport/dgtk/cli.Router的典型用法代碼示例。如果您正苦於以下問題:Golang Router類的具體用法?Golang Router怎麽用?Golang Router使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Router類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Register

func Register(router *cli.Router) {
	router.RegisterFunc("jb/backups/list", JiffyBoxListBackups, "List all running boxes")
	router.Register("jb/backups/create", &JiffyBoxCreateBackup{}, "Create manual backup from box")
	router.Register("jb/servers/shutdown", &JiffyBoxStopServer{}, "Shutdown Server")
	router.Register("jb/servers/freeze", &JiffyBoxFreezeServer{}, "Freeze Server")
	router.Register("jb/servers/start", &JiffyBoxStartServer{}, "Start Server")
	router.Register("jb/servers/thaw", &JiffyBoxThawServer{}, "Thaw Server")
	router.RegisterFunc("jb/servers/list", JiffyBoxListServersAction, "List Servers")
	router.Register("jb/servers/show", &JiffyBoxShowServersAction{}, "Show Server")
	router.Register("jb/servers/clone", &JiffyBoxCloneServer{}, "Clone Server")
	router.RegisterFunc("jb/plans/list", JiffyBoxListPlansAction, "List Plans")
	router.RegisterFunc("jb/distributions/list", JiffyBoxListDistributionsAction, "List Distributions")
	router.Register("jb/servers/delete", &JiffyBoxDeleteAction{}, "Delete Jiffybox")
	router.Register("jb/servers/create", &JiffyBoxCreateAction{}, "Create new JiffyBox")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:15,代碼來源:jiffybox.go

示例2: Register

func Register(router *cli.Router) {
	router.Register("do/droplet/rename", &RenameDroplet{}, "Rename Droplet")
	router.Register("do/droplet/info", &DescribeDroplet{}, "Describe Droplet")
	router.Register("do/droplet/rebuild", &RebuildDroplet{}, "Rebuild droplet")
	router.RegisterFunc("do/droplet/list", ListDropletsAction, "List active droplets")
	router.Register("do/droplet/create", &CreateDroplet{}, "Create new droplet")
	router.Register("do/droplet/destroy", &DestroyDroplet{}, "Destroy Droplet")
	router.RegisterFunc("do/image/list", ListImagesAction, "List available droplet images")
	router.RegisterFunc("do/key/list", ListKeysAction, "List available ssh keys")
	router.RegisterFunc("do/region/list", ListRegionsAction, "List available droplet regions")
	router.RegisterFunc("do/size/list", ListSizesAction, "List available droplet sizes")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:12,代碼來源:digitalocean.go

示例3: Register

func Register(router *cli.Router) {
	router.Register("aws/ec2/instances/describe", &DescribeInstances{}, "Describe ec2 instances")
	router.Register("aws/ec2/instances/run", &RunInstances{}, "Run ec2 instances")
	router.Register("aws/ec2/images/create", &CreateImage{}, "Create image from instance")
	router.Register("aws/ec2/instances/terminate", &TerminateInstances{}, "Terminate ec2 instances")
	router.Register("aws/ec2/tags/create", &CreateTags{}, "Create Tags")
	router.RegisterFunc("aws/ec2/tags/describe", DescribeTags, "Describe Tags")
	router.Register("aws/ec2/images/describe", &DescribeImages{}, "Describe ec2 Images")
	router.RegisterFunc("aws/ec2/key-pairs/describe", DescribeKeyPairs, "Describe key pairs")
	router.RegisterFunc("aws/ec2/addresses/describe", DescribeAddresses, "Describe Addresses")
	router.RegisterFunc("aws/ec2/security-groups/describe", DescribeSecurityGroups, "Describe Security Groups")
	router.RegisterFunc("aws/ec2/spot-price-history/describe", DescribeSpotPriceHistory, "Describe Spot Price History")
	//router.Register("aws/ec2/prices", &Prices{Region: os.Getenv("AWS_DEFAULT_REGION")}, "EC2 Prices")
}
開發者ID:vito,項目名稱:gocloud,代碼行數:14,代碼來源:ec2.go

示例4: Register

func Register(router *cli.Router) {
	router.RegisterFunc("hetzner/servers/list", ListServers, "list servers")
	router.Register("hetzner/servers/describe", &DescribeServer{}, "describe server")
	router.Register("hetzner/servers/rename", &RenameServer{}, "rename server")
}
開發者ID:digideskio,項目名稱:gocloud,代碼行數:5,代碼來源:hetzner.go

示例5: Register

func Register(router *cli.Router) {
	router.RegisterFunc("aws/elb/lbs/list", elbListLoadBalancers, "Describe load balancers")
	router.Register("aws/elb/lbs/describe", &elbDescribeLoadBalancer{}, "Describe load balancers")
	router.Register("aws/elb/lbs/deregister", &elbDeregisterInstances{}, "Deregister instances with load balancer")
	router.Register("aws/elb/lbs/register", &elbRegisterInstances{}, "Register instances with load balancer")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:6,代碼來源:elb.go

示例6: Register

func Register(router *cli.Router) {
	router.RegisterFunc("aws/cloudwatch", cloudwatchList, "List Cloudwatch metrics")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:3,代碼來源:cloudwatch.go

示例7: Register

func Register(router *cli.Router) {
	router.RegisterFunc("aws/iam/users/get", iamGetUser, "Get user information")
	router.RegisterFunc("aws/iam/users/list", iamListUsers, "List users")
	router.RegisterFunc("aws/iam/account-summary", iamGetAccountSummary, "Get account summary")
	router.RegisterFunc("aws/iam/account-aliases/list", iamListAccountAliases, "List account aliases")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:6,代碼來源:iam.go

示例8: Register

func Register(router *cli.Router) {
	router.Register("aws/cloudformation/stacks/delete", &StacksDelete{}, "Delete Stack")
	router.Register("aws/cloudformation/stacks/list", &StacksList{}, "List Cloudformation stacks")
	router.Register("aws/cloudformation/stacks/watch", &StacksWatch{}, "Watch Stacks")
	router.Register("aws/cloudformation/stacks/resources", &StackResources{}, "Describe Stack Resources")
}
開發者ID:vito,項目名稱:gocloud,代碼行數:6,代碼來源:main.go

示例9: Register

func Register(router *cli.Router) {
	router.Register("pb/dcs/describe", &actions.DescribeDataCenterHandler{}, "Describe Data Center")
	router.RegisterFunc("pb/dcs/list", actions.ListAllDataCentersHandler, "List All DataCenters")
	router.Register("pb/servers/start", &actions.StartServer{}, "Start Server")
	router.Register("pb/servers/stop", &actions.StopServer{}, "Stop Server")
	router.Register("pb/servers/delete", &actions.DeleteServer{}, "Delete Server")
	router.RegisterFunc("pb/servers/list", actions.ListAllServersHandler, "List All Servers")
	router.Register("pb/servers/create", &actions.CreateServer{}, "Create Server")
	router.Register("pb/storages/delete", &actions.DeleteStorage{}, "Delete Storage")
	router.Register("pb/storages/create", &actions.CreateStorage{}, "Create Storage")
	router.RegisterFunc("pb/storages/list", actions.ListAllStorages, "List All Storages")
	router.RegisterFunc("pb/snapshots/list", actions.ListAllSnapshotsHandler, "List all snapshots")
	router.Register("pb/snapshots/rollback", &actions.RollbackSnapshotHandler{}, "Rollback Snapshot")
	router.RegisterFunc("pb/images/list", actions.ListAllImagesHandler, "List images")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:15,代碼來源:profitbricks.go

示例10: Register

func Register(router *cli.Router) {
	router.RegisterFunc("aws/route53/hosted-zones/list", route53ListHostedZones, "List Hosted Zones")
	router.Register("aws/route53/rrs/list", &route53ListResourceRecordSet{}, "List Resource Record Set")
}
開發者ID:himanshugpt,項目名稱:evergreen,代碼行數:4,代碼來源:route53.go


注:本文中的github.com/dynport/dgtk/cli.Router類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。