├── vendor ├── golang.org │ └── x │ │ ├── sys │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── constants.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── aliases.go │ │ │ ├── pagesize_unix.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── race0.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── dirent.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── str.go │ │ │ ├── race.go │ │ │ ├── env_unix.go │ │ │ ├── asm_freebsd_arm.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_openbsd_arm.s │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── asm_darwin_arm64.s │ │ │ ├── dev_darwin.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── mksysnum_darwin.pl │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── ioctl.go │ │ │ └── syscall_openbsd_amd64.go │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ └── windows │ │ │ ├── mksyscall.go │ │ │ ├── aliases.go │ │ │ ├── asm_windows_386.s │ │ │ ├── asm_windows_amd64.s │ │ │ ├── race0.go │ │ │ ├── types_windows_386.go │ │ │ ├── types_windows_amd64.go │ │ │ ├── str.go │ │ │ ├── env_windows.go │ │ │ ├── race.go │ │ │ ├── memory_windows.go │ │ │ └── eventlog.go │ │ └── crypto │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ └── ssh │ │ └── terminal │ │ ├── util_linux.go │ │ └── util_bsd.go ├── github.com │ ├── sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── terminal_notwindows.go │ │ │ ├── terminal_check_js.go │ │ │ ├── terminal_check_aix.go │ │ │ ├── terminal_check_appengine.go │ │ │ ├── appveyor.yml │ │ │ ├── terminal_check_notappengine.go │ │ │ ├── terminal_windows.go │ │ │ ├── terminal_check_windows.go │ │ │ ├── go.mod │ │ │ └── doc.go │ ├── konsorten │ │ └── go-windows-terminal-sequences │ │ │ ├── go.mod │ │ │ └── sequences.go │ ├── pkg │ │ └── errors │ │ │ ├── .travis.yml │ │ │ ├── .gitignore │ │ │ └── appveyor.yml │ ├── stretchr │ │ └── testify │ │ │ └── assert │ │ │ ├── assertion_format.go.tmpl │ │ │ ├── assertion_forward.go.tmpl │ │ │ ├── errors.go │ │ │ └── forward_assertions.go │ └── davecgh │ │ └── go-spew │ │ └── LICENSE └── modules.txt ├── ucloud ├── version │ └── version.go ├── utest │ ├── driver │ │ └── env.go │ └── validation │ │ └── validation_test.go ├── config.go ├── schema.go ├── request │ ├── encoder.go │ └── schema_test.go ├── generic_client.go └── helpers │ └── waiter │ └── error.go ├── private ├── services │ ├── vpc │ │ ├── doc.go │ │ ├── types_ip_info.go │ │ └── client.go │ ├── ulb │ │ ├── doc.go │ │ ├── types_backend_msg.go │ │ ├── types_ulbipset.go │ │ ├── client.go │ │ └── types_ulbsimple_set.go │ ├── umon │ │ ├── types_metric_item.go │ │ ├── client.go │ │ ├── types_alarm_template.go │ │ ├── types_resource_template_bound.go │ │ └── types_metric_info.go │ ├── pathx │ │ ├── types_out_public_ip_info.go │ │ ├── types_ugaatask.go │ │ ├── client.go │ │ ├── types_upath_set.go │ │ ├── types_ugaainfo.go │ │ └── types_upath_info.go │ ├── ufs │ │ ├── types_subnet_front_end.go │ │ ├── types_ufsprice_data_set.go │ │ ├── types_vpcinfo.go │ │ ├── client.go │ │ ├── types_mount_point_info.go │ │ ├── types_ufsvolume_info.go │ │ └── types_ufsvolume_info2.go │ ├── umem │ │ ├── types_umem_space_address_set.go │ │ ├── client.go │ │ └── types_uredis_config_set.go │ ├── usms │ │ ├── types_receipt_per_session.go │ │ ├── types_receipt_per_phone.go │ │ └── client.go │ ├── udb │ │ ├── client.go │ │ └── types_udbinstance_by_param_group.go │ ├── udisk │ │ ├── client.go │ │ └── types_udisk_snapshot_set.go │ └── uhost │ │ ├── client.go │ │ └── types_snapshot_set.go ├── utils │ └── doc.go └── protocol │ └── http │ ├── error.go │ └── defaults.go ├── doc.go ├── .github ├── ISSUE_TEMPLATE │ ├── Question.md │ ├── Bug_Report.md │ └── Feature_Request.md └── PULL_REQUEST_TEMPLATE.md ├── services ├── tidb │ ├── models.go │ ├── doc.go │ └── client.go ├── iam │ ├── doc.go │ └── client.go ├── nlb │ ├── doc.go │ └── client.go ├── sts │ ├── doc.go │ ├── models.go │ └── client.go ├── udb │ ├── doc.go │ └── client.go ├── udi │ ├── doc.go │ └── client.go ├── uec │ ├── doc.go │ └── client.go ├── ufs │ ├── doc.go │ └── client.go ├── ugn │ ├── doc.go │ └── client.go ├── ulb │ ├── doc.go │ └── client.go ├── vpc │ ├── doc.go │ └── client.go ├── cube │ ├── doc.go │ └── client.go ├── isms │ ├── doc.go │ └── client.go ├── uads │ ├── doc.go │ └── client.go ├── ubox │ ├── doc.go │ ├── client.go │ └── models.go ├── ucdn │ ├── doc.go │ └── client.go ├── uddb │ ├── doc.go │ └── client.go ├── udns │ ├── doc.go │ └── client.go ├── udpn │ ├── doc.go │ ├── client.go │ └── models.go ├── udts │ ├── doc.go │ └── client.go ├── uhub │ ├── doc.go │ ├── client.go │ └── models.go ├── uk8s │ ├── doc.go │ └── client.go ├── umem │ ├── doc.go │ └── client.go ├── unet │ ├── doc.go │ └── client.go ├── unvs │ ├── doc.go │ ├── models.go │ └── client.go ├── upfs │ ├── doc.go │ ├── client.go │ └── models.go ├── uslk │ ├── doc.go │ └── client.go ├── usms │ ├── doc.go │ └── client.go ├── uvms │ ├── doc.go │ └── client.go ├── label │ ├── doc.go │ └── client.go ├── pathx │ ├── doc.go │ └── client.go ├── ubill │ ├── doc.go │ └── client.go ├── udisk │ ├── doc.go │ └── client.go ├── ufile │ ├── doc.go │ └── client.go ├── uhost │ ├── doc.go │ ├── hack.go │ ├── enums.go │ └── client.go ├── utsdb │ ├── doc.go │ └── client.go ├── umedia │ ├── doc.go │ └── client.go ├── upgsql │ ├── doc.go │ └── client.go ├── uphone │ ├── doc.go │ └── client.go ├── uphost │ ├── doc.go │ └── client.go ├── ipsecvpn │ ├── doc.go │ └── client.go ├── stepflow │ ├── doc.go │ └── client.go ├── uaccount │ ├── doc.go │ └── client.go ├── udbproxy │ ├── doc.go │ ├── client.go │ └── models.go ├── umongodb │ ├── doc.go │ └── client.go ├── urocketmq │ ├── doc.go │ ├── models.go │ └── client.go ├── cloudwatch │ ├── doc.go │ └── client.go ├── ucompshare │ ├── doc.go │ └── client.go ├── ulighthost │ ├── doc.go │ └── client.go ├── ucloudstack │ ├── doc.go │ └── client.go └── uai_modelverse │ ├── doc.go │ └── client.go ├── examples ├── metadata │ ├── README.md │ └── main.go ├── stscreds │ ├── README.md │ └── main.go ├── logging │ └── README.md ├── uhost │ └── README.md ├── retry │ ├── README.md │ └── main.go ├── generic │ └── README.md ├── configure │ └── README.md ├── external │ ├── README.md │ └── main.go ├── signature │ ├── main.go │ └── README.md ├── wait │ └── README.md ├── two-tier │ └── README.md └── ucloudstack │ └── logic │ ├── utils.go │ └── bill.go ├── go.mod ├── internal └── services │ ├── vpc │ ├── doc.go │ ├── types_nat_gw_whitelist_data_set.go │ ├── client.go │ ├── types_describe_white_list_resource_object_ip_info.go │ └── types_get_available_resource_for_white_list_data_set.go │ ├── ufile │ ├── doc.go │ ├── types_mirror_condition.go │ ├── types_ufile_report_item.go │ ├── types_fuction_available_region.go │ ├── types_mirrors.go │ ├── types_region_info.go │ ├── client.go │ ├── types_mirror_remote.go │ ├── types_ufile_total_report_item.go │ ├── types_bucket_domain_set.go │ └── types_ufile_daily_report_item.go │ ├── ulb │ ├── types_ulbsslset.go │ ├── types_ulbipset.go │ ├── client.go │ ├── types_policy_backend_set.go │ ├── types_data_set_backend.go │ ├── types_data_set_vserver.go │ ├── types_ulbbackend_set.go │ └── types_ulbpolicy_set.go │ ├── uphost │ ├── types_resource_info.go │ ├── types_phost_component_set.go │ ├── types_phost_cluster_set.go │ ├── types_phost_cpuset.go │ ├── types_phost_disk_set.go │ ├── client.go │ └── types_phost_machine_type_set.go │ ├── ipsecvpn │ ├── doc.go │ ├── types_vpn_gateway_price_set.go │ └── client.go │ ├── README.md │ ├── udataark │ ├── types_disk_list_fresh_set.go │ ├── client.go │ ├── types_disk_udata_ark_status.go │ └── types_disk_list_data_set.go │ ├── umem │ ├── types_umem_space_address_set.go │ └── client.go │ ├── uhost │ ├── types_uhost_price_set.go │ ├── client.go │ ├── types_uhost_disk_set.go │ ├── types_uhost_ipset.go │ └── types_resource_info_set.go │ ├── udb │ └── client.go │ ├── ufs │ └── client.go │ ├── udpn │ └── client.go │ ├── umon │ ├── client.go │ └── types_metric_info.go │ ├── unet │ ├── client.go │ ├── types_security_group_rule_set.go │ └── types_unet_security_group_set.go │ ├── ubill │ └── client.go │ └── udisk │ └── client.go ├── .travis.yml ├── scripts ├── restore.sh └── gofmtcheck.sh ├── .gitignore ├── external ├── test-fixtures │ ├── credential.json │ └── config.json └── utils.go └── docs └── en-us └── Auth.md /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | -------------------------------------------------------------------------------- /ucloud/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | const Version = "0.22.58" 4 | -------------------------------------------------------------------------------- /private/services/vpc/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package vpc include resources of ucloud vpc 2.0 product 3 | */ 4 | package vpc 5 | -------------------------------------------------------------------------------- /private/utils/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package utils is the utilities to process internal data of sdk 3 | */ 4 | package utils 5 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/konsorten/go-windows-terminal-sequences 2 | -------------------------------------------------------------------------------- /doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package sdk is a toolkit for developer to create custom infrastructure via ucloud open api. 3 | */ 4 | package sdk 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: If you have a question, please check out our other community resources! 4 | labels: question 5 | --- 6 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package logrus 4 | 5 | import "io" 6 | 7 | func initTerminal(w io.Writer) { 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /services/tidb/models.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package tidb 4 | 5 | /* 6 | ServiceID - 服务ID 7 | */ 8 | type ServiceID struct { 9 | 10 | // 服务ID 11 | Id string 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /examples/metadata/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Metadata Server Example 2 | 3 | ## What is the goal 4 | 5 | Load metadata from uhost metadata server 6 | 7 | ## How to run 8 | 9 | ```sh 10 | go run main.go 11 | ``` 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_aix.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,aix 2 | 3 | package logrus 4 | 5 | import "io" 6 | 7 | func checkIfTerminal(w io.Writer) bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /examples/stscreds/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK STS Credentials Example 2 | 3 | ## What is the goal 4 | 5 | Load STS credentials from uhost metadata server 6 | 7 | ## How to run 8 | 9 | ```sh 10 | go run main.go 11 | ``` 12 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.3 5 | - 1.5.4 6 | - 1.6.2 7 | - 1.7.1 8 | - tip 9 | 10 | script: 11 | - go test -v ./... 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | FEATURES: 4 | 5 | ENHANCEMENTS: 6 | 7 | BUG FIXES: 8 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/ucloud/ucloud-sdk-go 2 | 3 | require ( 4 | github.com/pkg/errors v0.8.0 5 | github.com/sirupsen/logrus v1.3.0 6 | github.com/stretchr/testify v1.2.2 7 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect 8 | ) 9 | 10 | go 1.13 11 | -------------------------------------------------------------------------------- /private/services/ulb/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package ulb include resources of ucloud ulb product 3 | 4 | See also 5 | 6 | - API: https://docs.ucloud.cn/api/ulb-api/index 7 | - Product: https://www.ucloud.cn/site/product/ulb.html 8 | 9 | for detail. 10 | */ 11 | package ulb 12 | -------------------------------------------------------------------------------- /ucloud/utest/driver/env.go: -------------------------------------------------------------------------------- 1 | package driver 2 | 3 | import "os" 4 | 5 | const ACC_ENV_KEY = "USDKACC" 6 | const ACC_SKIP_REASON = "skip test for non-acc environment" 7 | 8 | // check test env is acceptance testing or not 9 | func IsAcc() bool { 10 | return len(os.Getenv(ACC_ENV_KEY)) > 0 11 | } 12 | -------------------------------------------------------------------------------- /private/services/ulb/types_backend_msg.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | BackendMsg - 5 | */ 6 | type BackendMsg struct { 7 | 8 | // rs的资源ID 9 | BackendId string `required:"true"` 10 | // 修改rs返回的消息 11 | SubMessage string `required:"true"` 12 | // 修改rs的返回值 13 | SubRetCode int `required:"true"` 14 | } 15 | -------------------------------------------------------------------------------- /ucloud/config.go: -------------------------------------------------------------------------------- 1 | package ucloud 2 | 3 | import "github.com/ucloud/ucloud-sdk-go/ucloud/config" 4 | 5 | // Config is the config of ucloud sdk, use for setting up client 6 | type Config = config.Config 7 | 8 | // NewConfig will return a new client config with default options. 9 | var NewConfig = config.NewConfig 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /private/services/umon/types_metric_item.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | /* 4 | MetricItem - GetMetricInfo-监控项信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type MetricItem struct { 10 | Value interface{} 11 | 12 | Timestamp int 13 | } 14 | -------------------------------------------------------------------------------- /services/iam/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package iam include resources of ucloud iam product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/iam-api/index 9 | - Product: https://www.ucloud.cn/site/product/iam.html 10 | 11 | for detail. 12 | */ 13 | package iam 14 | -------------------------------------------------------------------------------- /services/nlb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package nlb include resources of ucloud nlb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/nlb-api/index 9 | - Product: https://www.ucloud.cn/site/product/nlb.html 10 | 11 | for detail. 12 | */ 13 | package nlb 14 | -------------------------------------------------------------------------------- /services/sts/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package sts include resources of ucloud sts product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/sts-api/index 9 | - Product: https://www.ucloud.cn/site/product/sts.html 10 | 11 | for detail. 12 | */ 13 | package sts 14 | -------------------------------------------------------------------------------- /services/udb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udb include resources of ucloud udb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udb-api/index 9 | - Product: https://www.ucloud.cn/site/product/udb.html 10 | 11 | for detail. 12 | */ 13 | package udb 14 | -------------------------------------------------------------------------------- /services/udi/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udi include resources of ucloud udi product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udi-api/index 9 | - Product: https://www.ucloud.cn/site/product/udi.html 10 | 11 | for detail. 12 | */ 13 | package udi 14 | -------------------------------------------------------------------------------- /services/uec/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uec include resources of ucloud uec product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uec-api/index 9 | - Product: https://www.ucloud.cn/site/product/uec.html 10 | 11 | for detail. 12 | */ 13 | package uec 14 | -------------------------------------------------------------------------------- /services/ufs/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ufs include resources of ucloud ufs product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ufs-api/index 9 | - Product: https://www.ucloud.cn/site/product/ufs.html 10 | 11 | for detail. 12 | */ 13 | package ufs 14 | -------------------------------------------------------------------------------- /services/ugn/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ugn include resources of ucloud ugn product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ugn-api/index 9 | - Product: https://www.ucloud.cn/site/product/ugn.html 10 | 11 | for detail. 12 | */ 13 | package ugn 14 | -------------------------------------------------------------------------------- /services/ulb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ulb include resources of ucloud ulb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ulb-api/index 9 | - Product: https://www.ucloud.cn/site/product/ulb.html 10 | 11 | for detail. 12 | */ 13 | package ulb 14 | -------------------------------------------------------------------------------- /services/vpc/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package vpc include resources of ucloud vpc product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/vpc-api/index 9 | - Product: https://www.ucloud.cn/site/product/vpc.html 10 | 11 | for detail. 12 | */ 13 | package vpc 14 | -------------------------------------------------------------------------------- /services/cube/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package cube include resources of ucloud cube product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/cube-api/index 9 | - Product: https://www.ucloud.cn/site/product/cube.html 10 | 11 | for detail. 12 | */ 13 | package cube 14 | -------------------------------------------------------------------------------- /services/isms/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package isms include resources of ucloud isms product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/isms-api/index 9 | - Product: https://www.ucloud.cn/site/product/isms.html 10 | 11 | for detail. 12 | */ 13 | package isms 14 | -------------------------------------------------------------------------------- /services/tidb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package tidb include resources of ucloud tidb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/tidb-api/index 9 | - Product: https://www.ucloud.cn/site/product/tidb.html 10 | 11 | for detail. 12 | */ 13 | package tidb 14 | -------------------------------------------------------------------------------- /services/uads/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uads include resources of ucloud uads product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uads-api/index 9 | - Product: https://www.ucloud.cn/site/product/uads.html 10 | 11 | for detail. 12 | */ 13 | package uads 14 | -------------------------------------------------------------------------------- /services/ubox/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ubox include resources of ucloud ubox product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ubox-api/index 9 | - Product: https://www.ucloud.cn/site/product/ubox.html 10 | 11 | for detail. 12 | */ 13 | package ubox 14 | -------------------------------------------------------------------------------- /services/ucdn/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ucdn include resources of ucloud ucdn product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ucdn-api/index 9 | - Product: https://www.ucloud.cn/site/product/ucdn.html 10 | 11 | for detail. 12 | */ 13 | package ucdn 14 | -------------------------------------------------------------------------------- /services/uddb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uddb include resources of ucloud uddb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uddb-api/index 9 | - Product: https://www.ucloud.cn/site/product/uddb.html 10 | 11 | for detail. 12 | */ 13 | package uddb 14 | -------------------------------------------------------------------------------- /services/udns/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udns include resources of ucloud udns product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udns-api/index 9 | - Product: https://www.ucloud.cn/site/product/udns.html 10 | 11 | for detail. 12 | */ 13 | package udns 14 | -------------------------------------------------------------------------------- /services/udpn/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udpn include resources of ucloud udpn product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udpn-api/index 9 | - Product: https://www.ucloud.cn/site/product/udpn.html 10 | 11 | for detail. 12 | */ 13 | package udpn 14 | -------------------------------------------------------------------------------- /services/udts/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udts include resources of ucloud udts product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udts-api/index 9 | - Product: https://www.ucloud.cn/site/product/udts.html 10 | 11 | for detail. 12 | */ 13 | package udts 14 | -------------------------------------------------------------------------------- /services/uhub/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uhub include resources of ucloud uhub product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uhub-api/index 9 | - Product: https://www.ucloud.cn/site/product/uhub.html 10 | 11 | for detail. 12 | */ 13 | package uhub 14 | -------------------------------------------------------------------------------- /services/uk8s/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uk8s include resources of ucloud uk8s product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uk8s-api/index 9 | - Product: https://www.ucloud.cn/site/product/uk8s.html 10 | 11 | for detail. 12 | */ 13 | package uk8s 14 | -------------------------------------------------------------------------------- /services/umem/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package umem include resources of ucloud umem product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/umem-api/index 9 | - Product: https://www.ucloud.cn/site/product/umem.html 10 | 11 | for detail. 12 | */ 13 | package umem 14 | -------------------------------------------------------------------------------- /services/unet/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package unet include resources of ucloud unet product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/unet-api/index 9 | - Product: https://www.ucloud.cn/site/product/unet.html 10 | 11 | for detail. 12 | */ 13 | package unet 14 | -------------------------------------------------------------------------------- /services/unvs/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package unvs include resources of ucloud unvs product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/unvs-api/index 9 | - Product: https://www.ucloud.cn/site/product/unvs.html 10 | 11 | for detail. 12 | */ 13 | package unvs 14 | -------------------------------------------------------------------------------- /services/upfs/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package upfs include resources of ucloud upfs product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/upfs-api/index 9 | - Product: https://www.ucloud.cn/site/product/upfs.html 10 | 11 | for detail. 12 | */ 13 | package upfs 14 | -------------------------------------------------------------------------------- /services/uslk/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uslk include resources of ucloud uslk product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uslk-api/index 9 | - Product: https://www.ucloud.cn/site/product/uslk.html 10 | 11 | for detail. 12 | */ 13 | package uslk 14 | -------------------------------------------------------------------------------- /services/usms/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package usms include resources of ucloud usms product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/usms-api/index 9 | - Product: https://www.ucloud.cn/site/product/usms.html 10 | 11 | for detail. 12 | */ 13 | package usms 14 | -------------------------------------------------------------------------------- /services/uvms/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uvms include resources of ucloud uvms product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uvms-api/index 9 | - Product: https://www.ucloud.cn/site/product/uvms.html 10 | 11 | for detail. 12 | */ 13 | package uvms 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_Report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: If something isn't working as expected 4 | --- 5 | 6 | ### Version of UCloud SDK? 7 | 8 | ### Version of Go (`go version`)? 9 | 10 | ### What issue did you see? 11 | 12 | ### Steps to reproduce 13 | 14 | If you have have an runnable example, please include it. 15 | -------------------------------------------------------------------------------- /internal/services/vpc/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package vpc include resources of ucloud vpc product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/vpc-api/index 9 | - Product: https://www.ucloud.cn/site/product/vpc.html 10 | 11 | for detail. 12 | */ 13 | package vpc 14 | -------------------------------------------------------------------------------- /services/label/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package label include resources of ucloud label product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/label-api/index 9 | - Product: https://www.ucloud.cn/site/product/label.html 10 | 11 | for detail. 12 | */ 13 | package label 14 | -------------------------------------------------------------------------------- /services/pathx/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package pathx include resources of ucloud pathx product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/pathx-api/index 9 | - Product: https://www.ucloud.cn/site/product/pathx.html 10 | 11 | for detail. 12 | */ 13 | package pathx 14 | -------------------------------------------------------------------------------- /services/ubill/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ubill include resources of ucloud ubill product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ubill-api/index 9 | - Product: https://www.ucloud.cn/site/product/ubill.html 10 | 11 | for detail. 12 | */ 13 | package ubill 14 | -------------------------------------------------------------------------------- /services/udisk/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udisk include resources of ucloud udisk product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udisk-api/index 9 | - Product: https://www.ucloud.cn/site/product/udisk.html 10 | 11 | for detail. 12 | */ 13 | package udisk 14 | -------------------------------------------------------------------------------- /services/ufile/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ufile include resources of ucloud ufile product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ufile-api/index 9 | - Product: https://www.ucloud.cn/site/product/ufile.html 10 | 11 | for detail. 12 | */ 13 | package ufile 14 | -------------------------------------------------------------------------------- /services/uhost/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uhost include resources of ucloud uhost product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uhost-api/index 9 | - Product: https://www.ucloud.cn/site/product/uhost.html 10 | 11 | for detail. 12 | */ 13 | package uhost 14 | -------------------------------------------------------------------------------- /services/utsdb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package utsdb include resources of ucloud utsdb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/utsdb-api/index 9 | - Product: https://www.ucloud.cn/site/product/utsdb.html 10 | 11 | for detail. 12 | */ 13 | package utsdb 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /examples/logging/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Logging Example 2 | 3 | ## What is the goal 4 | 5 | Filter logging by configuration 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | ``` 13 | 14 | ## How to run 15 | 16 | ```sh 17 | go run main.go 18 | ``` 19 | -------------------------------------------------------------------------------- /internal/services/ufile/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ufile include resources of ucloud ufile product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ufile-api/index 9 | - Product: https://www.ucloud.cn/site/product/ufile.html 10 | 11 | for detail. 12 | */ 13 | package ufile 14 | -------------------------------------------------------------------------------- /private/services/pathx/types_out_public_ip_info.go: -------------------------------------------------------------------------------- 1 | package pathx 2 | 3 | /* 4 | OutPublicIpInfo - 出口IP信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type OutPublicIpInfo struct { 10 | 11 | // 12 | IP string 13 | 14 | // 15 | Area string 16 | } 17 | -------------------------------------------------------------------------------- /services/umedia/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package umedia include resources of ucloud umedia product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/umedia-api/index 9 | - Product: https://www.ucloud.cn/site/product/umedia.html 10 | 11 | for detail. 12 | */ 13 | package umedia 14 | -------------------------------------------------------------------------------- /services/upgsql/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package upgsql include resources of ucloud upgsql product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/upgsql-api/index 9 | - Product: https://www.ucloud.cn/site/product/upgsql.html 10 | 11 | for detail. 12 | */ 13 | package upgsql 14 | -------------------------------------------------------------------------------- /services/uphone/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uphone include resources of ucloud uphone product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uphone-api/index 9 | - Product: https://www.ucloud.cn/site/product/uphone.html 10 | 11 | for detail. 12 | */ 13 | package uphone 14 | -------------------------------------------------------------------------------- /services/uphost/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uphost include resources of ucloud uphost product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uphost-api/index 9 | - Product: https://www.ucloud.cn/site/product/uphost.html 10 | 11 | for detail. 12 | */ 13 | package uphost 14 | -------------------------------------------------------------------------------- /internal/services/ulb/types_ulbsslset.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | ULBSSLSet - DescribeULB 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ULBSSLSet struct { 10 | 11 | // SSL证书的Id 12 | SSLId string 13 | 14 | // SSL证书的名字 15 | SSLName string 16 | } 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: required 3 | services: 4 | - docker 5 | language: go 6 | 7 | go: 8 | - 1.11.x 9 | - 1.12.x 10 | 11 | go_import_path: github.com/ucloud/ucloud-sdk-go 12 | 13 | git: 14 | depth: 1 15 | 16 | script: 17 | - make lint 18 | - make test-cov 19 | 20 | after_success: 21 | - bash <(curl -s https://codecov.io/bash) 22 | -------------------------------------------------------------------------------- /services/ipsecvpn/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ipsecvpn include resources of ucloud ipsecvpn product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ipsecvpn-api/index 9 | - Product: https://www.ucloud.cn/site/product/ipsecvpn.html 10 | 11 | for detail. 12 | */ 13 | package ipsecvpn 14 | -------------------------------------------------------------------------------- /services/stepflow/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package stepflow include resources of ucloud stepflow product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/stepflow-api/index 9 | - Product: https://www.ucloud.cn/site/product/stepflow.html 10 | 11 | for detail. 12 | */ 13 | package stepflow 14 | -------------------------------------------------------------------------------- /services/uaccount/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uaccount include resources of ucloud uaccount product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uaccount-api/index 9 | - Product: https://www.ucloud.cn/site/product/uaccount.html 10 | 11 | for detail. 12 | */ 13 | package uaccount 14 | -------------------------------------------------------------------------------- /services/udbproxy/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package udbproxy include resources of ucloud udbproxy product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/udbproxy-api/index 9 | - Product: https://www.ucloud.cn/site/product/udbproxy.html 10 | 11 | for detail. 12 | */ 13 | package udbproxy 14 | -------------------------------------------------------------------------------- /services/umongodb/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package umongodb include resources of ucloud umongodb product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/umongodb-api/index 9 | - Product: https://www.ucloud.cn/site/product/umongodb.html 10 | 11 | for detail. 12 | */ 13 | package umongodb 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_Request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: I have a suggestion or new API requirements 4 | labels: enhancement 5 | --- 6 | 7 | ## API Requirements 8 | 9 | API already exists, but not implemented by sdk? 10 | 11 | - DescribeUHostInstance 12 | 13 | API does not exist, could you provide? 14 | 15 | - SomeNotExistsAPI 16 | -------------------------------------------------------------------------------- /internal/services/uphost/types_resource_info.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | /* 4 | ResourceInfo - 资源信息剩余信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ResourceInfo struct { 10 | 11 | // 机型 12 | Type string 13 | 14 | // 机型当前状态 15 | ResourceState string 16 | } 17 | -------------------------------------------------------------------------------- /services/unvs/models.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package unvs 4 | 5 | /* 6 | PhoneInfo - 号码信息 7 | */ 8 | type PhoneInfo struct { 9 | 10 | // 返回的电话号码 11 | Phone string 12 | } 13 | 14 | /* 15 | VerifyInfo - 检测结果信息 16 | */ 17 | type VerifyInfo struct { 18 | 19 | // 检测结果:PASS:一致,REJECT:不一致 20 | VerifyResult string 21 | } 22 | -------------------------------------------------------------------------------- /services/urocketmq/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package urocketmq include resources of ucloud urocketmq product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/urocketmq-api/index 9 | - Product: https://www.ucloud.cn/site/product/urocketmq.html 10 | 11 | for detail. 12 | */ 13 | package urocketmq 14 | -------------------------------------------------------------------------------- /internal/services/ipsecvpn/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ipsecvpn include resources of ucloud ipsecvpn product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ipsecvpn-api/index 9 | - Product: https://www.ucloud.cn/site/product/ipsecvpn.html 10 | 11 | for detail. 12 | */ 13 | package ipsecvpn 14 | -------------------------------------------------------------------------------- /services/cloudwatch/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package cloudwatch include resources of ucloud cloudwatch product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/cloudwatch-api/index 9 | - Product: https://www.ucloud.cn/site/product/cloudwatch.html 10 | 11 | for detail. 12 | */ 13 | package cloudwatch 14 | -------------------------------------------------------------------------------- /services/ucompshare/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ucompshare include resources of ucloud ucompshare product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ucompshare-api/index 9 | - Product: https://www.ucloud.cn/site/product/ucompshare.html 10 | 11 | for detail. 12 | */ 13 | package ucompshare 14 | -------------------------------------------------------------------------------- /services/ulighthost/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ulighthost include resources of ucloud ulighthost product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ulighthost-api/index 9 | - Product: https://www.ucloud.cn/site/product/ulighthost.html 10 | 11 | for detail. 12 | */ 13 | package ulighthost 14 | -------------------------------------------------------------------------------- /private/services/ufs/types_subnet_front_end.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | /* 4 | SubnetFrontEnd - 子网展示信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type SubnetFrontEnd struct { 10 | 11 | // 子网id 12 | SubnetId string 13 | 14 | // 子网id + 网段 15 | SubnetDescription string 16 | } 17 | -------------------------------------------------------------------------------- /scripts/restore.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | git add . 4 | git status -s | grep services | grep -v $1 | grep A | awk '{print $2}' | xargs -I {} rm -f {} 5 | git status -s | grep services | grep -v $1 | grep M | awk '{print $2}' | xargs -I {} git reset HEAD {} 6 | git status -s | grep services | grep -v $1 | grep M | awk '{print $2}' | xargs -I {} git checkout -- {} 7 | git add . 8 | -------------------------------------------------------------------------------- /services/urocketmq/models.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package urocketmq 4 | 5 | /* 6 | GroupBaseInfo - Group基础信息 7 | */ 8 | type GroupBaseInfo struct { 9 | 10 | // Group 创建时间 11 | CreateTime int 12 | 13 | // Group 名称 14 | GroupName string 15 | 16 | // Group ID 17 | Id string 18 | 19 | // Group 描述 20 | Remark string 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /internal/services/README.md: -------------------------------------------------------------------------------- 1 | # Internal Services 2 | 3 | Internal services used for daily testing with acceptance test cases. It should not used in any public usage. 4 | 5 | In general, it will include 6 | 7 | - describe action for statistics information of resource. 8 | - validator action for monitoring program. 9 | - action to backup some thing. 10 | - action deprecated. 11 | -------------------------------------------------------------------------------- /internal/services/uphost/types_phost_component_set.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | /* 4 | PHostComponentSet - GetPHostTypeInfo 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type PHostComponentSet struct { 10 | 11 | // 组件名称 12 | Name string 13 | 14 | // 组件数量 15 | Count int 16 | } 17 | -------------------------------------------------------------------------------- /services/sts/models.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package sts 4 | 5 | /* 6 | Credentials - 7 | */ 8 | type Credentials struct { 9 | 10 | // 密钥ID。 11 | AccessKeyId string 12 | 13 | // 密钥Secret。 14 | AccessKeySecret string 15 | 16 | // Token到期失效时间(UTC时间)。 17 | Expiration string 18 | 19 | // 安全令牌。 20 | SecurityToken string 21 | } 22 | -------------------------------------------------------------------------------- /services/ucloudstack/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package ucloudstack include resources of ucloud ucloudstack product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/ucloudstack-api/index 9 | - Product: https://www.ucloud.cn/site/product/ucloudstack.html 10 | 11 | for detail. 12 | */ 13 | package ucloudstack 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Temporary 2 | .*.swp 3 | .idea 4 | /.vs 5 | .DS_Store 6 | core.* 7 | debug 8 | debug.test 9 | .vscode 10 | *.*~ 11 | *.html 12 | *.json 13 | 14 | # Executable 15 | bin/ 16 | *.dll 17 | *.exe 18 | 19 | # Build 20 | coverage.out 21 | coverage.txt 22 | c.out 23 | 24 | # Debug Data 25 | examples/debug 26 | scripts/gen-apis.sh 27 | scripts/gen-tests.sh 28 | 29 | build/ 30 | -------------------------------------------------------------------------------- /examples/uhost/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK UHost Example 2 | 3 | ## What is the goal 4 | 5 | Build a UHost instance. 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | export UCLOUD_PROJECT_ID="your project id" 13 | ``` 14 | 15 | ## How to run 16 | 17 | ```sh 18 | go run *.go 19 | ``` 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /internal/services/udataark/types_disk_list_fresh_set.go: -------------------------------------------------------------------------------- 1 | package udataark 2 | 3 | /* 4 | DiskListFreshSet - 备份链秒级数据 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type DiskListFreshSet struct { 10 | 11 | // 秒级别快照数据开始时间 12 | StartTime int 13 | 14 | // 秒级别快照数据最新时间 15 | LatestTime int 16 | } 17 | -------------------------------------------------------------------------------- /internal/services/umem/types_umem_space_address_set.go: -------------------------------------------------------------------------------- 1 | package umem 2 | 3 | /* 4 | UMemSpaceAddressSet - DescribeUMemSpace 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UMemSpaceAddressSet struct { 10 | 11 | // UMem实例访问IP 12 | IP string 13 | 14 | // UMem实例访问Port 15 | Port int 16 | } 17 | -------------------------------------------------------------------------------- /private/services/umem/types_umem_space_address_set.go: -------------------------------------------------------------------------------- 1 | package umem 2 | 3 | /* 4 | UMemSpaceAddressSet - DescribeUMemSpace 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UMemSpaceAddressSet struct { 10 | 11 | // UMem实例访问IP 12 | IP string 13 | 14 | // UMem实例访问Port 15 | Port int 16 | } 17 | -------------------------------------------------------------------------------- /services/uai_modelverse/doc.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | /* 4 | Package uai_modelverse include resources of ucloud uai_modelverse product 5 | 6 | See also 7 | 8 | - API: https://docs.ucloud.cn/api/uai_modelverse-api/index 9 | - Product: https://www.ucloud.cn/site/product/uai_modelverse.html 10 | 11 | for detail. 12 | */ 13 | package uai_modelverse 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /examples/retry/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Retry Example 2 | 3 | ## What is the goal 4 | 5 | To enable retry for client or request. 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | export UCLOUD_PROJECT_ID="your project id" 13 | ``` 14 | 15 | ## How to run 16 | 17 | ```sh 18 | go run main.go 19 | ``` 20 | -------------------------------------------------------------------------------- /internal/services/uhost/types_uhost_price_set.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | /* 4 | UHostPriceSet - 主机价格 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UHostPriceSet struct { 10 | 11 | // 计费类型。Year,Month,Dynamic 12 | ChargeType string 13 | 14 | // 价格,单位: 元,保留小数点后两位有效数字 15 | Price float32 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /external/test-fixtures/credential.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "public_key": "f05816ca02feec1b3fc38b80a1c450cc", 4 | "private_key": "c45f9bec5fa4c6c47fd871fadd97dd2e", 5 | "profile": "ucloud" 6 | }, 7 | { 8 | "public_key": "18ce27e79596c5adc986f66707b3fd55", 9 | "private_key": "2c125558f9004b73751e3a4658e2f52b", 10 | "profile": "default" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /examples/generic/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Generic Example 2 | 3 | ## What is the goal 4 | 5 | Build an UHost instance by Generic Client. 6 | 7 | ## Setup Environment 8 | 9 | ```bash 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | export UCLOUD_PROJECT_ID="your project id" 13 | ``` 14 | 15 | ## How to run 16 | 17 | ```bash 18 | go run main.go 19 | ``` 20 | -------------------------------------------------------------------------------- /private/services/usms/types_receipt_per_session.go: -------------------------------------------------------------------------------- 1 | package usms 2 | 3 | /* 4 | ReceiptPerSession - 每个提交的回执结果集合 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ReceiptPerSession struct { 10 | 11 | // 发送短信时返回的SessionNo 12 | SessionNo string 13 | 14 | // 每个手机号的短信回执信息集合 15 | ReceiptSet []ReceiptPerPhone 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!aix 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/uphost/types_phost_cluster_set.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | /* 4 | PHostClusterSet - 物理云主机集群库存信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type PHostClusterSet struct { 10 | 11 | // 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G 12 | Name string 13 | 14 | // 库存状态。枚举值:有库存:Available;无库存:SoldOut 15 | StockStatus string 16 | } 17 | -------------------------------------------------------------------------------- /private/services/pathx/types_ugaatask.go: -------------------------------------------------------------------------------- 1 | package pathx 2 | 3 | /* 4 | UGAATask - 用户在UGAA实例下配置的多端口任务 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UGAATask struct { 10 | 11 | // 端口 12 | Port int 13 | 14 | // 接入协议,包括TCP|UDP 15 | Protocol string 16 | 17 | // 转发协议,包括TCP|UDP|HTTP|HTTPS 18 | TransferProtocol string 19 | } 20 | -------------------------------------------------------------------------------- /examples/configure/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Configure Example 2 | 3 | ## What is the goal 4 | 5 | Build an example configuration of sdk client. It will include all optional configuration item and it's usage. 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | ``` 13 | 14 | ## How to run 15 | 16 | ```sh 17 | go run main.go 18 | ``` 19 | -------------------------------------------------------------------------------- /examples/external/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK External Configuration Example 2 | 3 | ## What is the goal 4 | 5 | Load configuration from external storage, sharing configurations across applications built on sdk. 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | ``` 13 | 14 | ## How to run 15 | 16 | ```sh 17 | go run main.go 18 | ``` 19 | -------------------------------------------------------------------------------- /examples/signature/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 7 | ) 8 | 9 | func main() { 10 | cred := &auth.Credential{ 11 | PublicKey: "ucloudsomeone@example.com1296235120854146120", 12 | PrivateKey: "46f09bb9fab4f12dfc160dae12273d5332b5debe", 13 | } 14 | d := "Action=DescribeUHostInstance&Limit=10&Region=cn-bj2" 15 | fmt.Println(cred.CreateSign(d)) 16 | } 17 | -------------------------------------------------------------------------------- /internal/services/ulb/types_ulbipset.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | ULBIPSet - DescribeULB 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ULBIPSet struct { 10 | 11 | // 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP 12 | OperatorName string 13 | 14 | // 弹性IP地址 15 | EIP string 16 | 17 | // 弹性IP的ID 18 | EIPId string 19 | } 20 | -------------------------------------------------------------------------------- /private/services/ulb/types_ulbipset.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | ULBIPSet - DescribeULB 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ULBIPSet struct { 10 | 11 | // 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP 12 | OperatorName string 13 | 14 | // 弹性IP地址 15 | EIP string 16 | 17 | // 弹性IP的ID 18 | EIPId string 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | 10 | sequences "github.com/konsorten/go-windows-terminal-sequences" 11 | ) 12 | 13 | func initTerminal(w io.Writer) { 14 | switch v := w.(type) { 15 | case *os.File: 16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/wait/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Wait For Remote State Example 2 | 3 | ## What is the goal 4 | 5 | To enable state waiter to wait remote resource is completed. 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | export UCLOUD_PROJECT_ID="your project id" 13 | ``` 14 | 15 | ## How to run 16 | 17 | ```sh 18 | go run main.go 19 | ``` 20 | -------------------------------------------------------------------------------- /private/services/ufs/types_ufsprice_data_set.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | /* 4 | UFSPriceDataSet - ufs 价格信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UFSPriceDataSet struct { 10 | 11 | // Year, Month, Dynamic,Trial 12 | ChargeType string 13 | 14 | // 价格 (单位: 分) 15 | Price float64 16 | 17 | // “UFS” 18 | ChargeName string 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /internal/services/uphost/types_phost_cpuset.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | /* 4 | PHostCPUSet - DescribePHost 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type PHostCPUSet struct { 10 | 11 | // CPU型号 12 | Model string 13 | 14 | // CPU主频 15 | Frequence float64 16 | 17 | // CPU个数 18 | Count int 19 | 20 | // CPU核数 21 | CoreCount int 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func checkIfTerminal(w io.Writer) bool { 12 | switch v := w.(type) { 13 | case *os.File: 14 | var mode uint32 15 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) 16 | return err == nil 17 | default: 18 | return false 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/two-tier/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Two-Tier Example 2 | 3 | ## What is the goal 4 | 5 | Build a two-tier architecture with ulb and uhost, and remove all example data. 6 | 7 | ## Setup Environment 8 | 9 | ```go 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | export UCLOUD_PROJECT_ID="your project id" 13 | ``` 14 | 15 | ## How to run 16 | 17 | ```sh 18 | go run main.go 19 | ``` 20 | -------------------------------------------------------------------------------- /private/services/vpc/types_ip_info.go: -------------------------------------------------------------------------------- 1 | package vpc 2 | 3 | /* 4 | IpInfo - 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type IpInfo struct { 10 | 11 | // 12 | Ip string 13 | 14 | // 15 | Mask string 16 | 17 | // 18 | Gateway string 19 | 20 | // 21 | Mac string 22 | 23 | // 24 | SubnetId string 25 | 26 | // 27 | VPCId string 28 | } 29 | -------------------------------------------------------------------------------- /scripts/gofmtcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Check gofmt 4 | echo "==> Checking that code complies with gofmt requirements..." 5 | gofmt_files=$(find . -name '*.go' | grep -v vendor | xargs gofmt -l) 6 | if [[ -n ${gofmt_files} ]]; then 7 | echo 'gofmt needs running on the following files:' 8 | echo "${gofmt_files}" 9 | echo "You can use the command: \`make fmt\` to reformat code." 10 | exit 1 11 | fi 12 | 13 | exit 0 14 | 15 | -------------------------------------------------------------------------------- /examples/signature/README.md: -------------------------------------------------------------------------------- 1 | # UCloud SDK Signature Example 2 | 3 | ## What is the goal 4 | 5 | Build an example signature by credential. Just configure PublicKey/PrivateKey to automatically calculate the signature for each request. 6 | 7 | ## Setup Environment 8 | 9 | ```bash 10 | export UCLOUD_PUBLIC_KEY="your public key" 11 | export UCLOUD_PRIVATE_KEY="your private key" 12 | ``` 13 | 14 | ## How to run 15 | 16 | ```sh 17 | go run main.go 18 | ``` 19 | -------------------------------------------------------------------------------- /internal/services/ufile/types_mirror_condition.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | MirrorCondition - 回源条件 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type MirrorCondition struct { 12 | 13 | // 回源条件,path以某个prefix为前缀 14 | Prefix string 15 | 16 | // 状态码 404 表示回源 17 | StatusCode int 18 | } 19 | -------------------------------------------------------------------------------- /internal/services/ufile/types_ufile_report_item.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | UFileReportItem - 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type UFileReportItem struct { 12 | 13 | // 日消费情况 14 | Daily []UFileDailyReportItem 15 | 16 | // 总消费情况 17 | Total []UFileTotalReportItem 18 | } 19 | -------------------------------------------------------------------------------- /internal/services/ufile/types_fuction_available_region.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | FuctionAvailableRegion - 功能可用地域 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type FuctionAvailableRegion struct { 12 | 13 | // 可用地域 14 | AvailableRegion []string 15 | 16 | // 功能名称 17 | Fuction string 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /private/services/ufs/types_vpcinfo.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | /* 4 | VPCInfo - vpc信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type VPCInfo struct { 10 | 11 | // Vpc ID 12 | VpcId string 13 | 14 | // subnet信息 15 | SubnetIds []SubnetFrontEnd 16 | 17 | // 是否创建subnet,如果为false,则提示用户创建subnet。如果为true,同时SubnetIds为空,则表明当前vpc下已经没有subnet可以挂载 18 | SubnetCreated bool 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sirupsen/logrus 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/objx v0.1.1 // indirect 8 | github.com/stretchr/testify v1.2.2 9 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 10 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-16 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-12 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /internal/services/ufile/types_mirrors.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | Mirrors - 回源规则信息 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type Mirrors struct { 12 | 13 | // 回源条件 14 | Condition MirrorCondition 15 | 16 | // 回源规则 17 | Remote MirrorRemote 18 | 19 | // 回源类型,mirror or redirect 20 | Type string 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-24 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /internal/services/uphost/types_phost_disk_set.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | /* 4 | PHostDiskSet - GetPHostTypeInfo 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type PHostDiskSet struct { 10 | 11 | // 单盘大小,单位GB 12 | Space int 13 | 14 | // 磁盘数量 15 | Count int 16 | 17 | // 磁盘属性 18 | Type string 19 | 20 | // 磁盘名称,sys/data 21 | Name string 22 | 23 | // 磁盘IO性能,单位MB/s(待废弃) 24 | IOCap int 25 | } 26 | -------------------------------------------------------------------------------- /private/services/usms/types_receipt_per_phone.go: -------------------------------------------------------------------------------- 1 | package usms 2 | 3 | /* 4 | ReceiptPerPhone - 每个目的手机号的发送回执信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ReceiptPerPhone struct { 10 | 11 | // 手机号码 12 | Phone string 13 | 14 | // 消耗短信条数 15 | CostCount int 16 | 17 | // 回执结果 18 | ReceiptResult string 19 | 20 | // 回执结果描述 21 | ReceiptDesc string 22 | 23 | // 回执返回时间 24 | ReceiptTime int 25 | } 26 | -------------------------------------------------------------------------------- /docs/en-us/Auth.md: -------------------------------------------------------------------------------- 1 | # External Config Data Source 2 | 3 | UCloud SDK provide external data source for loading client config and credential config. 4 | 5 | The supported data source such as follow: 6 | 7 | - Environment Variables 8 | - Shared Config File 9 | - STS Credentials on Metadata Server 10 | 11 | There are some examples: 12 | 13 | - [External Env & File](../../examples/external) 14 | - [STS](../../examples/stscreds) 15 | 16 | If STS token is expired, it will raise `client.CredentialExpiredError` . 17 | -------------------------------------------------------------------------------- /internal/services/udb/client.go: -------------------------------------------------------------------------------- 1 | package udb 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UDBClient is the client of UDB 9 | type UDBClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UDBClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDBClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UDBClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/ufs/client.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UFSClient is the client of UFS 9 | type UFSClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UFSClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UFSClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UFSClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/ulb/client.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // ULBClient is the client of ULB 9 | type ULBClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of ULBClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *ULBClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &ULBClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/udb/client.go: -------------------------------------------------------------------------------- 1 | package udb 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UDBClient is the client of UDB 9 | type UDBClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UDBClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDBClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UDBClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/ufs/client.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UFSClient is the client of UFS 9 | type UFSClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UFSClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UFSClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UFSClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/vpc/client.go: -------------------------------------------------------------------------------- 1 | package vpc 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // VPCClient is the client of VPC2.0 9 | type VPCClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of VPCClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *VPCClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &VPCClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs 17 | -------------------------------------------------------------------------------- /internal/services/udpn/client.go: -------------------------------------------------------------------------------- 1 | package udpn 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UDPNClient is the client of UDPN 9 | type UDPNClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UDPNClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDPNClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UDPNClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/umem/client.go: -------------------------------------------------------------------------------- 1 | package umem 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UMemClient is the client of UMem 9 | type UMemClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UMemClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMemClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UMemClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/umon/client.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UMonClient is the client of UMon 9 | type UMonClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UMonClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMonClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UMonClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/unet/client.go: -------------------------------------------------------------------------------- 1 | package unet 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UNetClient is the client of UNet 9 | type UNetClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UNetClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UNetClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UNetClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/unet/types_security_group_rule_set.go: -------------------------------------------------------------------------------- 1 | package unet 2 | 3 | /* 4 | SecurityGroupRuleSet - DescribeSecurityGroup 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type SecurityGroupRuleSet struct { 10 | 11 | // 源地址 12 | SrcIP string 13 | 14 | // 优先级 15 | Priority string 16 | 17 | // 协议类型 18 | ProtocolType string 19 | 20 | // 目标端口 21 | DstPort string 22 | 23 | // 防火墙动作 24 | RuleAction string 25 | } 26 | -------------------------------------------------------------------------------- /private/services/umem/client.go: -------------------------------------------------------------------------------- 1 | package umem 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UMemClient is the client of UMem 9 | type UMemClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UMemClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMemClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UMemClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/umon/client.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UMonClient is the client of UMon 9 | type UMonClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UMonClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMonClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UMonClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/usms/client.go: -------------------------------------------------------------------------------- 1 | package usms 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // USMSClient is the client of USMS 9 | type USMSClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of USMSClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *USMSClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &USMSClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/ubill/client.go: -------------------------------------------------------------------------------- 1 | package ubill 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UBillClient is the client of UBill 9 | type UBillClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UBillClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UBillClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UBillClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/udisk/client.go: -------------------------------------------------------------------------------- 1 | package udisk 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UDiskClient is the client of UDisk 9 | type UDiskClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UDiskClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDiskClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UDiskClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/uhost/client.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UHostClient is the client of UHost 9 | type UHostClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UHostClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UHostClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UHostClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/pathx/client.go: -------------------------------------------------------------------------------- 1 | package pathx 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // PathXClient is the client of PathX 9 | type PathXClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of PathXClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *PathXClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &PathXClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/udisk/client.go: -------------------------------------------------------------------------------- 1 | package udisk 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UDiskClient is the client of UDisk 9 | type UDiskClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UDiskClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDiskClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UDiskClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private/services/uhost/client.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UHostClient is the client of UHost 9 | type UHostClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UHostClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UHostClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UHostClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/ipsecvpn/types_vpn_gateway_price_set.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ipsecvpn 4 | 5 | /* 6 | VPNGatewayPriceSet - VPN网关的价格信息 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type VPNGatewayPriceSet struct { 12 | 13 | // VPN网关付费方式 14 | ChargeType string 15 | 16 | // VPN网关价格, 单位"元" 17 | Price float64 18 | 19 | // 资源有效期, 以Unix Timestamp表示 20 | PurchaseValue int 21 | } 22 | -------------------------------------------------------------------------------- /internal/services/uhost/types_uhost_disk_set.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | /* 4 | UHostDiskSet - DescribeUHostInstance 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UHostDiskSet struct { 10 | 11 | // 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk 12 | Type string 13 | 14 | // 磁盘ID 15 | DiskId string 16 | 17 | // UDisk名字(仅当磁盘是UDisk时返回) 18 | Name string 19 | 20 | // 磁盘盘符 21 | Drive string 22 | 23 | // 磁盘大小,单位: GB 24 | Size int 25 | } 26 | -------------------------------------------------------------------------------- /services/uhost/hack.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | /* 4 | CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH is request schema for complex param 5 | */ 6 | type CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH struct { 7 | 8 | // 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填其中之一。 9 | Area *string `required:"false"` 10 | 11 | // GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。 12 | AreaCode *string `required:"false"` 13 | 14 | // SSH端口,1-65535且不能使用80,443端口 15 | Port *int `required:"false"` 16 | } 17 | -------------------------------------------------------------------------------- /internal/services/uphost/client.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UPHostClient is the client of UPHost 9 | type UPHostClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UPHostClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UPHostClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UPHostClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/vpc/types_nat_gw_whitelist_data_set.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package vpc 4 | 5 | /* 6 | NatGWWhitelistDataSet - nat网关白名单数据 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type NatGWWhitelistDataSet struct { 12 | 13 | // 白名单开关标记 14 | IfOpen int 15 | 16 | // NATGateWay Id 17 | NATGWId string 18 | 19 | // 白名单详情 20 | ObjectIPInfo []DescribeWhiteListResourceObjectIPInfo 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /internal/services/ufile/types_region_info.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | RegionInfo - 一组RegionInfo Item类型表示的可用地域信息 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type RegionInfo struct { 12 | 13 | // 可用地域的加速域名后缀,与Bucket名称拼接成加速域名 14 | CdnDomainSuffix string 15 | 16 | // 可用地域名称 17 | Region string 18 | 19 | // 可用地域的源站域名后缀,与Bucket名称拼接成源站域名 20 | SrcDomainSuffix string 21 | } 22 | -------------------------------------------------------------------------------- /internal/services/udataark/client.go: -------------------------------------------------------------------------------- 1 | package udataark 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // UDataArkClient is the client of UDataArk 9 | type UDataArkClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of UDataArkClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDataArkClient { 15 | client := ucloud.NewClient(config, credential) 16 | return &UDataArkClient{ 17 | client, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /internal/services/uhost/types_uhost_ipset.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | /* 4 | UHostIPSet - DescribeUHostInstance 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UHostIPSet struct { 10 | 11 | // 电信: China-telecom,联通: China-unicom, 国际: International,BGP: Bgp,内网: Private 双线: Duplet 12 | Type string 13 | 14 | // IP资源ID (内网IP无对应的资源ID) 15 | IPId string 16 | 17 | // IP地址 18 | IP string 19 | 20 | // IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) 21 | Bandwidth int 22 | } 23 | -------------------------------------------------------------------------------- /internal/services/ulb/types_policy_backend_set.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | PolicyBackendSet - 内容转发下rs详细信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type PolicyBackendSet struct { 10 | 11 | // 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 12 | BackendId string 13 | 14 | // 后端资源的对象ID 15 | ObjectId string 16 | 17 | // 所添加的后端资源服务端口 18 | Port int 19 | 20 | // 后端资源的内网IP 21 | PrivateIP string 22 | 23 | // 后端资源的实例名称 24 | ResourceName string 25 | } 26 | -------------------------------------------------------------------------------- /private/services/umon/types_alarm_template.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | /* 4 | AlarmTemplate - 单个告警模板信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type AlarmTemplate struct { 10 | 11 | // 是否为默认模板 12 | IsDefault string 13 | 14 | // 告警模板id 15 | AlarmTemplateId int 16 | 17 | // 告警模板名称 18 | AlarmTemplateName string 19 | 20 | // 备注 21 | Remark string 22 | 23 | // 资源类型 24 | ResourceType string 25 | 26 | // 绑定的资源数量 27 | BoundResourceCount int 28 | } 29 | -------------------------------------------------------------------------------- /internal/services/uhost/types_resource_info_set.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | /* 4 | ResourceInfoSet - 资源信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ResourceInfoSet struct { 10 | 11 | // 地域, 参见 [地域和可用区列表](../summary/regionlist.html) 12 | Region string 13 | 14 | // 可用区,参见 [可用区列表](../summary/regionlist.html) 15 | Zone string 16 | 17 | // Normal:标准机型, SATA_SSD: SATA SSD机型, BigData: 大数据机型,GPU: GPU型G1(原GPU型),GPU_G2:GPU型G2 18 | UHostType string 19 | } 20 | -------------------------------------------------------------------------------- /private/protocol/http/error.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // StatusError is the error for http status code >= 400 8 | type StatusError struct { 9 | StatusCode int 10 | Message string 11 | } 12 | 13 | func (e StatusError) Error() string { 14 | return fmt.Sprintf("http status %v error", e.StatusCode) 15 | } 16 | 17 | // NewStatusError will create a new status error 18 | func NewStatusError(code int, message string) StatusError { 19 | return StatusError{ 20 | StatusCode: code, 21 | Message: message, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ucloud/schema.go: -------------------------------------------------------------------------------- 1 | package ucloud 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud/request" 5 | ) 6 | 7 | var ( 8 | String = request.String 9 | StringValue = request.StringValue 10 | Int = request.Int 11 | IntValue = request.IntValue 12 | Bool = request.Bool 13 | BoolValue = request.BoolValue 14 | Float64 = request.Float64 15 | Float64Value = request.Float64Value 16 | TimeDuration = request.TimeDuration 17 | TimeDurationValue = request.TimeDurationValue 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /private/services/ulb/client.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 6 | ) 7 | 8 | // ULBClient is the client of ULB 9 | type ULBClient struct { 10 | *ucloud.Client 11 | } 12 | 13 | // NewClient will return a instance of ULBClient 14 | func NewClient(config *ucloud.Config, credential *auth.Credential) *ULBClient { 15 | meta := ucloud.ClientMeta{Product: "ULB"} 16 | client := ucloud.NewClientWithMeta(config, credential, meta) 17 | return &ULBClient{ 18 | client, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /internal/services/vpc/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package vpc 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // VPCClient is the client of VPC 11 | type VPCClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of VPCClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *VPCClient { 17 | client := ucloud.NewClient(config, credential) 18 | return &VPCClient{ 19 | client, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /private/services/ufs/types_mount_point_info.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | /* 4 | MountPointInfo - 挂载点信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type MountPointInfo struct { 10 | 11 | // 挂载点名称 12 | MountPointName string 13 | 14 | // Vpc ID 15 | VpcId string 16 | 17 | // Subnet ID 18 | SubnetId string 19 | 20 | // 挂载点IP 21 | MountPointIp string 22 | 23 | // 文件系统创建时间(unix时间戳) 24 | CreateTime int 25 | 26 | // Subnet ID + 网段的形式,方便前端展示 27 | SubnetDescription string 28 | } 29 | -------------------------------------------------------------------------------- /external/test-fixtures/config.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "project_id": "org-3kopqz", 4 | "region": "cn-bj2", 5 | "zone": "cn-bj2-02", 6 | "base_url": "https://api.ucloud.cn", 7 | "timeout_sec": 15, 8 | "profile": "ucloud", 9 | "active": false 10 | }, 11 | { 12 | "project_id": "org-0qakla", 13 | "region": "cn-sh2", 14 | "zone": "cn-sh2-02", 15 | "base_url": "https://api.ucloud.cn", 16 | "timeout_sec": 30, 17 | "profile": "default", 18 | "active": true 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /internal/services/ufile/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UFileClient is the client of UFile 11 | type UFileClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UFileClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UFileClient { 17 | client := ucloud.NewClient(config, credential) 18 | return &UFileClient{ 19 | client, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /private/services/pathx/types_upath_set.go: -------------------------------------------------------------------------------- 1 | package pathx 2 | 3 | /* 4 | UPathSet - uga信息中携带的upath信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UPathSet struct { 10 | 11 | // UPath名字 12 | UPathName string 13 | 14 | // UPath ID号 15 | UPathId string 16 | 17 | // 带宽 18 | Bandwidth int 19 | 20 | // 线路ID 21 | LineId string 22 | 23 | // 线路起点名字 24 | LineFromName string 25 | 26 | // 线路对端名字 27 | LineToName string 28 | 29 | // 线路对端IP 30 | OutPublicIpList []OutPublicIpInfo 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /examples/ucloudstack/logic/utils.go: -------------------------------------------------------------------------------- 1 | package logic 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // LoadUcloudStackConfig 加载配置 11 | func LoadUcloudStackConfig() (*ucloud.Config, *auth.Credential) { 12 | cfg := ucloud.NewConfig() 13 | cfg.BaseUrl = "http://console.dev.ucloudstack.com/api" 14 | 15 | credential := auth.NewCredential() 16 | credential.PrivateKey = os.Getenv("UCLOUDSTACK_PRIVATE_KEY") 17 | credential.PublicKey = os.Getenv("UCLOUDSTACK_PUBLIC_KEY") 18 | 19 | return &cfg, &credential 20 | } 21 | -------------------------------------------------------------------------------- /internal/services/ufile/types_mirror_remote.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | MirrorRemote - 回源源站信息 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type MirrorRemote struct { 12 | 13 | // 回源的域名 14 | Domain string 15 | 16 | // 重定向固定地址的path 17 | FixedPath string 18 | 19 | // 回源Path添加的前缀或者回源Path替换的前缀 20 | Prefix string 21 | 22 | // 回源Path添加的后缀 23 | Suffix string 24 | 25 | // 回源方式,添加前后缀addition、固定地址fixed、替换前缀replace 26 | Type string 27 | } 28 | -------------------------------------------------------------------------------- /internal/services/ipsecvpn/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ipsecvpn 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // IPSecVPNClient is the client of IPSecVPN 11 | type IPSecVPNClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of IPSecVPNClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *IPSecVPNClient { 17 | client := ucloud.NewClient(config, credential) 18 | return &IPSecVPNClient{ 19 | client, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /services/uhost/enums.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | // State is the state of UHost instance 4 | type State string 5 | 6 | // Enum values for State 7 | const ( 8 | StateInitializing State = "Initializing" 9 | StateStarting State = "Starting" 10 | StateRunning State = "Running" 11 | StateStopping State = "Stopping" 12 | StateStopped State = "Stopped" 13 | StateInstallFail State = "InstallFail" 14 | StateRebooting State = "Rebooting" 15 | ) 16 | 17 | // MarshalValue will marshal state value to string 18 | func (enum State) MarshalValue() (string, error) { 19 | return string(enum), nil 20 | } 21 | -------------------------------------------------------------------------------- /internal/services/ufile/types_ufile_total_report_item.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | UFileTotalReportItem - 总消费信息 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type UFileTotalReportItem struct { 12 | 13 | // API请求次数(万次) 14 | ApiTimes float64 15 | 16 | // 忙时流量;单位GB;海外无此字段 17 | BusyFlow float64 18 | 19 | // cdn回源流量;单位GB 20 | CdnFlow float64 21 | 22 | // 下载流量:单位GB;国内无此字段 23 | Flow float64 24 | 25 | // 闲时流量;单位GB;海外无此字段 26 | IdleFlow float64 27 | } 28 | -------------------------------------------------------------------------------- /internal/services/ulb/types_data_set_backend.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | DataSetBackend - GetBackendMetricInfo的DataSet 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type DataSetBackend struct { 10 | 11 | // 所添加的后端资源ID,(为ULB系统中使用,与资源自身ID无关) 12 | BackendId string 13 | 14 | // 资源系统记录的后端节点id 15 | MetricId string 16 | 17 | // 后端节点名称 18 | Name string 19 | 20 | // 后端节点业务组 21 | Tag string 22 | 23 | // 后端节点备注 24 | Remark string 25 | 26 | // 后端节点监听端口 27 | Port int 28 | 29 | // 后端节点内网ip 30 | PrivateIP string 31 | } 32 | -------------------------------------------------------------------------------- /ucloud/request/encoder.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "encoding/base64" 5 | "github.com/ucloud/ucloud-sdk-go/private/protocol/http" 6 | ) 7 | 8 | type Encoder interface { 9 | Encode(req Common) (*http.HttpRequest, error) 10 | } 11 | 12 | // ToBase64Query will encode a wrapped string as base64 wrapped string 13 | func ToBase64Query(s *string) *string { 14 | return String(base64.StdEncoding.EncodeToString([]byte(StringValue(s)))) 15 | } 16 | 17 | // Deprecated: ToQueryMap will convert a request to string map 18 | func ToQueryMap(req Common) (map[string]string, error) { 19 | return EncodeForm(req) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /services/iam/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package iam 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // IAMClient is the client of IAM 11 | type IAMClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of IAMClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *IAMClient { 17 | meta := ucloud.ClientMeta{Product: "IAM"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &IAMClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/nlb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package nlb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // NLBClient is the client of NLB 11 | type NLBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of NLBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *NLBClient { 17 | meta := ucloud.ClientMeta{Product: "NLB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &NLBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/sts/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package sts 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // STSClient is the client of STS 11 | type STSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of STSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *STSClient { 17 | meta := ucloud.ClientMeta{Product: "STS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &STSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDBClient is the client of UDB 11 | type UDBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDBClient { 17 | meta := ucloud.ClientMeta{Product: "UDB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udi/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udi 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDIClient is the client of UDI 11 | type UDIClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDIClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDIClient { 17 | meta := ucloud.ClientMeta{Product: "UDI"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDIClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uec/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uec 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UECClient is the client of UEC 11 | type UECClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UECClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UECClient { 17 | meta := ucloud.ClientMeta{Product: "UEC"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UECClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ufs/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufs 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UFSClient is the client of UFS 11 | type UFSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UFSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UFSClient { 17 | meta := ucloud.ClientMeta{Product: "UFS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UFSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ugn/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ugn 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UGNClient is the client of UGN 11 | type UGNClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UGNClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UGNClient { 17 | meta := ucloud.ClientMeta{Product: "UGN"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UGNClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ulb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ulb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // ULBClient is the client of ULB 11 | type ULBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of ULBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *ULBClient { 17 | meta := ucloud.ClientMeta{Product: "ULB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &ULBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/vpc/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package vpc 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // VPCClient is the client of VPC 11 | type VPCClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of VPCClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *VPCClient { 17 | meta := ucloud.ClientMeta{Product: "VPC"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &VPCClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /internal/services/unet/types_unet_security_group_set.go: -------------------------------------------------------------------------------- 1 | package unet 2 | 3 | /* 4 | UnetSecurityGroupSet - DescribeSecurityGroup 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UnetSecurityGroupSet struct { 10 | 11 | // 防火墙ID,可选,为空时不显示Rule 12 | GroupId string 13 | 14 | // 防火墙组的名称 15 | GroupName string 16 | 17 | // 防火墙组创建时间,格式为Unix Timestamp 18 | CreateTime int 19 | 20 | // 防火墙组类型,枚举值为: 0:用户自定义防火墙; 1:默认Web防火墙; 2:默认非Web防火墙 21 | Type int 22 | 23 | // 防火墙组中的规则表,参见 SecurityGroupRuleSet 24 | Rule []SecurityGroupRuleSet 25 | } 26 | -------------------------------------------------------------------------------- /services/cube/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package cube 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // CubeClient is the client of Cube 11 | type CubeClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of CubeClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *CubeClient { 17 | meta := ucloud.ClientMeta{Product: "Cube"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &CubeClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/isms/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package isms 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // ISMSClient is the client of ISMS 11 | type ISMSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of ISMSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *ISMSClient { 17 | meta := ucloud.ClientMeta{Product: "ISMS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &ISMSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/tidb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package tidb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // TiDBClient is the client of TiDB 11 | type TiDBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of TiDBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *TiDBClient { 17 | meta := ucloud.ClientMeta{Product: "TiDB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &TiDBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uads/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uads 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UADSClient is the client of UADS 11 | type UADSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UADSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UADSClient { 17 | meta := ucloud.ClientMeta{Product: "UADS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UADSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ubox/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ubox 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UBoxClient is the client of UBox 11 | type UBoxClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UBoxClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UBoxClient { 17 | meta := ucloud.ClientMeta{Product: "UBox"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UBoxClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ucdn/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ucdn 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UCDNClient is the client of UCDN 11 | type UCDNClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UCDNClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UCDNClient { 17 | meta := ucloud.ClientMeta{Product: "UCDN"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UCDNClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uddb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uddb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDDBClient is the client of UDDB 11 | type UDDBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDDBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDDBClient { 17 | meta := ucloud.ClientMeta{Product: "UDDB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDDBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udns/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udns 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDNSClient is the client of UDNS 11 | type UDNSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDNSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDNSClient { 17 | meta := ucloud.ClientMeta{Product: "UDNS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDNSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udpn/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udpn 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDPNClient is the client of UDPN 11 | type UDPNClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDPNClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDPNClient { 17 | meta := ucloud.ClientMeta{Product: "UDPN"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDPNClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udts/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udts 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDTSClient is the client of UDTS 11 | type UDTSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDTSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDTSClient { 17 | meta := ucloud.ClientMeta{Product: "UDTS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDTSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uhub/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uhub 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UHubClient is the client of UHub 11 | type UHubClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UHubClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UHubClient { 17 | meta := ucloud.ClientMeta{Product: "UHub"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UHubClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uk8s/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uk8s 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UK8SClient is the client of UK8S 11 | type UK8SClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UK8SClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UK8SClient { 17 | meta := ucloud.ClientMeta{Product: "UK8S"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UK8SClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/umem/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package umem 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UMemClient is the client of UMem 11 | type UMemClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UMemClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMemClient { 17 | meta := ucloud.ClientMeta{Product: "UMem"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UMemClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/unet/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package unet 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UNetClient is the client of UNet 11 | type UNetClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UNetClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UNetClient { 17 | meta := ucloud.ClientMeta{Product: "UNet"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UNetClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/unvs/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package unvs 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UNVSClient is the client of UNVS 11 | type UNVSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UNVSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UNVSClient { 17 | meta := ucloud.ClientMeta{Product: "UNVS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UNVSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/upfs/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package upfs 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UPFSClient is the client of UPFS 11 | type UPFSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UPFSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UPFSClient { 17 | meta := ucloud.ClientMeta{Product: "UPFS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UPFSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uslk/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uslk 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // USLKClient is the client of USLK 11 | type USLKClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of USLKClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *USLKClient { 17 | meta := ucloud.ClientMeta{Product: "USLK"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &USLKClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/usms/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package usms 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // USMSClient is the client of USMS 11 | type USMSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of USMSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *USMSClient { 17 | meta := ucloud.ClientMeta{Product: "USMS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &USMSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uvms/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uvms 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UVMSClient is the client of UVMS 11 | type UVMSClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UVMSClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UVMSClient { 17 | meta := ucloud.ClientMeta{Product: "UVMS"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UVMSClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /internal/services/ufile/types_bucket_domain_set.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | BucketDomainSet - bucket自定义域名信息 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type BucketDomainSet struct { 12 | 13 | // 区域代码 14 | AreaCode string 15 | 16 | // bucket名称 17 | BucketName string 18 | 19 | // cdn类型 20 | CdnType string 21 | 22 | // 自定义域名 23 | Domain string 24 | 25 | // cdn domain id(为cdn domain时返回此字段信息) 26 | DomainId string 27 | 28 | // 是不是cdn域名 29 | IsUcdn int 30 | } 31 | -------------------------------------------------------------------------------- /external/utils.go: -------------------------------------------------------------------------------- 1 | package external 2 | 3 | import ( 4 | "encoding/json" 5 | "io/ioutil" 6 | "os" 7 | "os/user" 8 | ) 9 | 10 | func userHomeDir() string { 11 | //get user home directory 12 | usr, err := user.Current() 13 | if err != nil { 14 | return "~" 15 | } 16 | return usr.HomeDir 17 | } 18 | 19 | func loadJSONFile(path string, p interface{}) error { 20 | f, err := os.Open(path) 21 | if err != nil { 22 | return err 23 | } 24 | 25 | c, err := ioutil.ReadAll(f) 26 | if err != nil { 27 | return err 28 | } 29 | 30 | err = json.Unmarshal(c, p) 31 | if err != nil { 32 | return err 33 | } 34 | 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /services/label/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package label 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // LabelClient is the client of Label 11 | type LabelClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of LabelClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *LabelClient { 17 | meta := ucloud.ClientMeta{Product: "Label"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &LabelClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/pathx/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package pathx 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // PathXClient is the client of PathX 11 | type PathXClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of PathXClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *PathXClient { 17 | meta := ucloud.ClientMeta{Product: "PathX"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &PathXClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ubill/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ubill 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UBillClient is the client of UBill 11 | type UBillClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UBillClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UBillClient { 17 | meta := ucloud.ClientMeta{Product: "UBill"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UBillClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udisk/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udisk 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDiskClient is the client of UDisk 11 | type UDiskClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDiskClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDiskClient { 17 | meta := ucloud.ClientMeta{Product: "UDisk"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDiskClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ufile/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UFileClient is the client of UFile 11 | type UFileClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UFileClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UFileClient { 17 | meta := ucloud.ClientMeta{Product: "UFile"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UFileClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uhost/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uhost 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UHostClient is the client of UHost 11 | type UHostClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UHostClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UHostClient { 17 | meta := ucloud.ClientMeta{Product: "UHost"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UHostClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/utsdb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package utsdb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UTSDBClient is the client of UTSDB 11 | type UTSDBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UTSDBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UTSDBClient { 17 | meta := ucloud.ClientMeta{Product: "UTSDB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UTSDBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /private/services/umon/types_resource_template_bound.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | /* 4 | ResourceTemplateBound - 资源告警模板绑定关系 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ResourceTemplateBound struct { 10 | 11 | // 是否绑定了告警模板,Yes:是;No:否。若为No,不展示AlarmTemplateId、AlarmTemplateName、Remark 12 | HasAlarmTemlate string 13 | 14 | // 资源id 15 | ResourceId string 16 | 17 | // 告警模板id 18 | AlarmTemplateId int 19 | 20 | // 告警模板名称 21 | AlarmTemplateName string 22 | 23 | // 是否默认模板,Yes:是;No:否 24 | IsDefault string 25 | 26 | // 模板备注 27 | Remark string 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /services/umedia/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package umedia 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UMediaClient is the client of UMedia 11 | type UMediaClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UMediaClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMediaClient { 17 | meta := ucloud.ClientMeta{Product: "UMedia"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UMediaClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/upgsql/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package upgsql 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UPgSQLClient is the client of UPgSQL 11 | type UPgSQLClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UPgSQLClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UPgSQLClient { 17 | meta := ucloud.ClientMeta{Product: "UPgSQL"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UPgSQLClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uphone/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uphone 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UPhoneClient is the client of UPhone 11 | type UPhoneClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UPhoneClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UPhoneClient { 17 | meta := ucloud.ClientMeta{Product: "UPhone"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UPhoneClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uphost/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uphost 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UPHostClient is the client of UPHost 11 | type UPHostClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UPHostClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UPHostClient { 17 | meta := ucloud.ClientMeta{Product: "UPHost"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UPHostClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /internal/services/ulb/types_data_set_vserver.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | DataSetVServer - GetVServerMetricInfo的DataSet 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type DataSetVServer struct { 10 | 11 | // 所添加的后端资源ID,(为ULB系统中使用,与资源自身ID无关) 12 | BackendId string 13 | 14 | // 监听器类型RequestProxy或者PacketsTransmit 15 | ListenType string 16 | 17 | // 后端节点名称 18 | Name string 19 | 20 | // 后端节点业务组 21 | Tag string 22 | 23 | // 后端节点监听端口 24 | Port int 25 | 26 | // 资源系统记录的后端节点id 27 | MetricId string 28 | 29 | // VServer 的 ID 30 | VServerId string 31 | } 32 | -------------------------------------------------------------------------------- /private/services/udb/types_udbinstance_by_param_group.go: -------------------------------------------------------------------------------- 1 | package udb 2 | 3 | /* 4 | UDBInstanceByParamGroup - DescribeUDBInstanceByParamGroup 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UDBInstanceByParamGroup struct { 10 | 11 | // DB实例Id 12 | DBId string 13 | 14 | // 实例名称 15 | Name string 16 | 17 | // DB实例虚ip 18 | VirtualIP string 19 | 20 | // 端口号 21 | Port string 22 | 23 | // DB状态标记 24 | State string 25 | 26 | // DB实例创建时间 27 | CreateTime string 28 | 29 | // DB实例过期时间 30 | ExpiredTime string 31 | 32 | // DB实例角色 33 | Role string 34 | } 35 | -------------------------------------------------------------------------------- /private/protocol/http/defaults.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | const ( 8 | MimeFormURLEncoded = "application/x-www-form-urlencoded" 9 | MimeJSON = "application/json" 10 | ) 11 | 12 | const ( 13 | HeaderNameContentType = "Content-Type" 14 | HeaderNameUserAgent = "User-Agent" 15 | HeaderUTimestampMs = "U-Timestamp-Ms" 16 | ) 17 | 18 | // DefaultHeaders defined default http headers 19 | var DefaultHeaders = map[string]string{ 20 | HeaderNameContentType: MimeFormURLEncoded, 21 | // "X-SDK-VERSION": VERSION, 22 | } 23 | 24 | // DefaultTimeout is the default timeout of each request 25 | var DefaultTimeout = 30 * time.Second 26 | -------------------------------------------------------------------------------- /services/ipsecvpn/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ipsecvpn 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // IPSecVPNClient is the client of IPSecVPN 11 | type IPSecVPNClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of IPSecVPNClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *IPSecVPNClient { 17 | meta := ucloud.ClientMeta{Product: "IPSecVPN"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &IPSecVPNClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/stepflow/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package stepflow 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // StepFlowClient is the client of StepFlow 11 | type StepFlowClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of StepFlowClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *StepFlowClient { 17 | meta := ucloud.ClientMeta{Product: "StepFlow"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &StepFlowClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/uaccount/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uaccount 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UAccountClient is the client of UAccount 11 | type UAccountClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UAccountClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UAccountClient { 17 | meta := ucloud.ClientMeta{Product: "UAccount"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UAccountClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/udbproxy/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udbproxy 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UDBProxyClient is the client of UDBProxy 11 | type UDBProxyClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UDBProxyClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UDBProxyClient { 17 | meta := ucloud.ClientMeta{Product: "UDBProxy"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UDBProxyClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/umongodb/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package umongodb 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UMongoDBClient is the client of UMongoDB 11 | type UMongoDBClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UMongoDBClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UMongoDBClient { 17 | meta := ucloud.ClientMeta{Product: "UMongoDB"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UMongoDBClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/urocketmq/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package urocketmq 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // URocketMQClient is the client of URocketMQ 11 | type URocketMQClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of URocketMQClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *URocketMQClient { 17 | meta := ucloud.ClientMeta{Product: "URocketMQ"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &URocketMQClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/cloudwatch/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package cloudwatch 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // CloudWatchClient is the client of CloudWatch 11 | type CloudWatchClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of CloudWatchClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *CloudWatchClient { 17 | meta := ucloud.ClientMeta{Product: "CloudWatch"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &CloudWatchClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ucompshare/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ucompshare 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UCompShareClient is the client of UCompShare 11 | type UCompShareClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UCompShareClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UCompShareClient { 17 | meta := ucloud.ClientMeta{Product: "UCompShare"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UCompShareClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /services/ulighthost/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ulighthost 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // ULightHostClient is the client of ULightHost 11 | type ULightHostClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of ULightHostClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *ULightHostClient { 17 | meta := ucloud.ClientMeta{Product: "ULightHost"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &ULightHostClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /internal/services/uphost/types_phost_machine_type_set.go: -------------------------------------------------------------------------------- 1 | package uphost 2 | 3 | /* 4 | PHostMachineTypeSet - 物理云主机机型列表 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type PHostMachineTypeSet struct { 10 | 11 | // 机型名 12 | Name string 13 | 14 | // 物理云主机机型别名,全网唯一。 15 | Type string 16 | 17 | // CPU信息 18 | CPU PHostCPUSet 19 | 20 | // 内存大小,单位GB 21 | Memory int 22 | 23 | // 磁盘信息 24 | Disks []PHostDiskSet 25 | 26 | // 其他组件信息 27 | Components PHostComponentSet 28 | 29 | // 集群库存信息 30 | Clusters []PHostClusterSet 31 | 32 | // 是否支持Raid。枚举值:支持:YES;不支持:NO 33 | RaidSupported string 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /services/ucloudstack/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ucloudstack 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UCloudStackClient is the client of UCloudStack 11 | type UCloudStackClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UCloudStackClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UCloudStackClient { 17 | meta := ucloud.ClientMeta{Product: "UCloudStack"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UCloudStackClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /internal/services/ulb/types_ulbbackend_set.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | ULBBackendSet - DescribeULB 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ULBBackendSet struct { 10 | 11 | // 后端资源实例的Id 12 | BackendId string 13 | 14 | // 后端资源实例的类型 15 | ResourceType string 16 | 17 | // 后端资源实例的资源Id 18 | ResourceId string 19 | 20 | // 后端资源实例的资源名字 21 | ResourceName string 22 | 23 | // 后端资源实例的内网IP 24 | PrivateIP string 25 | 26 | // 后端资源实例服务的端口 27 | Port int 28 | 29 | // 后端资源实例的启用与否 30 | Enabled int 31 | 32 | // 后端资源实例的运行状态 33 | Status int 34 | 35 | // 后端资源实例的资源所在的子网的ID 36 | SubnetId string 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /examples/external/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/ucloud/ucloud-sdk-go/external" 7 | "github.com/ucloud/ucloud-sdk-go/services/uhost" 8 | ) 9 | 10 | func main() { 11 | c, err := external.LoadDefaultUCloudConfig() 12 | if err != nil { 13 | fmt.Printf("[ERROR] %s\n", err) 14 | } 15 | fmt.Printf("[INFO] Config: %+v\n", c) 16 | 17 | cfg, cred := c.Config(), c.Credential() 18 | 19 | uhostClient := uhost.NewClient(cfg, cred) 20 | 21 | req := uhostClient.NewDescribeUHostInstanceRequest() 22 | resp, err := uhostClient.DescribeUHostInstance(req) 23 | if err != nil { 24 | fmt.Printf("[ERROR] %s\n", err) 25 | } 26 | fmt.Printf("[INFO] Response: %+v\n", resp) 27 | } 28 | -------------------------------------------------------------------------------- /internal/services/ufile/types_ufile_daily_report_item.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package ufile 4 | 5 | /* 6 | UFileDailyReportItem - 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type UFileDailyReportItem struct { 12 | 13 | // API请求次数(万次) 14 | ApiTimes float64 15 | 16 | // 忙时流量;单位GB;海外无此字段 17 | BusyFlow float64 18 | 19 | // cdn回源流量;单位GB 20 | CdnFlow float64 21 | 22 | // 配额消费时间,unix时间戳(单位s),精确到日期 23 | Date int 24 | 25 | // 下载流量:单位GB;国内无此字段 26 | Flow float64 27 | 28 | // 闲时流量;单位GB;海外无此字段 29 | IdleFlow float64 30 | 31 | // 存储量;单位GB 32 | Storage float64 33 | } 34 | -------------------------------------------------------------------------------- /vendor/modules.txt: -------------------------------------------------------------------------------- 1 | # github.com/davecgh/go-spew v1.1.1 2 | github.com/davecgh/go-spew/spew 3 | # github.com/konsorten/go-windows-terminal-sequences v1.0.1 4 | github.com/konsorten/go-windows-terminal-sequences 5 | # github.com/pkg/errors v0.8.0 6 | github.com/pkg/errors 7 | # github.com/pmezard/go-difflib v1.0.0 8 | github.com/pmezard/go-difflib/difflib 9 | # github.com/sirupsen/logrus v1.3.0 10 | github.com/sirupsen/logrus 11 | # github.com/stretchr/testify v1.2.2 12 | github.com/stretchr/testify/assert 13 | # golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 14 | golang.org/x/crypto/ssh/terminal 15 | # golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 16 | golang.org/x/sys/unix 17 | golang.org/x/sys/windows 18 | -------------------------------------------------------------------------------- /private/services/pathx/types_ugaainfo.go: -------------------------------------------------------------------------------- 1 | package pathx 2 | 3 | /* 4 | UGAAInfo - 全球加速实例信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UGAAInfo struct { 10 | 11 | // 全球加速ID 12 | UGAId string 13 | 14 | // 流量转发方式,包括L4、L7 15 | ForwardType string 16 | 17 | // 全球加速cname 18 | CName string 19 | 20 | // 加速源IP列表 21 | IPList []string 22 | 23 | // 加速实例名称 24 | UGAName string 25 | 26 | // 加速源域名 27 | Domain string 28 | 29 | // 加速地区 30 | Location string 31 | 32 | // 绑定的加速线路 33 | UPathSet []UPathSet 34 | 35 | // 端口配置信息 36 | TaskSet []UGAATask 37 | 38 | // 线路出口IP地址 39 | OutPublicIpList []OutPublicIpInfo 40 | } 41 | -------------------------------------------------------------------------------- /services/uai_modelverse/client.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package uai_modelverse 4 | 5 | import ( 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | ) 9 | 10 | // UAI_ModelverseClient is the client of UAI_Modelverse 11 | type UAI_ModelverseClient struct { 12 | *ucloud.Client 13 | } 14 | 15 | // NewClient will return a instance of UAI_ModelverseClient 16 | func NewClient(config *ucloud.Config, credential *auth.Credential) *UAI_ModelverseClient { 17 | meta := ucloud.ClientMeta{Product: "UAI_Modelverse"} 18 | client := ucloud.NewClientWithMeta(config, credential, meta) 19 | return &UAI_ModelverseClient{ 20 | client, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dirent.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // ParseDirent parses up to max directory entries in buf, 12 | // appending the names to names. It returns the number of 13 | // bytes consumed from buf, the number of entries added 14 | // to names, and the new names slice. 15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { 16 | return syscall.ParseDirent(buf, max, names) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | 27 | func Unsetenv(key string) error { 28 | return syscall.Unsetenv(key) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /private/services/ufs/types_ufsvolume_info.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | /* 4 | UFSVolumeInfo - 文件系统信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UFSVolumeInfo struct { 10 | 11 | // 文件系统名称 12 | VolumeName string 13 | 14 | // 文件系统ID 15 | VolumeId string 16 | 17 | // 文件系统是否已添加挂载点 18 | VolumeStatus string 19 | 20 | // 文件系统已添加挂载点时返回 21 | MountPoint string 22 | 23 | // 文件系统备注信息 24 | Remark string 25 | 26 | // 文件系统所属业务组 27 | Tag string 28 | 29 | // 文件系统创建时间(unix时间戳) 30 | CreateTime int 31 | 32 | // 文件系统过期时间(unix时间戳) 33 | ExpiredTime int 34 | 35 | // 文件系统大小,单位GB 36 | Size int 37 | 38 | // 是否过期 39 | IsExpired string 40 | } 41 | -------------------------------------------------------------------------------- /private/services/umem/types_uredis_config_set.go: -------------------------------------------------------------------------------- 1 | package umem 2 | 3 | /* 4 | URedisConfigSet - 主备Redis配置文件信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type URedisConfigSet struct { 10 | 11 | // 配置ID 12 | ConfigId string 13 | 14 | // 配置名称 15 | Name string 16 | 17 | // 配置描述 18 | Description string 19 | 20 | // 配置对应的Redis版本 21 | Version string 22 | 23 | // 置是否可以修改 24 | IsModify string 25 | 26 | // 配置所处的状态 27 | State string 28 | 29 | // 创建时间 (UNIX时间戳) 30 | CreateTime int 31 | 32 | // 修改时间 (UNIX时间戳) 33 | ModifyTime int 34 | 35 | // 是否是跨机房URedis(默认false) 36 | RegionFlag bool 37 | 38 | // 配置文件所在的可用区 39 | Zone string 40 | } 41 | -------------------------------------------------------------------------------- /internal/services/udataark/types_disk_udata_ark_status.go: -------------------------------------------------------------------------------- 1 | package udataark 2 | 3 | /* 4 | DiskUDataArkStatus - 磁盘方舟状态 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type DiskUDataArkStatus struct { 10 | 11 | // 磁盘Id 12 | VdiskId string 13 | 14 | // 磁盘名 15 | VdiskName string 16 | 17 | // 磁盘描述 18 | VdiskDesc string 19 | 20 | // 是否系统盘 21 | SysVdisk int 22 | 23 | // 最近一次恢复时间 24 | RecoverTick int 25 | 26 | // 当前时间 27 | CurrentTick int 28 | 29 | // "normal" 正常状态"in_init" 初始化中 30 | UtmStatus string 31 | 32 | // "inprogress" 恢复进行中"succ" 恢复成功 "error" 恢复失败 "cancel" 恢复取消 33 | RecoverStatus string 34 | 35 | // 备份大小 36 | UtmSize int 37 | } 38 | -------------------------------------------------------------------------------- /private/services/umon/types_metric_info.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | /* 4 | MetricInfo - GetMetricInfo-监控项信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type MetricInfo struct { 10 | 11 | // 指标名称 12 | MetricName string 13 | 14 | // 单位 15 | Unit string 16 | 17 | // 仅限内部使用 18 | ConversionFactor int 19 | 20 | // 数据类型 21 | Type string 22 | 23 | // 指标组名称,相同指标组前端可合并一张图显示 24 | MetricGroup string 25 | 26 | // 是否支持告警 27 | SupportAlarm string 28 | 29 | // 告警设置范围 30 | AlarmRange interface{} // Backend Bug: backend use dynamic type, object or string 31 | 32 | // 仅限内部使用 33 | Frequency int 34 | 35 | // 比较参数,可选GE,LE 36 | CompareOption []string 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /internal/services/umon/types_metric_info.go: -------------------------------------------------------------------------------- 1 | package umon 2 | 3 | /* 4 | MetricInfo - GetMetricInfo-监控项信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type MetricInfo struct { 10 | 11 | // 指标名称 12 | MetricName string 13 | 14 | // 单位 15 | Unit string 16 | 17 | // 仅限内部使用 18 | ConversionFactor int 19 | 20 | // 数据类型 21 | Type string 22 | 23 | // 指标组名称,相同指标组前端可合并一张图显示 24 | MetricGroup string 25 | 26 | // 是否支持告警 27 | SupportAlarm string 28 | 29 | // 告警设置范围 30 | AlarmRange interface{} // Backend Bug: backend use dynamic type, object or string 31 | 32 | // 仅限内部使用 33 | Frequency int 34 | 35 | // 比较参数,可选GE,LE 36 | CompareOption []string 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /ucloud/request/schema_test.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | "time" 7 | ) 8 | 9 | func TestSchema(t *testing.T) { 10 | s := "foo" 11 | assert.Equal(t, s, StringValue(String(s))) 12 | assert.Equal(t, "", StringValue(nil)) 13 | 14 | i := 42 15 | assert.Equal(t, i, IntValue(Int(i))) 16 | assert.Equal(t, 0, IntValue(nil)) 17 | 18 | f := 42.0 19 | assert.Equal(t, f, Float64Value(Float64(f))) 20 | assert.Equal(t, 0.0, Float64Value(nil)) 21 | 22 | assert.Equal(t, true, BoolValue(Bool(true))) 23 | assert.Equal(t, false, BoolValue(nil)) 24 | 25 | d := 1 * time.Second 26 | assert.Equal(t, d, TimeDurationValue(TimeDuration(d))) 27 | assert.Equal(t, time.Duration(0), TimeDurationValue(nil)) 28 | } 29 | -------------------------------------------------------------------------------- /private/services/pathx/types_upath_info.go: -------------------------------------------------------------------------------- 1 | package pathx 2 | 3 | /* 4 | UPathInfo - 加速线路信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UPathInfo struct { 10 | 11 | // 支付方式 12 | ChargeType string 13 | 14 | // UPath名字 15 | Name string 16 | 17 | // UPath ID 号 18 | UPathId string 19 | 20 | // 带宽 21 | Bandwidth int 22 | 23 | // 线路ID 24 | LineId string 25 | 26 | // 与该UPath绑定的UGA列表 27 | UGAList []UGAAInfo 28 | 29 | // UPath创建的时间 30 | CreateTime int 31 | 32 | // UPath的过期时间 33 | ExpireTime int 34 | 35 | // 线路入口名称 36 | LineFromName string 37 | 38 | // 线路出口名称 39 | LineToName string 40 | 41 | // 线路出口IP信息 42 | OutPublicIpList []OutPublicIpInfo 43 | } 44 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /ucloud/generic_client.go: -------------------------------------------------------------------------------- 1 | package ucloud 2 | 3 | import ( 4 | "github.com/ucloud/ucloud-sdk-go/ucloud/request" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/response" 6 | ) 7 | 8 | func (c *Client) NewGenericRequest() request.GenericRequest { 9 | req := &request.BaseGenericRequest{} 10 | 11 | // setup request with client config 12 | c.SetupRequest(req) 13 | 14 | // setup retryable with default retry policy (retry for non-create action and common error) 15 | req.SetRetryable(false) 16 | return req 17 | } 18 | 19 | func (c *Client) GenericInvoke(req request.GenericRequest) (response.GenericResponse, error) { 20 | var res response.BaseGenericResponse 21 | 22 | err := c.InvokeAction(req.GetAction(), req, &res) 23 | if err != nil { 24 | return &res, err 25 | } 26 | 27 | return &res, nil 28 | } 29 | -------------------------------------------------------------------------------- /internal/services/ulb/types_ulbpolicy_set.go: -------------------------------------------------------------------------------- 1 | package ulb 2 | 3 | /* 4 | ULBPolicySet - 内容转发详细列表 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type ULBPolicySet struct { 10 | 11 | // 内容转发Id,默认内容转发类型下为空。 12 | PolicyId string 13 | 14 | // 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 15 | PolicyType string 16 | 17 | // 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 18 | Type string 19 | 20 | // 内容转发匹配字段;默认内容转发类型下为空。 21 | Match string 22 | 23 | // 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 24 | PolicyPriority int 25 | 26 | // 所属VServerId 27 | VServerId string 28 | 29 | // 默认内容转发类型下返回当前rs总数 30 | TotalCount int 31 | 32 | // 内容转发下rs的详细信息,参考PolicyBackendSet 33 | BackendSet []PolicyBackendSet 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /internal/services/udataark/types_disk_list_data_set.go: -------------------------------------------------------------------------------- 1 | package udataark 2 | 3 | /* 4 | DiskListDataSet - 备份链记录 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type DiskListDataSet struct { 10 | 11 | // 快照ID 12 | SnapshotId string 13 | 14 | // 快照名 15 | SnapshotName string 16 | 17 | // 快照类型,"minor" 小时级别增量备份 ,"major" 天级别增量备份 ,"base" base备份 ,"user" 用户手动备份 18 | SnapshotType string 19 | 20 | // 快照描述 21 | Comment string 22 | 23 | // 快照创建时间 24 | CreateTime int 25 | 26 | // 快照时间 27 | SnapshotTime int 28 | 29 | // 快照大小 30 | Size int 31 | 32 | // 是否用户手动快照,1 表示用户手动快照, 0表示非用户手动快照 33 | User int 34 | 35 | // 快照对应的方舟磁盘版本 36 | Version int 37 | 38 | // 快照状态,"ready" 表示等待merge ,"finish" 表示已经merge完成 39 | Status string 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /examples/metadata/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/ucloud/ucloud-sdk-go/ucloud/metadata" 6 | ) 7 | 8 | func main() { 9 | client := metadata.NewClient() 10 | 11 | // describe instance information 12 | inst, err := client.GetInstanceIdentityDocument() 13 | if err != nil { 14 | fmt.Printf("[ERROR] %s\n", err) 15 | } 16 | fmt.Printf("[INFO] Metadata: %+v\n", inst) 17 | 18 | // describe user data for cloud-init 19 | userData, err := client.GetUserData() 20 | if err != nil { 21 | fmt.Printf("[ERROR] %s\n", err) 22 | } 23 | fmt.Printf("[INFO] UserData: %+v\n", userData) 24 | 25 | // describe vendor data for ucloud vendor scripts 26 | vendorData, err := client.GetVendorData() 27 | if err != nil { 28 | fmt.Printf("[ERROR] %s\n", err) 29 | } 30 | fmt.Printf("[INFO] VendorData: %+v\n", vendorData) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /internal/services/vpc/types_describe_white_list_resource_object_ip_info.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package vpc 4 | 5 | /* 6 | DescribeWhiteListResourceObjectIPInfo - DescribeWhiteListResource 7 | 8 | this model is auto created by ucloud code generater for open api, 9 | you can also see https://docs.ucloud.cn/api for detail. 10 | */ 11 | type DescribeWhiteListResourceObjectIPInfo struct { 12 | 13 | // natgw字符串 14 | GwType string 15 | 16 | // 白名单资源的内网IP 17 | PrivateIP string 18 | 19 | // 白名单资源Id信息 20 | ResourceId string 21 | 22 | // 白名单资源名称 23 | ResourceName string 24 | 25 | // 白名单资源类型 26 | ResourceType string 27 | 28 | // 资源绑定的虚拟网卡的实例ID 29 | SubResourceId string 30 | 31 | // 资源绑定的虚拟网卡的实例名称 32 | SubResourceName string 33 | 34 | // 资源绑定的虚拟网卡的类型 35 | SubResourceType string 36 | 37 | // 白名单资源所属VPCId 38 | VPCId string 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /examples/ucloudstack/logic/bill.go: -------------------------------------------------------------------------------- 1 | package logic 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/ucloud/ucloud-sdk-go/services/ucloudstack" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud" 8 | ) 9 | 10 | // Recharge 账户充值 11 | func Recharge(userID int, serialNo string) { 12 | cfg, credential := LoadUcloudStackConfig() 13 | ucloudstackClient := ucloudstack.NewClient(cfg, credential) 14 | 15 | chargeReq := ucloudstackClient.NewRechargeRequest() 16 | chargeReq.Amount = ucloud.Int(100000) 17 | chargeReq.FromType = ucloud.String("INPOUR_FROM_ALIPAY") 18 | chargeReq.SerialNo = ucloud.String(serialNo) 19 | chargeReq.UserID = ucloud.Int(userID) 20 | 21 | chargeResp, err := ucloudstackClient.Recharge(chargeReq) 22 | if err != nil { 23 | fmt.Printf("something bad happened: %s\n, message: %s", err, chargeResp.Message) 24 | return 25 | } 26 | 27 | fmt.Printf("Recharge success") 28 | } 29 | -------------------------------------------------------------------------------- /private/services/udisk/types_udisk_snapshot_set.go: -------------------------------------------------------------------------------- 1 | package udisk 2 | 3 | /* 4 | UDiskSnapshotSet - DescribeUDiskSnapshot 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UDiskSnapshotSet struct { 10 | 11 | // 快照Id 12 | SnapshotId string 13 | 14 | // 快照名称 15 | Name string 16 | 17 | // 快照的源UDisk的Id 18 | UDiskId string 19 | 20 | // 快照的源UDisk的Name 21 | UDiskName string 22 | 23 | // 创建时间 24 | CreateTime int 25 | 26 | // 过期时间 27 | ExpiredTime int 28 | 29 | // 容量单位GB 30 | Size int 31 | 32 | // 快照描述 33 | Comment string 34 | 35 | // 快照状态,Normal:正常,Failed:失败,Creating:制作中 36 | Status string 37 | 38 | // 对应磁盘是否处于可用状态 39 | IsUDiskAvailable bool 40 | 41 | // 快照版本 42 | Version string 43 | 44 | // 对应磁盘制作快照时所挂载的主机 45 | UHostId string 46 | 47 | // 磁盘类型,0:数据盘,1:系统盘 48 | DiskType int 49 | } 50 | -------------------------------------------------------------------------------- /private/services/ufs/types_ufsvolume_info2.go: -------------------------------------------------------------------------------- 1 | package ufs 2 | 3 | /* 4 | UFSVolumeInfo2 - 文件系统信息 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type UFSVolumeInfo2 struct { 10 | 11 | // 文件系统名称 12 | VolumeName string 13 | 14 | // 文件系统ID 15 | VolumeId string 16 | 17 | // 当前文件系统已创建的挂载点数目 18 | TotalMountPointNum int 19 | 20 | // 文件系统允许创建的最大挂载点数目 21 | MaxMountPointNum int 22 | 23 | // 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 24 | StorageType string 25 | 26 | // 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 27 | ProtocolType string 28 | 29 | // 文件系统备注信息 30 | Remark string 31 | 32 | // 文件系统所属业务组 33 | Tag string 34 | 35 | // 文件系统创建时间(unix时间戳) 36 | CreateTime int 37 | 38 | // 文件系统过期时间(unix时间戳) 39 | ExpiredTime int 40 | 41 | // 文件系统大小,单位GB 42 | Size int 43 | 44 | // 是否过期 45 | IsExpired string 46 | } 47 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /examples/retry/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/ucloud/ucloud-sdk-go/ucloud" 7 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 8 | "github.com/ucloud/ucloud-sdk-go/ucloud/log" 9 | 10 | "github.com/ucloud/ucloud-sdk-go/services/ulb" 11 | ) 12 | 13 | const region = "cn-bj2" 14 | 15 | func main() { 16 | cfg := ucloud.NewConfig() 17 | cfg.LogLevel = log.DebugLevel 18 | cfg.Region = region 19 | cfg.ProjectId = os.Getenv("UCLOUD_PROJECT_ID") 20 | 21 | credential := auth.NewCredential() 22 | credential.PrivateKey = os.Getenv("UCLOUD_PRIVATE_KEY") 23 | credential.PublicKey = os.Getenv("UCLOUD_PUBLIC_KEY") 24 | 25 | client := ulb.NewClient(&cfg, &credential) 26 | 27 | req := client.NewDescribeULBRequest() 28 | req.ULBId = ucloud.String("ulb-not-found-for-retry") 29 | req.WithRetry(3) 30 | 31 | _, err := client.DescribeULB(req) 32 | if err != nil { 33 | log.Error(err) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /services/udbproxy/models.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udbproxy 4 | 5 | /* 6 | ProxyProcesslist - 连接代理信息 7 | */ 8 | type ProxyProcesslist struct { 9 | 10 | // 代理连接DB地址 11 | ClientHost string 12 | 13 | // 显示当前连接的执行的命令 14 | Command string 15 | 16 | // 当前执行的命令是在哪一个数据库上。如果没有指定数据库,则该值为 NULL 17 | DB string 18 | 19 | // 数据库资源ID 20 | DBID string 21 | 22 | // 代理连接DB地址 23 | Host string 24 | 25 | // 当前连接DB进程ID 26 | ID int 27 | 28 | // 一般记录的是线程执行的语句 29 | Info string 30 | 31 | // 数据库角色(主库/从库) 32 | Role string 33 | 34 | // 线程的状态,和 Command 对应 35 | State string 36 | 37 | // 表示该线程处于当前状态的时间 38 | Time int 39 | 40 | // 启动这个线程的用户 41 | User string 42 | } 43 | 44 | /* 45 | NodeClientInfo - 代理节点来源IP信息 46 | */ 47 | type NodeClientInfo struct { 48 | 49 | // 代理节点ID 50 | ID string 51 | 52 | // 代理节点IP 53 | IP string 54 | 55 | // 客户端IP连接信息 56 | Records []ProxyProcesslist 57 | } 58 | -------------------------------------------------------------------------------- /ucloud/utest/validation/validation_test.go: -------------------------------------------------------------------------------- 1 | package validation 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | ) 7 | 8 | func TestValidation(t *testing.T) { 9 | type TestStruct struct { 10 | RetCode int 11 | } 12 | resp := TestStruct{RetCode: 0} 13 | testComparator := NewTestContext(map[string]CompareFunc{ 14 | "eq_bool": func(a, b interface{}) error { 15 | return nil 16 | }, 17 | }) 18 | assert.NoError(t, testComparator.NewValidator("RetCode", 0, "eq_bool")(resp)) 19 | assert.NoError(t, testComparator.NewValidator("RetCode", 0, "str_eq")(resp)) 20 | assert.Error(t, testComparator.NewValidator("RetCode", 0, "comparator_err")(resp)) 21 | assert.Error(t, testComparator.NewValidator("TestErr", 0, "str_eq")(resp)) 22 | assert.Error(t, testComparator.NewValidator("RetCode", 1, "str_eq")(resp)) 23 | assert.Error(t, testComparator.NewValidator("RetCode", "test_err", "str_eq")(resp)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package sequences 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | var ( 11 | kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") 12 | setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") 13 | ) 14 | 15 | func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { 16 | const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 17 | 18 | var mode uint32 19 | err := syscall.GetConsoleMode(syscall.Stdout, &mode) 20 | if err != nil { 21 | return err 22 | } 23 | 24 | if enable { 25 | mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING 26 | } else { 27 | mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING 28 | } 29 | 30 | ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode)) 31 | if ret == 0 { 32 | return err 33 | } 34 | 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /services/udpn/models.go: -------------------------------------------------------------------------------- 1 | // Code is generated by ucloud-model, DO NOT EDIT IT. 2 | 3 | package udpn 4 | 5 | /* 6 | UDPNData - UDPN 详细信息 7 | */ 8 | type UDPNData struct { 9 | 10 | // 带宽 11 | Bandwidth int 12 | 13 | // 计费类型 14 | ChargeType string 15 | 16 | // unix 时间戳 创建时间 17 | CreateTime int 18 | 19 | // unix 时间戳 到期时间 20 | ExpireTime int 21 | 22 | // 可用区域 1 23 | Peer1 string 24 | 25 | // 可用区域 2 26 | Peer2 string 27 | 28 | // UDPN 资源短 ID 29 | UDPNId string 30 | } 31 | 32 | /* 33 | UDPNLineSet - GetUDPNLineList 34 | */ 35 | type UDPNLineSet struct { 36 | 37 | // 线路带宽上限,单位 M 38 | BandwidthUpperLimit int 39 | 40 | // 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky 41 | LocalRegion string 42 | 43 | // 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky 44 | RemoteRegion string 45 | } 46 | -------------------------------------------------------------------------------- /private/services/uhost/types_snapshot_set.go: -------------------------------------------------------------------------------- 1 | package uhost 2 | 3 | /* 4 | SnapshotSet - DescribeSnapshot 5 | 6 | this model is auto created by ucloud code generater for open api, 7 | you can also see https://docs.ucloud.cn for detail. 8 | */ 9 | type SnapshotSet struct { 10 | 11 | // 快照Id 12 | SnapshotId string 13 | 14 | // 磁盘Id。仅当为网络盘时返回此id。 15 | DiskId string 16 | 17 | // 主机Id。若udisk没有挂载,则不返回。 18 | UHostId string 19 | 20 | // 磁盘类型,枚举值为:LocalBoot,本地系统盘;LocalData,本地数据盘;UDiskBoot,云系统盘;UDiskData,云数据盘 21 | DiskType string 22 | 23 | // 大小 24 | Size int 25 | 26 | // 快照状态,枚举值为:Normal,可用;Creating,制作中;Failed,制作失败 27 | State string 28 | 29 | // 快照名称 30 | SnapshotName string 31 | 32 | // 快照描述 33 | SnapshotDescription string 34 | 35 | // 创建成功时间,unix时间 36 | CreateTime int 37 | 38 | // 指定的制作快照时间,unix时间 39 | SnapshotTime int 40 | 41 | // 资源名字。本地盘对应主机名字,网络盘对应udisk名字 42 | ResourceName string 43 | 44 | // 配置文件所在的可用区 45 | Zone string 46 | } 47 | -------------------------------------------------------------------------------- /examples/stscreds/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/ucloud/ucloud-sdk-go/external" 7 | "github.com/ucloud/ucloud-sdk-go/services/uhost" 8 | "github.com/ucloud/ucloud-sdk-go/ucloud" 9 | "github.com/ucloud/ucloud-sdk-go/ucloud/auth" 10 | ) 11 | 12 | func main() { 13 | c, err := external.LoadSTSConfig(external.AssumeRoleRequest{RoleName: "Uk8sServiceCharacter"}) 14 | if err != nil { 15 | fmt.Printf("[ERROR] %s\n", err) 16 | } 17 | fmt.Printf("[INFO] Config: %+v\n", c) 18 | 19 | describeUHost(c.Config(), c.Credential()) 20 | } 21 | 22 | func describeUHost(cfg *ucloud.Config, cred *auth.Credential) { 23 | client := uhost.NewClient(cfg, cred) 24 | 25 | req := client.NewDescribeUHostInstanceRequest() 26 | req.Region = ucloud.String("cn-bj2") 27 | 28 | resp, err := client.DescribeUHostInstance(req) 29 | if err != nil { 30 | fmt.Printf("[ERROR] %s\n", err) 31 | } 32 | fmt.Printf("[INFO] Response: %+v\n", resp) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /ucloud/helpers/waiter/error.go: -------------------------------------------------------------------------------- 1 | package waiter 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | "time" 7 | 8 | "github.com/pkg/errors" 9 | ) 10 | 11 | var ( 12 | errTimeoutConf = errors.New("timeout cannot be set zero") 13 | ) 14 | 15 | // TimeoutError is returned when WaitForState times out 16 | type TimeoutError struct { 17 | LastError error 18 | LastState string 19 | Timeout time.Duration 20 | ExpectedStates []string 21 | } 22 | 23 | func (e *TimeoutError) Error() string { 24 | errs := []string{"cannot waiting for resource is completed"} 25 | 26 | if e.Timeout > 0 { 27 | errs = append(errs, fmt.Sprintf("timeout: %s", e.Timeout)) 28 | } 29 | 30 | if e.LastState != "" { 31 | errs = append(errs, fmt.Sprintf("last state: %q", e.LastState)) 32 | } 33 | 34 | if len(e.ExpectedStates) > 0 { 35 | errs = append(errs, fmt.Sprintf("want: %q", strings.Join(e.ExpectedStates, ","))) 36 | } 37 | 38 | if e.LastError != nil { 39 | errs = append(errs, fmt.Sprintf("err: %s", e.LastError)) 40 | } 41 | 42 | return strings.Join(errs, ", ") 43 | } 44 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ioctl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. 12 | // 13 | // To change fd's window size, the req argument should be TIOCSWINSZ. 14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 15 | // TODO: if we get the chance, remove the req parameter and 16 | // hardcode TIOCSWINSZ. 17 | err := ioctlSetWinsize(fd, req, value) 18 | runtime.KeepAlive(value) 19 | return err 20 | } 21 | 22 | // IoctlSetTermios performs an ioctl on fd with a *Termios. 23 | // 24 | // The req value will usually be TCSETA or TIOCSETA. 25 | func IoctlSetTermios(fd int, req uint, value *Termios) error { 26 | // TODO: if we get the chance, remove the req parameter. 27 | err := ioctlSetTermios(fd, req, value) 28 | runtime.KeepAlive(value) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | --------------------------------------------------------------------------------