model

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrMsg

type ErrMsg struct {

	// 错误码
	ErrorCode string `json:"error_code"`

	// 错误描述
	ErrorMsg string `json:"error_msg"`
}

用于返回具体的错误码和错误消息

func (ErrMsg) String

func (o ErrMsg) String() string

type ErrRsp

type ErrRsp struct {
	Error *ErrMsg `json:"error"`
}

当北向接口报错时,按此格式返回到body体中

func (ErrRsp) String

func (o ErrRsp) String() string

type ShowDomainLocationStatsRequest

type ShowDomainLocationStatsRequest struct {

	// - 动作名称,可选location_summary、location_detail。 - location_summary:查询汇总数据 - location_detail:查询数据详情。
	Action string `json:"action"`

	// - 查询起始时间戳,时间戳应设置需为整5分钟,设置方式如下: - interval为300时,start_time设置为整5分钟时刻点,如:1631240100000(对应2021-09-10 10:15:00) - interval为3600时,start_time设置为整小时时刻点,如:1631239200000(对应2021-09-10 10:00:00) - interval为86400时,start_time设置为东8区零点时刻点,如:1631203200000(对应2021-09-10 00:00:00)
	StartTime int64 `json:"start_time"`

	// - 查询结束时间戳,时间戳应设置需为整5分钟,设置方式如下: - interval为300时,end_time设置为整5分钟时刻点,如:1631243700000(对应2021-09-10 11:15:00) - interval为3600时,end_time设置为整小时时刻点,如:1631325600000(对应2021-09-11 10:00:00) - interval为86400时,end_time设置为东8区零点时刻点,如:1631376000000(对应2021-09-12 00:00:00)
	EndTime int64 `json:"end_time"`

	// 域名列表,多个域名以逗号(半角)分隔,如:www.test1.com,www.test2.com all表示查询名下全部域名
	DomainName string `json:"domain_name"`

	// - 网络资源消耗   - bw(带宽)   - flux(流量) - 访问情况   - req_num(请求总数) - HTTP状态码(组合指标)   - http_code_2xx(状态码汇总2xx)   - http_code_3xx(状态码汇总3xx)   - http_code_4xx(状态码汇总4xx)   - http_code_5xx(状态码汇总5xx)   - status_code_2xx(状态码详情2xx)   - status_code_3xx(状态码详情3xx)   - status_code_4xx(状态码详情4xx)   - status_code_5xx(状态码详情5xx)
	StatType string `json:"stat_type"`

	// - 查询时间间隔,单位:秒,取值说明: - 300(5分钟):最大查询跨度2天 - 3600(1小时):最大查询跨度7天 - 86400(1天):最大查询跨度31天 - 如果不传,默认取对应时间跨度的最小间隔。
	Interval *int64 `json:"interval,omitempty"`

	// 国家编码,多个以英文逗号分隔,all表示全部,取值见附录
	Country *string `json:"country,omitempty"`

	// 省份编码,当country为cn(中国)时有效,多个以英文逗号分隔,all表示全部,取值见附录
	Province *string `json:"province,omitempty"`

	// 运营商编码,多个以英文逗号分隔,all表示全部,取值见附录
	Isp *string `json:"isp,omitempty"`

	// 数据分组方式,多个以英文逗号分隔,可选domain、country、province、isp,默认不分组
	GroupBy *string `json:"group_by,omitempty"`

	// 当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,\"all\"表示所有项目。注意:当使用子账号调用接口时,该参数必传。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
}

Request Object

func (ShowDomainLocationStatsRequest) String

type ShowDomainLocationStatsResponse

type ShowDomainLocationStatsResponse struct {

	// 数据分组方式
	GroupBy *string `json:"group_by,omitempty"`

	// 按指定的分组方式组织的数据
	Result         map[string]interface{} `json:"result,omitempty"`
	HttpStatusCode int                    `json:"-"`
}

Response Object

func (ShowDomainLocationStatsResponse) String

type ShowDomainStatsRequest

