Documentation
¶
Index ¶
- Constants
- type Capacity
- type Client
- func (c *Client) CreateQos(request *CreateQosRequest) (response *CreateQosResponse, err error)
- func (c *Client) CreateQosWithContext(ctx context.Context, request *CreateQosRequest) (response *CreateQosResponse, err error)
- func (c *Client) DeleteQos(request *DeleteQosRequest) (response *DeleteQosResponse, err error)
- func (c *Client) DeleteQosWithContext(ctx context.Context, request *DeleteQosRequest) (response *DeleteQosResponse, err error)
- func (c *Client) DescribeQos(request *DescribeQosRequest) (response *DescribeQosResponse, err error)
- func (c *Client) DescribeQosWithContext(ctx context.Context, request *DescribeQosRequest) (response *DescribeQosResponse, err error)
- type CreateQosRequest
- type CreateQosResponse
- type DeleteQosRequest
- type DeleteQosResponse
- type DescribeQosRequest
- type DescribeQosResponse
- type DestAddressInfo
- type DeviceInfo
- type SrcAddressInfo
Constants ¶
const ( // CAM签名/鉴权错误。 AUTHFAILURE = "AuthFailure" // 内部错误。 INTERNALERROR = "InternalError" // 参数错误。 INVALIDPARAMETER = "InvalidParameter" // 参数取值错误。 INVALIDPARAMETERVALUE = "InvalidParameterValue" // 无法获取到可加速的运营商信息 INVALIDPARAMETERVALUE_VENDORNOTFOUND = "InvalidParameterValue.VendorNotFound" // 缺少参数错误。 MISSINGPARAMETER = "MissingParameter" // 操作被拒绝。 OPERATIONDENIED = "OperationDenied" // 中国电信加速token过期。 OPERATIONDENIED_CTCCTOKENEXPIRED = "OperationDenied.CTCCTokenExpired" // 相同加速间隔时间过短。 OPERATIONDENIED_CREATEQOSEXCEEDLIMIT = "OperationDenied.CreateQosExceedLimit" // 请求运营商加速超时。 OPERATIONDENIED_REQUESTQOSTIMEOUT = "OperationDenied.RequestQosTimeout" // 该用户加速已取消,不处于加速状态。 OPERATIONDENIED_USERNONACCELERATED = "OperationDenied.UserNonAccelerated" // 该用户不在运营商网络可加速范围内 OPERATIONDENIED_USEROUTOFCOVERAGE = "OperationDenied.UserOutOfCoverage" // 运营商返回结果错误。 OPERATIONDENIED_VENDORRETURNERROR = "OperationDenied.VendorReturnError" // 运营商服务器临时错误。 OPERATIONDENIED_VENDORSERVERERROR = "OperationDenied.VendorServerError" // 请求的次数超过了频率限制。 REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // 资源不可用。 RESOURCEUNAVAILABLE = "ResourceUnavailable" )
const APIVersion = "2021-01-19"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capacity ¶
type Capacity struct {
// 电信鉴权的Token。要加速的电信手机终端访问 http://qos.189.cn/qos-api/getToken?appid=TencentCloud 页面,获取返回结果中result的值
CTCCToken *string `json:"CTCCToken,omitempty" name:"CTCCToken"`
// 终端所处在的省份,建议不填写由服务端自动获取,若需填写请填写带有省、市、自治区、特别行政区等后缀的省份中文全称
Province *string `json:"Province,omitempty" name:"Province"`
}
type Client ¶
func NewClient ¶
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) CreateQos ¶
func (c *Client) CreateQos(request *CreateQosRequest) (response *CreateQosResponse, err error)
CreateQos 移动网络发起Qos加速过程
可能返回的错误码:
INTERNALERROR = "InternalError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue" INVALIDPARAMETERVALUE_VENDORNOTFOUND = "InvalidParameterValue.VendorNotFound" MISSINGPARAMETER = "MissingParameter" OPERATIONDENIED = "OperationDenied" OPERATIONDENIED_CTCCTOKENEXPIRED = "OperationDenied.CTCCTokenExpired" OPERATIONDENIED_CREATEQOSEXCEEDLIMIT = "OperationDenied.CreateQosExceedLimit" OPERATIONDENIED_REQUESTQOSTIMEOUT = "OperationDenied.RequestQosTimeout" OPERATIONDENIED_USEROUTOFCOVERAGE = "OperationDenied.UserOutOfCoverage" OPERATIONDENIED_VENDORRETURNERROR = "OperationDenied.VendorReturnError" OPERATIONDENIED_VENDORSERVERERROR = "OperationDenied.VendorServerError" REQUESTLIMITEXCEEDED = "RequestLimitExceeded" RESOURCEUNAVAILABLE = "ResourceUnavailable"
func (*Client) CreateQosWithContext ¶ added in v1.0.324
func (c *Client) CreateQosWithContext(ctx context.Context, request *CreateQosRequest) (response *CreateQosResponse, err error)
CreateQos 移动网络发起Qos加速过程
可能返回的错误码:
INTERNALERROR = "InternalError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue" INVALIDPARAMETERVALUE_VENDORNOTFOUND = "InvalidParameterValue.VendorNotFound" MISSINGPARAMETER = "MissingParameter" OPERATIONDENIED = "OperationDenied" OPERATIONDENIED_CTCCTOKENEXPIRED = "OperationDenied.CTCCTokenExpired" OPERATIONDENIED_CREATEQOSEXCEEDLIMIT = "OperationDenied.CreateQosExceedLimit" OPERATIONDENIED_REQUESTQOSTIMEOUT = "OperationDenied.RequestQosTimeout" OPERATIONDENIED_USEROUTOFCOVERAGE = "OperationDenied.UserOutOfCoverage" OPERATIONDENIED_VENDORRETURNERROR = "OperationDenied.VendorReturnError" OPERATIONDENIED_VENDORSERVERERROR = "OperationDenied.VendorServerError" REQUESTLIMITEXCEEDED = "RequestLimitExceeded" RESOURCEUNAVAILABLE = "ResourceUnavailable"
func (*Client) DeleteQos ¶
func (c *Client) DeleteQos(request *DeleteQosRequest) (response *DeleteQosResponse, err error)
DeleteQos 移动网络停止Qos加速过程
可能返回的错误码:
AUTHFAILURE = "AuthFailure" INTERNALERROR = "InternalError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue" MISSINGPARAMETER = "MissingParameter" OPERATIONDENIED = "OperationDenied" OPERATIONDENIED_REQUESTQOSTIMEOUT = "OperationDenied.RequestQosTimeout" OPERATIONDENIED_USERNONACCELERATED = "OperationDenied.UserNonAccelerated" OPERATIONDENIED_USEROUTOFCOVERAGE = "OperationDenied.UserOutOfCoverage" OPERATIONDENIED_VENDORRETURNERROR = "OperationDenied.VendorReturnError" OPERATIONDENIED_VENDORSERVERERROR = "OperationDenied.VendorServerError"
func (*Client) DeleteQosWithContext ¶ added in v1.0.324
func (c *Client) DeleteQosWithContext(ctx context.Context, request *DeleteQosRequest) (response *DeleteQosResponse, err error)
DeleteQos 移动网络停止Qos加速过程
可能返回的错误码:
AUTHFAILURE = "AuthFailure" INTERNALERROR = "InternalError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue" MISSINGPARAMETER = "MissingParameter" OPERATIONDENIED = "OperationDenied" OPERATIONDENIED_REQUESTQOSTIMEOUT = "OperationDenied.RequestQosTimeout" OPERATIONDENIED_USERNONACCELERATED = "OperationDenied.UserNonAccelerated" OPERATIONDENIED_USEROUTOFCOVERAGE = "OperationDenied.UserOutOfCoverage" OPERATIONDENIED_VENDORRETURNERROR = "OperationDenied.VendorReturnError" OPERATIONDENIED_VENDORSERVERERROR = "OperationDenied.VendorServerError"
func (*Client) DescribeQos ¶ added in v1.0.261
func (c *Client) DescribeQos(request *DescribeQosRequest) (response *DescribeQosResponse, err error)
DescribeQos 获取Qos加速状态
可能返回的错误码:
INTERNALERROR = "InternalError" MISSINGPARAMETER = "MissingParameter"
func (*Client) DescribeQosWithContext ¶ added in v1.0.324
func (c *Client) DescribeQosWithContext(ctx context.Context, request *DescribeQosRequest) (response *DescribeQosResponse, err error)
DescribeQos 获取Qos加速状态
可能返回的错误码:
INTERNALERROR = "InternalError" MISSINGPARAMETER = "MissingParameter"
type CreateQosRequest ¶
type CreateQosRequest struct {
*tchttp.BaseRequest
// 加速业务源地址信息,SrcIpv6和(SrcIpv4+SrcPublicIpv4)二选一,目前Ipv6不可用,全部填写以Ipv4参数为准。
SrcAddressInfo *SrcAddressInfo `json:"SrcAddressInfo,omitempty" name:"SrcAddressInfo"`
// 加速业务目标地址信息
DestAddressInfo *DestAddressInfo `json:"DestAddressInfo,omitempty" name:"DestAddressInfo"`
// 加速套餐
// T100K:时延性保障 + 带宽保障上下行保障 100kbps
// T200K:时延性保障 + 带宽保障上下行保障 200kbps
// T400K:时延性保障 + 带宽保障上下行保障 400kbps
// BD1M:带宽型保障 + 下行带宽保障1Mbps
// BD2M:带宽型保障 + 下行带宽保障2Mbps
// BD4M:带宽型保障 + 下行带宽保障4Mbps
// BU1M:带宽型保障 + 上行带宽保障1Mbps
// BU2M:带宽型保障 + 上行带宽保障2Mbps
// BU4M:带宽型保障 + 上行带宽保障4Mbps
QosMenu *string `json:"QosMenu,omitempty" name:"QosMenu"`
// 申请加速的设备信息,包括运营商,操作系统,设备唯一标识等。
DeviceInfo *DeviceInfo `json:"DeviceInfo,omitempty" name:"DeviceInfo"`
// 期望加速时长(单位分钟),默认值30分钟
Duration *uint64 `json:"Duration,omitempty" name:"Duration"`
// 接口能力扩展,如果是电信用户,必须填充CTCC Token字段
Capacity *Capacity `json:"Capacity,omitempty" name:"Capacity"`
// 应用模板ID
TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"`
// 针对特殊协议进行加速
// 1. IP (默认值)
// 2. UDP
// 3. TCP
Protocol *uint64 `json:"Protocol,omitempty" name:"Protocol"`
}
func NewCreateQosRequest ¶
func NewCreateQosRequest() (request *CreateQosRequest)
func (*CreateQosRequest) FromJsonString ¶
func (r *CreateQosRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*CreateQosRequest) ToJsonString ¶
func (r *CreateQosRequest) ToJsonString() string
type CreateQosResponse ¶
type CreateQosResponse struct {
*tchttp.BaseResponse
Response *struct {
// 单次加速唯一 Id
SessionId *string `json:"SessionId,omitempty" name:"SessionId"`
// 当前加速剩余时长(单位秒)
Duration *uint64 `json:"Duration,omitempty" name:"Duration"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewCreateQosResponse ¶
func NewCreateQosResponse() (response *CreateQosResponse)
func (*CreateQosResponse) FromJsonString ¶
func (r *CreateQosResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*CreateQosResponse) ToJsonString ¶
func (r *CreateQosResponse) ToJsonString() string
type DeleteQosRequest ¶
type DeleteQosRequest struct {
*tchttp.BaseRequest
// 单次加速唯一 Id
SessionId *string `json:"SessionId,omitempty" name:"SessionId"`
}
func NewDeleteQosRequest ¶
func NewDeleteQosRequest() (request *DeleteQosRequest)
func (*DeleteQosRequest) FromJsonString ¶
func (r *DeleteQosRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteQosRequest) ToJsonString ¶
func (r *DeleteQosRequest) ToJsonString() string
type DeleteQosResponse ¶
type DeleteQosResponse struct {
*tchttp.BaseResponse
Response *struct {
// 单次加速唯一 Id
SessionId *string `json:"SessionId,omitempty" name:"SessionId"`
// 本次加速会话持续时间(单位秒)
Duration *uint64 `json:"Duration,omitempty" name:"Duration"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDeleteQosResponse ¶
func NewDeleteQosResponse() (response *DeleteQosResponse)
func (*DeleteQosResponse) FromJsonString ¶
func (r *DeleteQosResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteQosResponse) ToJsonString ¶
func (r *DeleteQosResponse) ToJsonString() string
type DescribeQosRequest ¶ added in v1.0.261
type DescribeQosRequest struct {
*tchttp.BaseRequest
// 单次加速唯一 Id
SessionId *string `json:"SessionId,omitempty" name:"SessionId"`
}
func NewDescribeQosRequest ¶ added in v1.0.261
func NewDescribeQosRequest() (request *DescribeQosRequest)
func (*DescribeQosRequest) FromJsonString ¶ added in v1.0.261
func (r *DescribeQosRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeQosRequest) ToJsonString ¶ added in v1.0.261
func (r *DescribeQosRequest) ToJsonString() string
type DescribeQosResponse ¶ added in v1.0.261
type DescribeQosResponse struct {
*tchttp.BaseResponse
Response *struct {
// 0:无匹配的加速中会话
// 1:存在匹配的加速中会话
Status *uint64 `json:"Status,omitempty" name:"Status"`
// 手机公网出口IP,仅匹配时返回
// 注意:此字段可能返回 null,表示取不到有效值。
SrcPublicIpv4 *string `json:"SrcPublicIpv4,omitempty" name:"SrcPublicIpv4"`
// 业务访问目的IP,仅匹配时返回
// 注意:此字段可能返回 null,表示取不到有效值。
DestIpv4 []*string `json:"DestIpv4,omitempty" name:"DestIpv4"`
// 当前加速剩余时长(单位秒)有,仅匹配时返回
// 注意:此字段可能返回 null,表示取不到有效值。
Duration *uint64 `json:"Duration,omitempty" name:"Duration"`
// 加速套餐类型,仅匹配时返回
// 注意:此字段可能返回 null,表示取不到有效值。
QosMenu *string `json:"QosMenu,omitempty" name:"QosMenu"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeQosResponse ¶ added in v1.0.261
func NewDescribeQosResponse() (response *DescribeQosResponse)
func (*DescribeQosResponse) FromJsonString ¶ added in v1.0.261
func (r *DescribeQosResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeQosResponse) ToJsonString ¶ added in v1.0.261
func (r *DescribeQosResponse) ToJsonString() string
type DestAddressInfo ¶
type DestAddressInfo struct {
// 加速业务目标 ip 地址数组
DestIp []*string `json:"DestIp,omitempty" name:"DestIp"`
}
type DeviceInfo ¶
type DeviceInfo struct {
// 运营商
// 1:移动
// 2:电信
// 3:联通
// 4:广电
// 99:其他
Vendor *uint64 `json:"Vendor,omitempty" name:"Vendor"`
// 设备操作系统:
// 1:Android
// 2: IOS
// 99:其他
OS *uint64 `json:"OS,omitempty" name:"OS"`
// 设备唯一标识
// IOS 填写 IDFV
// Android 填写 IMEI
DeviceId *string `json:"DeviceId,omitempty" name:"DeviceId"`
// 用户手机号码
PhoneNum *string `json:"PhoneNum,omitempty" name:"PhoneNum"`
// 无线信息
// 1:4G
// 2:5G
// 3:WIFI
// 99:其他
Wireless *uint64 `json:"Wireless,omitempty" name:"Wireless"`
}