type ShowDomainStatsRequest struct {

	// - 动作名称,可选summary、detail。 - summary:查询汇总数据 - detail:查询数据详情。
	Action string `json:"action"`

	// - 查询起始时间戳,时间戳应设置需为整5分钟,设置方式如下: - interval为300时,start_time设置为整5分钟时刻点,如:1631240100000(对应2021-09-10 10:15:00) - interval为3600时,start_time设置为整小时时刻点,如:1631239200000(对应2021-09-10 10:00:00) - interval为86400时,start_time设置为东8区零点时刻点,如:1631203200000(对应2021-09-10 00:00:00)
	StartTime int64 `json:"start_time"`

	// - 查询结束时间戳,时间戳应设置需为整5分钟,设置方式如下: - interval为300时,end_time设置为整5分钟时刻点,如:1631243700000(对应2021-09-10 11:15:00) - interval为3600时,end_time设置为整小时时刻点,如:1631325600000(对应2021-09-11 10:00:00) - interval为86400时,end_time设置为东8区零点时刻点,如:1631376000000(对应2021-09-12 00:00:00)
	EndTime int64 `json:"end_time"`

	// 域名列表,多个域名以逗号(半角)分隔,如:www.test1.com,www.test2.com all表示查询名下全部域名
	DomainName string `json:"domain_name"`

	// - 网络资源消耗:   - bw(带宽)   - flux(流量)   - bs_bw(回源带宽)   - bs_flux(回源流量) - 访问情况   - req_num(请求总数)   - hit_num(请求命中次数)   - bs_num(回源总数)   - bs_fail_num(回源失败数)   - hit_flux(命中流量) - HTTP状态码(组合指标)   - http_code_2xx(状态码汇总2xx)   - http_code_3xx(状态码汇总3xx)   - http_code_4xx(状态码汇总4xx)   - http_code_5xx(状态码汇总5xx)   - bs_http_code_2xx(回源状态码汇总2xx)   - bs_http_code_3xx(回源状态码汇总3xx)   - bs_http_code_4xx(回源状态码汇总4xx)   - bs_http_code_5xx(回源状态码汇总5xx)   - status_code_2xx(状态码详情2xx)   - status_code_3xx(状态码详情3xx)   - status_code_4xx(状态码详情4xx)   - status_code_5xx(状态码详情5xx)   - bs_status_code_2xx(回源状态码详情2xx)   - bs_status_code_3xx(回源状态码详情3xx)   - bs_status_code_4xx(回源状态码详情4xx)   - bs_status_code_5xx(回源状态码详情5xx)   - status_code和bs_status_code不能一起查询
	StatType string `json:"stat_type"`

	// - 查询时间间隔,单位:秒,取值说明: - 300(5分钟):最大查询跨度2天 - 3600(1小时):最大查询跨度7天 - 86400(1天):最大查询跨度31天 - 如果不传,默认取对应时间跨度的最小间隔。
	Interval *int64 `json:"interval,omitempty"`

	// 数据分组方式,可选domain,默认不分组
	GroupBy *string `json:"group_by,omitempty"`

	// 服务区域:mainland_china(默认)、outside_mainland_china,当查询回源类指标时该参数无效。
	ServiceArea *string `json:"service_area,omitempty"`

	// 当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,\"all\"表示所有项目。注意:当使用子账号调用接口时,该参数必传。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
}

Request Object

func (ShowDomainStatsRequest) String

func (o ShowDomainStatsRequest) String() string

type ShowDomainStatsResponse

type ShowDomainStatsResponse struct {

	// 按指定的分组方式组织的数据
	Result         map[string]interface{} `json:"result,omitempty"`
	HttpStatusCode int                    `json:"-"`
}

Response Object

func (ShowDomainStatsResponse) String

func (o ShowDomainStatsResponse) String() string

type ShowTopUrlRequest

type ShowTopUrlRequest struct {

	// 查询起始时间戳,只能传0点毫秒时间戳
	StartTime int64 `json:"start_time"`

	// 查询结束时间戳,只能传0点毫秒时间戳
	EndTime int64 `json:"end_time"`

	// 域名列表,多个域名以逗号(半角)分隔,如:www.test1.com,www.test2.com all表示查询名下全部域名
	DomainName string `json:"domain_name"`

	// - 参数类型支持:flux(流量),req_num(请求数)
	StatType string `json:"stat_type"`

	// 服务区域:mainland_china(大陆),outside_mainland_china(海外),默认为mainland_china
	ServiceArea *string `json:"service_area,omitempty"`

	// 当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,\"all\"表示所有项目。注意:当使用子账号调用接口时,该参数必传。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
}

Request Object

func (ShowTopUrlRequest) String

func (o ShowTopUrlRequest) String() string

type ShowTopUrlResponse

type ShowTopUrlResponse struct {

	// 服务区域
	ServiceArea *string `json:"service_area,omitempty"`

	// 详情数据对象。
	TopUrlSummary  *[]TopUrlSummary `json:"top_url_summary,omitempty"`
	HttpStatusCode int              `json:"-"`
}

Response Object

func (ShowTopUrlResponse) String

func (o ShowTopUrlResponse) String() string

type TopUrlSummary added in v0.0.91

type TopUrlSummary struct {

	// URL名称。
	Url *string `json:"url,omitempty"`

	// 对应查询类型的值。(流量单位:Byte)
	Value *int64 `json:"value,omitempty"`

	// 查询起始时间戳。
	StartTime *int64 `json:"start_time,omitempty"`

	// 查询结束时间戳
	EndTime *int64 `json:"end_time,omitempty"`

	// 参数类型支持:flux(流量),req_num(请求总数)。
	StatType *string `json:"stat_type,omitempty"`
}

top url 详情数据

func (TopUrlSummary) String added in v0.0.91

func (o TopUrlSummary) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL