Commit b62b5ab2 by 彭芳

[feat]: add swagger doc

parent 32c58e20
......@@ -20,6 +20,7 @@ endif
init:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install github.com/google/wire/cmd/wire@latest
go install github.com/swaggo/swag/cmd/swag@latest
.PHONY: config
# generate internal proto
......@@ -52,6 +53,10 @@ all:
run: all build
./bin/demo
.PHONY: swag
swag:
swag init -g ./internal/router/web.go --output ./docs/
# show help
help:
@echo ''
......
// Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/report/ad": {
"post": {
"description": "查询广告计划数据报表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"report"
],
"summary": "查询广告计划数据报表",
"parameters": [
{
"description": "请求参数",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/biz.ListReportRequest"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"allOf": [
{
"$ref": "#/definitions/biz.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/biz.ListAdResponse"
}
}
}
]
}
}
}
}
},
"/report/campaign": {
"post": {
"description": "查询广告组数据报表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"report"
],
"summary": "查询广告组数据报表",
"parameters": [
{
"description": "请求参数",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/biz.ListReportRequest"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"allOf": [
{
"$ref": "#/definitions/biz.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/biz.ListCampaignResponse"
}
}
}
]
}
}
}
}
},
"/report/creative": {
"post": {
"description": "查询广告创意数据报表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"report"
],
"summary": "查询广告创意数据报表",
"parameters": [
{
"description": "请求参数",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/biz.ListReportRequest"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"allOf": [
{
"$ref": "#/definitions/biz.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/biz.ListCreativeResponse"
}
}
}
]
}
}
}
}
}
},
"definitions": {
"biz.Ad": {
"type": "object",
"properties": {
"active": {
"description": "激活数",
"type": "integer"
},
"active_cost": {
"description": "激活成本",
"type": "number"
},
"active_pay_cost": {
"description": "首次付费成本",
"type": "number"
},
"active_pay_rate": {
"description": "首次付费率",
"type": "number"
},
"active_rate": {
"description": "激活率",
"type": "number"
},
"active_register_cost": {
"description": "注册成本",
"type": "number"
},
"active_register_rate": {
"description": "注册率",
"type": "number"
},
"ad_id": {
"description": "广告计划id",
"type": "string"
},
"ad_name": {
"description": "广告计划名称",
"type": "string"
},
"advertiser_id": {
"description": "广告主id",
"type": "string"
},
"attribution_active_pay_intra_one_day_amount": {
"description": "游戏行业-激活后24h付费金额",
"type": "number"
},
"attribution_active_pay_intra_one_day_count": {
"description": "游戏行业-激活后24h首次付费数",
"type": "integer"
},
"attribution_convert": {
"description": "转化数(计费时间)",
"type": "integer"
},
"attribution_convert_cost": {
"description": "转化成本(计费时间)",
"type": "number"
},
"attribution_deep_convert": {
"description": "深度转化数(计费时间)",
"type": "integer"
},
"attribution_deep_convert_cost": {
"description": "深度转化成本(计费时间)",
"type": "number"
},
"attribution_game_pay_7d_count": {
"description": "7日付费次数(激活时间)",
"type": "integer"
},
"attribution_next_day_open_cnt": {
"description": "次留回传数",
"type": "integer"
},
"attribution_next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"attribution_next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"average_play_time_per_play": {
"description": "视频数据-平均单次播放时长,单位:秒",
"type": "number"
},
"avg_click_cost": {
"description": "点击成本",
"type": "number"
},
"avg_show_cost": {
"description": "计算字段",
"type": "number"
},
"campaign_id": {
"description": "广告组ID",
"type": "string"
},
"campaign_name": {
"description": "广告主组名称",
"type": "string"
},
"click": {
"description": "点击量",
"type": "integer"
},
"click_install": {
"description": "点击安装数",
"type": "integer"
},
"convert": {
"description": "转化数",
"type": "integer"
},
"convert_cost": {
"description": "转化成本",
"type": "number"
},
"convert_rate": {
"description": "转化率",
"type": "number"
},
"cost": {
"description": "花费",
"type": "number"
},
"ctr": {
"description": "点击率",
"type": "number"
},
"deep_convert": {
"description": "深度转化数",
"type": "integer"
},
"deep_convert_cost": {
"description": "深度转化成本",
"type": "number"
},
"deep_convert_rate": {
"description": "深度转化率",
"type": "number"
},
"download_finish": {
"description": "安卓下载完成数",
"type": "integer"
},
"download_finish_cost": {
"description": "安卓下载完成成本",
"type": "number"
},
"download_finish_rate": {
"description": "安卓下载完成率",
"type": "number"
},
"download_start": {
"description": "安卓下载开始数",
"type": "integer"
},
"download_start_cost": {
"description": "安卓下载开始成本",
"type": "number"
},
"download_start_rate": {
"description": "安卓下载开始率",
"type": "number"
},
"game_addiction": {
"description": "关键行为数",
"type": "integer"
},
"game_addiction_cost": {
"description": "关键行为成本",
"type": "number"
},
"game_addiction_rate": {
"description": "关键行为率",
"type": "number"
},
"game_pay_count": {
"description": "付费次数",
"type": "integer"
},
"in_app_cart": {
"description": "APP内加入购物车",
"type": "integer"
},
"in_app_detail_uv": {
"description": "APP内访问详情页",
"type": "integer"
},
"in_app_order": {
"description": "APP内下单",
"type": "integer"
},
"in_app_pay": {
"description": "APP内付费",
"type": "integer"
},
"in_app_uv": {
"description": "APP内访问",
"type": "integer"
},
"install_finish": {
"description": "安卓安装完成数",
"type": "integer"
},
"install_finish_cost": {
"description": "安卓安装完成成本",
"type": "number"
},
"install_finish_rate": {
"description": "安卓安装完成率",
"type": "number"
},
"next_day_open": {
"description": "次留数",
"type": "integer"
},
"next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"pay_count": {
"description": "首次付费次数",
"type": "integer"
},
"play_100_feed_break": {
"description": "视频数据-99%进度播放数",
"type": "integer"
},
"play_25_feed_break": {
"description": "视频数据-25%进度播放数",
"type": "integer"
},
"play_50_feed_break": {
"description": "视频数据-50%进度播放数",
"type": "integer"
},
"play_75_feed_break": {
"description": "视频数据-75%进度播放数",
"type": "integer"
},
"play_duration_sum": {
"description": "视频数据-播放时长,单位ms",
"type": "integer"
},
"play_over_rate": {
"description": "播完率",
"type": "number"
},
"register": {
"description": "注册数",
"type": "integer"
},
"show": {
"description": "展示量",
"type": "integer"
},
"stat_datetime": {
"description": "数据起始时间(yyyy-MM-dd HH:mm:ss)",
"type": "integer"
},
"timestamp": {
"description": "创建时间(yyyy-MM-dd HH:mm:ss)",
"type": "string"
},
"total_play": {
"description": "视频数据-播放数",
"type": "integer"
},
"valid_play": {
"description": "视频数据-有效播放数",
"type": "integer"
},
"valid_play_cost": {
"description": "有效播放成本",
"type": "number"
},
"valid_play_rate": {
"description": "有效播放率",
"type": "number"
}
}
},
"biz.Campaign": {
"type": "object",
"properties": {
"active": {
"description": "激活数",
"type": "integer"
},
"active_cost": {
"description": "激活成本",
"type": "number"
},
"active_pay_cost": {
"description": "首次付费成本",
"type": "number"
},
"active_pay_rate": {
"description": "首次付费率",
"type": "number"
},
"active_rate": {
"description": "激活率",
"type": "number"
},
"active_register_cost": {
"description": "注册成本",
"type": "number"
},
"active_register_rate": {
"description": "注册率",
"type": "number"
},
"advertiser_id": {
"description": "广告主id",
"type": "string"
},
"attribution_active_pay_intra_one_day_amount": {
"description": "游戏行业-激活后24h付费金额",
"type": "number"
},
"attribution_active_pay_intra_one_day_count": {
"description": "游戏行业-激活后24h首次付费数",
"type": "integer"
},
"attribution_convert": {
"description": "转化数(计费时间)",
"type": "integer"
},
"attribution_convert_cost": {
"description": "转化成本(计费时间)",
"type": "number"
},
"attribution_deep_convert": {
"description": "深度转化数(计费时间)",
"type": "integer"
},
"attribution_deep_convert_cost": {
"description": "深度转化成本(计费时间)",
"type": "number"
},
"attribution_game_pay_7d_count": {
"description": "7日付费次数(激活时间)",
"type": "integer"
},
"attribution_next_day_open_cnt": {
"description": "次留回传数",
"type": "integer"
},
"attribution_next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"attribution_next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"average_play_time_per_play": {
"description": "视频数据-平均单次播放时长,单位:秒",
"type": "number"
},
"avg_click_cost": {
"description": "点击成本",
"type": "number"
},
"avg_show_cost": {
"description": "计算字段",
"type": "number"
},
"campaign_id": {
"description": "广告组ID",
"type": "string"
},
"campaign_name": {
"description": "广告主组名称",
"type": "string"
},
"click": {
"description": "点击量",
"type": "integer"
},
"click_install": {
"description": "点击安装数",
"type": "integer"
},
"convert": {
"description": "转化数",
"type": "integer"
},
"convert_cost": {
"description": "转化成本",
"type": "number"
},
"convert_rate": {
"description": "转化率",
"type": "number"
},
"cost": {
"description": "花费",
"type": "number"
},
"ctr": {
"description": "点击率",
"type": "number"
},
"deep_convert": {
"description": "深度转化数",
"type": "integer"
},
"deep_convert_cost": {
"description": "深度转化成本",
"type": "number"
},
"deep_convert_rate": {
"description": "深度转化率",
"type": "number"
},
"download_finish": {
"description": "安卓下载完成数",
"type": "integer"
},
"download_finish_cost": {
"description": "安卓下载完成成本",
"type": "number"
},
"download_finish_rate": {
"description": "安卓下载完成率",
"type": "number"
},
"download_start": {
"description": "安卓下载开始数",
"type": "integer"
},
"download_start_cost": {
"description": "安卓下载开始成本",
"type": "number"
},
"download_start_rate": {
"description": "安卓下载开始率",
"type": "number"
},
"game_addiction": {
"description": "关键行为数",
"type": "integer"
},
"game_addiction_cost": {
"description": "关键行为成本",
"type": "number"
},
"game_addiction_rate": {
"description": "关键行为率",
"type": "number"
},
"game_pay_count": {
"description": "付费次数",
"type": "integer"
},
"in_app_cart": {
"description": "APP内加入购物车",
"type": "integer"
},
"in_app_detail_uv": {
"description": "APP内访问详情页",
"type": "integer"
},
"in_app_order": {
"description": "APP内下单",
"type": "integer"
},
"in_app_pay": {
"description": "APP内付费",
"type": "integer"
},
"in_app_uv": {
"description": "APP内访问",
"type": "integer"
},
"install_finish": {
"description": "安卓安装完成数",
"type": "integer"
},
"install_finish_cost": {
"description": "安卓安装完成成本",
"type": "number"
},
"install_finish_rate": {
"description": "安卓安装完成率",
"type": "number"
},
"next_day_open": {
"description": "次留数",
"type": "integer"
},
"next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"pay_count": {
"description": "首次付费次数",
"type": "integer"
},
"play_100_feed_break": {
"description": "视频数据-99%进度播放数",
"type": "integer"
},
"play_25_feed_break": {
"description": "视频数据-25%进度播放数",
"type": "integer"
},
"play_50_feed_break": {
"description": "视频数据-50%进度播放数",
"type": "integer"
},
"play_75_feed_break": {
"description": "视频数据-75%进度播放数",
"type": "integer"
},
"play_duration_sum": {
"description": "视频数据-播放时长,单位ms",
"type": "integer"
},
"play_over_rate": {
"description": "播完率",
"type": "number"
},
"register": {
"description": "注册数",
"type": "integer"
},
"show": {
"description": "展示量",
"type": "integer"
},
"stat_datetime": {
"description": "数据起始时间(yyyy-MM-dd HH:mm:ss)",
"type": "integer"
},
"timestamp": {
"description": "创建时间(yyyy-MM-dd HH:mm:ss)",
"type": "string"
},
"total_play": {
"description": "视频数据-播放数",
"type": "integer"
},
"valid_play": {
"description": "视频数据-有效播放数",
"type": "integer"
},
"valid_play_cost": {
"description": "有效播放成本",
"type": "number"
},
"valid_play_rate": {
"description": "有效播放率",
"type": "number"
}
}
},
"biz.Creative": {
"type": "object",
"properties": {
"active": {
"description": "激活数",
"type": "integer"
},
"active_cost": {
"description": "激活成本",
"type": "number"
},
"active_pay_cost": {
"description": "首次付费成本",
"type": "number"
},
"active_pay_rate": {
"description": "首次付费率",
"type": "number"
},
"active_rate": {
"description": "激活率",
"type": "number"
},
"active_register_cost": {
"description": "注册成本",
"type": "number"
},
"active_register_rate": {
"description": "注册率",
"type": "number"
},
"ad_id": {
"description": "广告计划id",
"type": "string"
},
"ad_name": {
"description": "广告计划名称",
"type": "string"
},
"advertiser_id": {
"description": "广告主id",
"type": "string"
},
"attribution_active_pay_intra_one_day_amount": {
"description": "游戏行业-激活后24h付费金额",
"type": "number"
},
"attribution_active_pay_intra_one_day_count": {
"description": "游戏行业-激活后24h首次付费数",
"type": "integer"
},
"attribution_convert": {
"description": "转化数(计费时间)",
"type": "integer"
},
"attribution_convert_cost": {
"description": "转化成本(计费时间)",
"type": "number"
},
"attribution_deep_convert": {
"description": "深度转化数(计费时间)",
"type": "integer"
},
"attribution_deep_convert_cost": {
"description": "深度转化成本(计费时间)",
"type": "number"
},
"attribution_game_pay_7d_count": {
"description": "7日付费次数(激活时间)",
"type": "integer"
},
"attribution_next_day_open_cnt": {
"description": "次留回传数",
"type": "integer"
},
"attribution_next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"attribution_next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"average_play_time_per_play": {
"description": "视频数据-平均单次播放时长,单位:秒",
"type": "number"
},
"avg_click_cost": {
"description": "点击成本",
"type": "number"
},
"avg_show_cost": {
"description": "计算字段",
"type": "number"
},
"campaign_id": {
"description": "广告组ID",
"type": "string"
},
"campaign_name": {
"description": "广告主组名称",
"type": "string"
},
"click": {
"description": "点击量",
"type": "integer"
},
"click_install": {
"description": "点击安装数",
"type": "integer"
},
"convert": {
"description": "转化数",
"type": "integer"
},
"convert_cost": {
"description": "转化成本",
"type": "number"
},
"convert_rate": {
"description": "转化率",
"type": "number"
},
"cost": {
"description": "花费",
"type": "number"
},
"creative_id": {
"description": "创意id",
"type": "string"
},
"ctr": {
"description": "点击率",
"type": "number"
},
"deep_convert": {
"description": "深度转化数",
"type": "integer"
},
"deep_convert_cost": {
"description": "深度转化成本",
"type": "number"
},
"deep_convert_rate": {
"description": "深度转化率",
"type": "number"
},
"download_finish": {
"description": "安卓下载完成数",
"type": "integer"
},
"download_finish_cost": {
"description": "安卓下载完成成本",
"type": "number"
},
"download_finish_rate": {
"description": "安卓下载完成率",
"type": "number"
},
"download_start": {
"description": "安卓下载开始数",
"type": "integer"
},
"download_start_cost": {
"description": "安卓下载开始成本",
"type": "number"
},
"download_start_rate": {
"description": "安卓下载开始率",
"type": "number"
},
"game_addiction": {
"description": "关键行为数",
"type": "integer"
},
"game_addiction_cost": {
"description": "关键行为成本",
"type": "number"
},
"game_addiction_rate": {
"description": "关键行为率",
"type": "number"
},
"game_pay_count": {
"description": "付费次数",
"type": "integer"
},
"in_app_cart": {
"description": "APP内加入购物车",
"type": "integer"
},
"in_app_detail_uv": {
"description": "APP内访问详情页",
"type": "integer"
},
"in_app_order": {
"description": "APP内下单",
"type": "integer"
},
"in_app_pay": {
"description": "APP内付费",
"type": "integer"
},
"in_app_uv": {
"description": "APP内访问",
"type": "integer"
},
"install_finish": {
"description": "安卓安装完成数",
"type": "integer"
},
"install_finish_cost": {
"description": "安卓安装完成成本",
"type": "number"
},
"install_finish_rate": {
"description": "安卓安装完成率",
"type": "number"
},
"next_day_open": {
"description": "次留数",
"type": "integer"
},
"next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"pay_count": {
"description": "首次付费次数",
"type": "integer"
},
"play_100_feed_break": {
"description": "视频数据-99%进度播放数",
"type": "integer"
},
"play_25_feed_break": {
"description": "视频数据-25%进度播放数",
"type": "integer"
},
"play_50_feed_break": {
"description": "视频数据-50%进度播放数",
"type": "integer"
},
"play_75_feed_break": {
"description": "视频数据-75%进度播放数",
"type": "integer"
},
"play_duration_sum": {
"description": "视频数据-播放时长,单位ms",
"type": "integer"
},
"play_over_rate": {
"description": "播完率",
"type": "number"
},
"register": {
"description": "注册数",
"type": "integer"
},
"show": {
"description": "展示量",
"type": "integer"
},
"stat_datetime": {
"description": "数据起始时间(yyyy-MM-dd HH:mm:ss)",
"type": "integer"
},
"timestamp": {
"description": "创建时间(yyyy-MM-dd HH:mm:ss)",
"type": "string"
},
"total_play": {
"description": "视频数据-播放数",
"type": "integer"
},
"valid_play": {
"description": "视频数据-有效播放数",
"type": "integer"
},
"valid_play_cost": {
"description": "有效播放成本",
"type": "number"
},
"valid_play_rate": {
"description": "有效播放率",
"type": "number"
}
}
},
"biz.ListAdResponse": {
"type": "object",
"properties": {
"list": {
"description": "数据信息",
"type": "array",
"items": {
"$ref": "#/definitions/biz.Ad"
}
},
"page_info": {
"description": "页码信息",
"allOf": [
{
"$ref": "#/definitions/common.PageInfo"
}
]
}
}
},
"biz.ListCampaignResponse": {
"type": "object",
"properties": {
"list": {
"description": "数据信息",
"type": "array",
"items": {
"$ref": "#/definitions/biz.Campaign"
}
},
"page_info": {
"description": "页码信息",
"allOf": [
{
"$ref": "#/definitions/common.PageInfo"
}
]
}
}
},
"biz.ListCreativeResponse": {
"type": "object",
"properties": {
"list": {
"description": "数据信息",
"type": "array",
"items": {
"$ref": "#/definitions/biz.Creative"
}
},
"page_info": {
"description": "页码信息",
"allOf": [
{
"$ref": "#/definitions/common.PageInfo"
}
]
}
}
},
"biz.ListReportRequest": {
"type": "object",
"properties": {
"end_date": {
"description": "结束时间(格式YYYY-MM-DD)",
"type": "string"
},
"order_by": {
"description": "排序字段",
"type": "string"
},
"order_by_mode": {
"description": "排序方式 desc asc",
"type": "string"
},
"page": {
"description": "页码",
"type": "integer"
},
"page_size": {
"description": "每页大小",
"type": "integer"
},
"start_date": {
"description": "开始时间(格式YYYY-MM-DD)",
"type": "string"
},
"time_granularity": {
"description": "时间粒度(允许值:STAT_TIME_GRANULARITY_DAILY (按天维度),STAT_TIME_GRANULARITY_HOURLY (按小时维度))",
"allOf": [
{
"$ref": "#/definitions/biz.TimeGranularity"
}
]
}
}
},
"biz.Response": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"data": {},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
}
}
},
"biz.TimeGranularity": {
"type": "string",
"enum": [
"STAT_TIME_GRANULARITY_DAILY",
"STAT_TIME_GRANULARITY_HOURLY"
],
"x-enum-comments": {
"StatTimeGranularityDaily": "按天维度",
"StatTimeGranularityHourly": "按小时维度"
},
"x-enum-varnames": [
"StatTimeGranularityDaily",
"StatTimeGranularityHourly"
]
},
"common.PageInfo": {
"type": "object",
"properties": {
"page": {
"description": "当前页码",
"type": "integer"
},
"page_size": {
"description": "每页大小",
"type": "integer"
},
"total_number": {
"description": "数据总数",
"type": "integer"
},
"total_page": {
"description": "总页码数",
"type": "integer"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "token",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "127.0.0.1:8000",
BasePath: "/api/v1",
Schemes: []string{},
Title: "Ads Api Docs",
Description: "swagger api for [ads](https://test.adsdesk.cn/)",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
{
"swagger": "2.0",
"info": {
"description": "swagger api for [ads](https://test.adsdesk.cn/)",
"title": "Ads Api Docs",
"contact": {},
"version": "1.0"
},
"host": "127.0.0.1:8000",
"basePath": "/api/v1",
"paths": {
"/report/ad": {
"post": {
"description": "查询广告计划数据报表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"report"
],
"summary": "查询广告计划数据报表",
"parameters": [
{
"description": "请求参数",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/biz.ListReportRequest"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"allOf": [
{
"$ref": "#/definitions/biz.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/biz.ListAdResponse"
}
}
}
]
}
}
}
}
},
"/report/campaign": {
"post": {
"description": "查询广告组数据报表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"report"
],
"summary": "查询广告组数据报表",
"parameters": [
{
"description": "请求参数",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/biz.ListReportRequest"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"allOf": [
{
"$ref": "#/definitions/biz.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/biz.ListCampaignResponse"
}
}
}
]
}
}
}
}
},
"/report/creative": {
"post": {
"description": "查询广告创意数据报表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"report"
],
"summary": "查询广告创意数据报表",
"parameters": [
{
"description": "请求参数",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/biz.ListReportRequest"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"allOf": [
{
"$ref": "#/definitions/biz.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/biz.ListCreativeResponse"
}
}
}
]
}
}
}
}
}
},
"definitions": {
"biz.Ad": {
"type": "object",
"properties": {
"active": {
"description": "激活数",
"type": "integer"
},
"active_cost": {
"description": "激活成本",
"type": "number"
},
"active_pay_cost": {
"description": "首次付费成本",
"type": "number"
},
"active_pay_rate": {
"description": "首次付费率",
"type": "number"
},
"active_rate": {
"description": "激活率",
"type": "number"
},
"active_register_cost": {
"description": "注册成本",
"type": "number"
},
"active_register_rate": {
"description": "注册率",
"type": "number"
},
"ad_id": {
"description": "广告计划id",
"type": "string"
},
"ad_name": {
"description": "广告计划名称",
"type": "string"
},
"advertiser_id": {
"description": "广告主id",
"type": "string"
},
"attribution_active_pay_intra_one_day_amount": {
"description": "游戏行业-激活后24h付费金额",
"type": "number"
},
"attribution_active_pay_intra_one_day_count": {
"description": "游戏行业-激活后24h首次付费数",
"type": "integer"
},
"attribution_convert": {
"description": "转化数(计费时间)",
"type": "integer"
},
"attribution_convert_cost": {
"description": "转化成本(计费时间)",
"type": "number"
},
"attribution_deep_convert": {
"description": "深度转化数(计费时间)",
"type": "integer"
},
"attribution_deep_convert_cost": {
"description": "深度转化成本(计费时间)",
"type": "number"
},
"attribution_game_pay_7d_count": {
"description": "7日付费次数(激活时间)",
"type": "integer"
},
"attribution_next_day_open_cnt": {
"description": "次留回传数",
"type": "integer"
},
"attribution_next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"attribution_next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"average_play_time_per_play": {
"description": "视频数据-平均单次播放时长,单位:秒",
"type": "number"
},
"avg_click_cost": {
"description": "点击成本",
"type": "number"
},
"avg_show_cost": {
"description": "计算字段",
"type": "number"
},
"campaign_id": {
"description": "广告组ID",
"type": "string"
},
"campaign_name": {
"description": "广告主组名称",
"type": "string"
},
"click": {
"description": "点击量",
"type": "integer"
},
"click_install": {
"description": "点击安装数",
"type": "integer"
},
"convert": {
"description": "转化数",
"type": "integer"
},
"convert_cost": {
"description": "转化成本",
"type": "number"
},
"convert_rate": {
"description": "转化率",
"type": "number"
},
"cost": {
"description": "花费",
"type": "number"
},
"ctr": {
"description": "点击率",
"type": "number"
},
"deep_convert": {
"description": "深度转化数",
"type": "integer"
},
"deep_convert_cost": {
"description": "深度转化成本",
"type": "number"
},
"deep_convert_rate": {
"description": "深度转化率",
"type": "number"
},
"download_finish": {
"description": "安卓下载完成数",
"type": "integer"
},
"download_finish_cost": {
"description": "安卓下载完成成本",
"type": "number"
},
"download_finish_rate": {
"description": "安卓下载完成率",
"type": "number"
},
"download_start": {
"description": "安卓下载开始数",
"type": "integer"
},
"download_start_cost": {
"description": "安卓下载开始成本",
"type": "number"
},
"download_start_rate": {
"description": "安卓下载开始率",
"type": "number"
},
"game_addiction": {
"description": "关键行为数",
"type": "integer"
},
"game_addiction_cost": {
"description": "关键行为成本",
"type": "number"
},
"game_addiction_rate": {
"description": "关键行为率",
"type": "number"
},
"game_pay_count": {
"description": "付费次数",
"type": "integer"
},
"in_app_cart": {
"description": "APP内加入购物车",
"type": "integer"
},
"in_app_detail_uv": {
"description": "APP内访问详情页",
"type": "integer"
},
"in_app_order": {
"description": "APP内下单",
"type": "integer"
},
"in_app_pay": {
"description": "APP内付费",
"type": "integer"
},
"in_app_uv": {
"description": "APP内访问",
"type": "integer"
},
"install_finish": {
"description": "安卓安装完成数",
"type": "integer"
},
"install_finish_cost": {
"description": "安卓安装完成成本",
"type": "number"
},
"install_finish_rate": {
"description": "安卓安装完成率",
"type": "number"
},
"next_day_open": {
"description": "次留数",
"type": "integer"
},
"next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"pay_count": {
"description": "首次付费次数",
"type": "integer"
},
"play_100_feed_break": {
"description": "视频数据-99%进度播放数",
"type": "integer"
},
"play_25_feed_break": {
"description": "视频数据-25%进度播放数",
"type": "integer"
},
"play_50_feed_break": {
"description": "视频数据-50%进度播放数",
"type": "integer"
},
"play_75_feed_break": {
"description": "视频数据-75%进度播放数",
"type": "integer"
},
"play_duration_sum": {
"description": "视频数据-播放时长,单位ms",
"type": "integer"
},
"play_over_rate": {
"description": "播完率",
"type": "number"
},
"register": {
"description": "注册数",
"type": "integer"
},
"show": {
"description": "展示量",
"type": "integer"
},
"stat_datetime": {
"description": "数据起始时间(yyyy-MM-dd HH:mm:ss)",
"type": "integer"
},
"timestamp": {
"description": "创建时间(yyyy-MM-dd HH:mm:ss)",
"type": "string"
},
"total_play": {
"description": "视频数据-播放数",
"type": "integer"
},
"valid_play": {
"description": "视频数据-有效播放数",
"type": "integer"
},
"valid_play_cost": {
"description": "有效播放成本",
"type": "number"
},
"valid_play_rate": {
"description": "有效播放率",
"type": "number"
}
}
},
"biz.Campaign": {
"type": "object",
"properties": {
"active": {
"description": "激活数",
"type": "integer"
},
"active_cost": {
"description": "激活成本",
"type": "number"
},
"active_pay_cost": {
"description": "首次付费成本",
"type": "number"
},
"active_pay_rate": {
"description": "首次付费率",
"type": "number"
},
"active_rate": {
"description": "激活率",
"type": "number"
},
"active_register_cost": {
"description": "注册成本",
"type": "number"
},
"active_register_rate": {
"description": "注册率",
"type": "number"
},
"advertiser_id": {
"description": "广告主id",
"type": "string"
},
"attribution_active_pay_intra_one_day_amount": {
"description": "游戏行业-激活后24h付费金额",
"type": "number"
},
"attribution_active_pay_intra_one_day_count": {
"description": "游戏行业-激活后24h首次付费数",
"type": "integer"
},
"attribution_convert": {
"description": "转化数(计费时间)",
"type": "integer"
},
"attribution_convert_cost": {
"description": "转化成本(计费时间)",
"type": "number"
},
"attribution_deep_convert": {
"description": "深度转化数(计费时间)",
"type": "integer"
},
"attribution_deep_convert_cost": {
"description": "深度转化成本(计费时间)",
"type": "number"
},
"attribution_game_pay_7d_count": {
"description": "7日付费次数(激活时间)",
"type": "integer"
},
"attribution_next_day_open_cnt": {
"description": "次留回传数",
"type": "integer"
},
"attribution_next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"attribution_next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"average_play_time_per_play": {
"description": "视频数据-平均单次播放时长,单位:秒",
"type": "number"
},
"avg_click_cost": {
"description": "点击成本",
"type": "number"
},
"avg_show_cost": {
"description": "计算字段",
"type": "number"
},
"campaign_id": {
"description": "广告组ID",
"type": "string"
},
"campaign_name": {
"description": "广告主组名称",
"type": "string"
},
"click": {
"description": "点击量",
"type": "integer"
},
"click_install": {
"description": "点击安装数",
"type": "integer"
},
"convert": {
"description": "转化数",
"type": "integer"
},
"convert_cost": {
"description": "转化成本",
"type": "number"
},
"convert_rate": {
"description": "转化率",
"type": "number"
},
"cost": {
"description": "花费",
"type": "number"
},
"ctr": {
"description": "点击率",
"type": "number"
},
"deep_convert": {
"description": "深度转化数",
"type": "integer"
},
"deep_convert_cost": {
"description": "深度转化成本",
"type": "number"
},
"deep_convert_rate": {
"description": "深度转化率",
"type": "number"
},
"download_finish": {
"description": "安卓下载完成数",
"type": "integer"
},
"download_finish_cost": {
"description": "安卓下载完成成本",
"type": "number"
},
"download_finish_rate": {
"description": "安卓下载完成率",
"type": "number"
},
"download_start": {
"description": "安卓下载开始数",
"type": "integer"
},
"download_start_cost": {
"description": "安卓下载开始成本",
"type": "number"
},
"download_start_rate": {
"description": "安卓下载开始率",
"type": "number"
},
"game_addiction": {
"description": "关键行为数",
"type": "integer"
},
"game_addiction_cost": {
"description": "关键行为成本",
"type": "number"
},
"game_addiction_rate": {
"description": "关键行为率",
"type": "number"
},
"game_pay_count": {
"description": "付费次数",
"type": "integer"
},
"in_app_cart": {
"description": "APP内加入购物车",
"type": "integer"
},
"in_app_detail_uv": {
"description": "APP内访问详情页",
"type": "integer"
},
"in_app_order": {
"description": "APP内下单",
"type": "integer"
},
"in_app_pay": {
"description": "APP内付费",
"type": "integer"
},
"in_app_uv": {
"description": "APP内访问",
"type": "integer"
},
"install_finish": {
"description": "安卓安装完成数",
"type": "integer"
},
"install_finish_cost": {
"description": "安卓安装完成成本",
"type": "number"
},
"install_finish_rate": {
"description": "安卓安装完成率",
"type": "number"
},
"next_day_open": {
"description": "次留数",
"type": "integer"
},
"next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"pay_count": {
"description": "首次付费次数",
"type": "integer"
},
"play_100_feed_break": {
"description": "视频数据-99%进度播放数",
"type": "integer"
},
"play_25_feed_break": {
"description": "视频数据-25%进度播放数",
"type": "integer"
},
"play_50_feed_break": {
"description": "视频数据-50%进度播放数",
"type": "integer"
},
"play_75_feed_break": {
"description": "视频数据-75%进度播放数",
"type": "integer"
},
"play_duration_sum": {
"description": "视频数据-播放时长,单位ms",
"type": "integer"
},
"play_over_rate": {
"description": "播完率",
"type": "number"
},
"register": {
"description": "注册数",
"type": "integer"
},
"show": {
"description": "展示量",
"type": "integer"
},
"stat_datetime": {
"description": "数据起始时间(yyyy-MM-dd HH:mm:ss)",
"type": "integer"
},
"timestamp": {
"description": "创建时间(yyyy-MM-dd HH:mm:ss)",
"type": "string"
},
"total_play": {
"description": "视频数据-播放数",
"type": "integer"
},
"valid_play": {
"description": "视频数据-有效播放数",
"type": "integer"
},
"valid_play_cost": {
"description": "有效播放成本",
"type": "number"
},
"valid_play_rate": {
"description": "有效播放率",
"type": "number"
}
}
},
"biz.Creative": {
"type": "object",
"properties": {
"active": {
"description": "激活数",
"type": "integer"
},
"active_cost": {
"description": "激活成本",
"type": "number"
},
"active_pay_cost": {
"description": "首次付费成本",
"type": "number"
},
"active_pay_rate": {
"description": "首次付费率",
"type": "number"
},
"active_rate": {
"description": "激活率",
"type": "number"
},
"active_register_cost": {
"description": "注册成本",
"type": "number"
},
"active_register_rate": {
"description": "注册率",
"type": "number"
},
"ad_id": {
"description": "广告计划id",
"type": "string"
},
"ad_name": {
"description": "广告计划名称",
"type": "string"
},
"advertiser_id": {
"description": "广告主id",
"type": "string"
},
"attribution_active_pay_intra_one_day_amount": {
"description": "游戏行业-激活后24h付费金额",
"type": "number"
},
"attribution_active_pay_intra_one_day_count": {
"description": "游戏行业-激活后24h首次付费数",
"type": "integer"
},
"attribution_convert": {
"description": "转化数(计费时间)",
"type": "integer"
},
"attribution_convert_cost": {
"description": "转化成本(计费时间)",
"type": "number"
},
"attribution_deep_convert": {
"description": "深度转化数(计费时间)",
"type": "integer"
},
"attribution_deep_convert_cost": {
"description": "深度转化成本(计费时间)",
"type": "number"
},
"attribution_game_pay_7d_count": {
"description": "7日付费次数(激活时间)",
"type": "integer"
},
"attribution_next_day_open_cnt": {
"description": "次留回传数",
"type": "integer"
},
"attribution_next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"attribution_next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"average_play_time_per_play": {
"description": "视频数据-平均单次播放时长,单位:秒",
"type": "number"
},
"avg_click_cost": {
"description": "点击成本",
"type": "number"
},
"avg_show_cost": {
"description": "计算字段",
"type": "number"
},
"campaign_id": {
"description": "广告组ID",
"type": "string"
},
"campaign_name": {
"description": "广告主组名称",
"type": "string"
},
"click": {
"description": "点击量",
"type": "integer"
},
"click_install": {
"description": "点击安装数",
"type": "integer"
},
"convert": {
"description": "转化数",
"type": "integer"
},
"convert_cost": {
"description": "转化成本",
"type": "number"
},
"convert_rate": {
"description": "转化率",
"type": "number"
},
"cost": {
"description": "花费",
"type": "number"
},
"creative_id": {
"description": "创意id",
"type": "string"
},
"ctr": {
"description": "点击率",
"type": "number"
},
"deep_convert": {
"description": "深度转化数",
"type": "integer"
},
"deep_convert_cost": {
"description": "深度转化成本",
"type": "number"
},
"deep_convert_rate": {
"description": "深度转化率",
"type": "number"
},
"download_finish": {
"description": "安卓下载完成数",
"type": "integer"
},
"download_finish_cost": {
"description": "安卓下载完成成本",
"type": "number"
},
"download_finish_rate": {
"description": "安卓下载完成率",
"type": "number"
},
"download_start": {
"description": "安卓下载开始数",
"type": "integer"
},
"download_start_cost": {
"description": "安卓下载开始成本",
"type": "number"
},
"download_start_rate": {
"description": "安卓下载开始率",
"type": "number"
},
"game_addiction": {
"description": "关键行为数",
"type": "integer"
},
"game_addiction_cost": {
"description": "关键行为成本",
"type": "number"
},
"game_addiction_rate": {
"description": "关键行为率",
"type": "number"
},
"game_pay_count": {
"description": "付费次数",
"type": "integer"
},
"in_app_cart": {
"description": "APP内加入购物车",
"type": "integer"
},
"in_app_detail_uv": {
"description": "APP内访问详情页",
"type": "integer"
},
"in_app_order": {
"description": "APP内下单",
"type": "integer"
},
"in_app_pay": {
"description": "APP内付费",
"type": "integer"
},
"in_app_uv": {
"description": "APP内访问",
"type": "integer"
},
"install_finish": {
"description": "安卓安装完成数",
"type": "integer"
},
"install_finish_cost": {
"description": "安卓安装完成成本",
"type": "number"
},
"install_finish_rate": {
"description": "安卓安装完成率",
"type": "number"
},
"next_day_open": {
"description": "次留数",
"type": "integer"
},
"next_day_open_cost": {
"description": "次留成本",
"type": "number"
},
"next_day_open_rate": {
"description": "次留率",
"type": "number"
},
"pay_count": {
"description": "首次付费次数",
"type": "integer"
},
"play_100_feed_break": {
"description": "视频数据-99%进度播放数",
"type": "integer"
},
"play_25_feed_break": {
"description": "视频数据-25%进度播放数",
"type": "integer"
},
"play_50_feed_break": {
"description": "视频数据-50%进度播放数",
"type": "integer"
},
"play_75_feed_break": {
"description": "视频数据-75%进度播放数",
"type": "integer"
},
"play_duration_sum": {
"description": "视频数据-播放时长,单位ms",
"type": "integer"
},
"play_over_rate": {
"description": "播完率",
"type": "number"
},
"register": {
"description": "注册数",
"type": "integer"
},
"show": {
"description": "展示量",
"type": "integer"
},
"stat_datetime": {
"description": "数据起始时间(yyyy-MM-dd HH:mm:ss)",
"type": "integer"
},
"timestamp": {
"description": "创建时间(yyyy-MM-dd HH:mm:ss)",
"type": "string"
},
"total_play": {
"description": "视频数据-播放数",
"type": "integer"
},
"valid_play": {
"description": "视频数据-有效播放数",
"type": "integer"
},
"valid_play_cost": {
"description": "有效播放成本",
"type": "number"
},
"valid_play_rate": {
"description": "有效播放率",
"type": "number"
}
}
},
"biz.ListAdResponse": {
"type": "object",
"properties": {
"list": {
"description": "数据信息",
"type": "array",
"items": {
"$ref": "#/definitions/biz.Ad"
}
},
"page_info": {
"description": "页码信息",
"allOf": [
{
"$ref": "#/definitions/common.PageInfo"
}
]
}
}
},
"biz.ListCampaignResponse": {
"type": "object",
"properties": {
"list": {
"description": "数据信息",
"type": "array",
"items": {
"$ref": "#/definitions/biz.Campaign"
}
},
"page_info": {
"description": "页码信息",
"allOf": [
{
"$ref": "#/definitions/common.PageInfo"
}
]
}
}
},
"biz.ListCreativeResponse": {
"type": "object",
"properties": {
"list": {
"description": "数据信息",
"type": "array",
"items": {
"$ref": "#/definitions/biz.Creative"
}
},
"page_info": {
"description": "页码信息",
"allOf": [
{
"$ref": "#/definitions/common.PageInfo"
}
]
}
}
},
"biz.ListReportRequest": {
"type": "object",
"properties": {
"end_date": {
"description": "结束时间(格式YYYY-MM-DD)",
"type": "string"
},
"order_by": {
"description": "排序字段",
"type": "string"
},
"order_by_mode": {
"description": "排序方式 desc asc",
"type": "string"
},
"page": {
"description": "页码",
"type": "integer"
},
"page_size": {
"description": "每页大小",
"type": "integer"
},
"start_date": {
"description": "开始时间(格式YYYY-MM-DD)",
"type": "string"
},
"time_granularity": {
"description": "时间粒度(允许值:STAT_TIME_GRANULARITY_DAILY (按天维度),STAT_TIME_GRANULARITY_HOURLY (按小时维度))",
"allOf": [
{
"$ref": "#/definitions/biz.TimeGranularity"
}
]
}
}
},
"biz.Response": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"data": {},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
}
}
},
"biz.TimeGranularity": {
"type": "string",
"enum": [
"STAT_TIME_GRANULARITY_DAILY",
"STAT_TIME_GRANULARITY_HOURLY"
],
"x-enum-comments": {
"StatTimeGranularityDaily": "按天维度",
"StatTimeGranularityHourly": "按小时维度"
},
"x-enum-varnames": [
"StatTimeGranularityDaily",
"StatTimeGranularityHourly"
]
},
"common.PageInfo": {
"type": "object",
"properties": {
"page": {
"description": "当前页码",
"type": "integer"
},
"page_size": {
"description": "每页大小",
"type": "integer"
},
"total_number": {
"description": "数据总数",
"type": "integer"
},
"total_page": {
"description": "总页码数",
"type": "integer"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "token",
"in": "header"
}
}
}
\ No newline at end of file
basePath: /api/v1
definitions:
biz.Ad:
properties:
active:
description: 激活数
type: integer
active_cost:
description: 激活成本
type: number
active_pay_cost:
description: 首次付费成本
type: number
active_pay_rate:
description: 首次付费率
type: number
active_rate:
description: 激活率
type: number
active_register_cost:
description: 注册成本
type: number
active_register_rate:
description: 注册率
type: number
ad_id:
description: 广告计划id
type: string
ad_name:
description: 广告计划名称
type: string
advertiser_id:
description: 广告主id
type: string
attribution_active_pay_intra_one_day_amount:
description: 游戏行业-激活后24h付费金额
type: number
attribution_active_pay_intra_one_day_count:
description: 游戏行业-激活后24h首次付费数
type: integer
attribution_convert:
description: 转化数(计费时间)
type: integer
attribution_convert_cost:
description: 转化成本(计费时间)
type: number
attribution_deep_convert:
description: 深度转化数(计费时间)
type: integer
attribution_deep_convert_cost:
description: 深度转化成本(计费时间)
type: number
attribution_game_pay_7d_count:
description: 7日付费次数(激活时间)
type: integer
attribution_next_day_open_cnt:
description: 次留回传数
type: integer
attribution_next_day_open_cost:
description: 次留成本
type: number
attribution_next_day_open_rate:
description: 次留率
type: number
average_play_time_per_play:
description: 视频数据-平均单次播放时长,单位:秒
type: number
avg_click_cost:
description: 点击成本
type: number
avg_show_cost:
description: 计算字段
type: number
campaign_id:
description: 广告组ID
type: string
campaign_name:
description: 广告主组名称
type: string
click:
description: 点击量
type: integer
click_install:
description: 点击安装数
type: integer
convert:
description: 转化数
type: integer
convert_cost:
description: 转化成本
type: number
convert_rate:
description: 转化率
type: number
cost:
description: 花费
type: number
ctr:
description: 点击率
type: number
deep_convert:
description: 深度转化数
type: integer
deep_convert_cost:
description: 深度转化成本
type: number
deep_convert_rate:
description: 深度转化率
type: number
download_finish:
description: 安卓下载完成数
type: integer
download_finish_cost:
description: 安卓下载完成成本
type: number
download_finish_rate:
description: 安卓下载完成率
type: number
download_start:
description: 安卓下载开始数
type: integer
download_start_cost:
description: 安卓下载开始成本
type: number
download_start_rate:
description: 安卓下载开始率
type: number
game_addiction:
description: 关键行为数
type: integer
game_addiction_cost:
description: 关键行为成本
type: number
game_addiction_rate:
description: 关键行为率
type: number
game_pay_count:
description: 付费次数
type: integer
in_app_cart:
description: APP内加入购物车
type: integer
in_app_detail_uv:
description: APP内访问详情页
type: integer
in_app_order:
description: APP内下单
type: integer
in_app_pay:
description: APP内付费
type: integer
in_app_uv:
description: APP内访问
type: integer
install_finish:
description: 安卓安装完成数
type: integer
install_finish_cost:
description: 安卓安装完成成本
type: number
install_finish_rate:
description: 安卓安装完成率
type: number
next_day_open:
description: 次留数
type: integer
next_day_open_cost:
description: 次留成本
type: number
next_day_open_rate:
description: 次留率
type: number
pay_count:
description: 首次付费次数
type: integer
play_25_feed_break:
description: 视频数据-25%进度播放数
type: integer
play_50_feed_break:
description: 视频数据-50%进度播放数
type: integer
play_75_feed_break:
description: 视频数据-75%进度播放数
type: integer
play_100_feed_break:
description: 视频数据-99%进度播放数
type: integer
play_duration_sum:
description: 视频数据-播放时长,单位ms
type: integer
play_over_rate:
description: 播完率
type: number
register:
description: 注册数
type: integer
show:
description: 展示量
type: integer
stat_datetime:
description: 数据起始时间(yyyy-MM-dd HH:mm:ss)
type: integer
timestamp:
description: 创建时间(yyyy-MM-dd HH:mm:ss)
type: string
total_play:
description: 视频数据-播放数
type: integer
valid_play:
description: 视频数据-有效播放数
type: integer
valid_play_cost:
description: 有效播放成本
type: number
valid_play_rate:
description: 有效播放率
type: number
type: object
biz.Campaign:
properties:
active:
description: 激活数
type: integer
active_cost:
description: 激活成本
type: number
active_pay_cost:
description: 首次付费成本
type: number
active_pay_rate:
description: 首次付费率
type: number
active_rate:
description: 激活率
type: number
active_register_cost:
description: 注册成本
type: number
active_register_rate:
description: 注册率
type: number
advertiser_id:
description: 广告主id
type: string
attribution_active_pay_intra_one_day_amount:
description: 游戏行业-激活后24h付费金额
type: number
attribution_active_pay_intra_one_day_count:
description: 游戏行业-激活后24h首次付费数
type: integer
attribution_convert:
description: 转化数(计费时间)
type: integer
attribution_convert_cost:
description: 转化成本(计费时间)
type: number
attribution_deep_convert:
description: 深度转化数(计费时间)
type: integer
attribution_deep_convert_cost:
description: 深度转化成本(计费时间)
type: number
attribution_game_pay_7d_count:
description: 7日付费次数(激活时间)
type: integer
attribution_next_day_open_cnt:
description: 次留回传数
type: integer
attribution_next_day_open_cost:
description: 次留成本
type: number
attribution_next_day_open_rate:
description: 次留率
type: number
average_play_time_per_play:
description: 视频数据-平均单次播放时长,单位:秒
type: number
avg_click_cost:
description: 点击成本
type: number
avg_show_cost:
description: 计算字段
type: number
campaign_id:
description: 广告组ID
type: string
campaign_name:
description: 广告主组名称
type: string
click:
description: 点击量
type: integer
click_install:
description: 点击安装数
type: integer
convert:
description: 转化数
type: integer
convert_cost:
description: 转化成本
type: number
convert_rate:
description: 转化率
type: number
cost:
description: 花费
type: number
ctr:
description: 点击率
type: number
deep_convert:
description: 深度转化数
type: integer
deep_convert_cost:
description: 深度转化成本
type: number
deep_convert_rate:
description: 深度转化率
type: number
download_finish:
description: 安卓下载完成数
type: integer
download_finish_cost:
description: 安卓下载完成成本
type: number
download_finish_rate:
description: 安卓下载完成率
type: number
download_start:
description: 安卓下载开始数
type: integer
download_start_cost:
description: 安卓下载开始成本
type: number
download_start_rate:
description: 安卓下载开始率
type: number
game_addiction:
description: 关键行为数
type: integer
game_addiction_cost:
description: 关键行为成本
type: number
game_addiction_rate:
description: 关键行为率
type: number
game_pay_count:
description: 付费次数
type: integer
in_app_cart:
description: APP内加入购物车
type: integer
in_app_detail_uv:
description: APP内访问详情页
type: integer
in_app_order:
description: APP内下单
type: integer
in_app_pay:
description: APP内付费
type: integer
in_app_uv:
description: APP内访问
type: integer
install_finish:
description: 安卓安装完成数
type: integer
install_finish_cost:
description: 安卓安装完成成本
type: number
install_finish_rate:
description: 安卓安装完成率
type: number
next_day_open:
description: 次留数
type: integer
next_day_open_cost:
description: 次留成本
type: number
next_day_open_rate:
description: 次留率
type: number
pay_count:
description: 首次付费次数
type: integer
play_25_feed_break:
description: 视频数据-25%进度播放数
type: integer
play_50_feed_break:
description: 视频数据-50%进度播放数
type: integer
play_75_feed_break:
description: 视频数据-75%进度播放数
type: integer
play_100_feed_break:
description: 视频数据-99%进度播放数
type: integer
play_duration_sum:
description: 视频数据-播放时长,单位ms
type: integer
play_over_rate:
description: 播完率
type: number
register:
description: 注册数
type: integer
show:
description: 展示量
type: integer
stat_datetime:
description: 数据起始时间(yyyy-MM-dd HH:mm:ss)
type: integer
timestamp:
description: 创建时间(yyyy-MM-dd HH:mm:ss)
type: string
total_play:
description: 视频数据-播放数
type: integer
valid_play:
description: 视频数据-有效播放数
type: integer
valid_play_cost:
description: 有效播放成本
type: number
valid_play_rate:
description: 有效播放率
type: number
type: object
biz.Creative:
properties:
active:
description: 激活数
type: integer
active_cost:
description: 激活成本
type: number
active_pay_cost:
description: 首次付费成本
type: number
active_pay_rate:
description: 首次付费率
type: number
active_rate:
description: 激活率
type: number
active_register_cost:
description: 注册成本
type: number
active_register_rate:
description: 注册率
type: number
ad_id:
description: 广告计划id
type: string
ad_name:
description: 广告计划名称
type: string
advertiser_id:
description: 广告主id
type: string
attribution_active_pay_intra_one_day_amount:
description: 游戏行业-激活后24h付费金额
type: number
attribution_active_pay_intra_one_day_count:
description: 游戏行业-激活后24h首次付费数
type: integer
attribution_convert:
description: 转化数(计费时间)
type: integer
attribution_convert_cost:
description: 转化成本(计费时间)
type: number
attribution_deep_convert:
description: 深度转化数(计费时间)
type: integer
attribution_deep_convert_cost:
description: 深度转化成本(计费时间)
type: number
attribution_game_pay_7d_count:
description: 7日付费次数(激活时间)
type: integer
attribution_next_day_open_cnt:
description: 次留回传数
type: integer
attribution_next_day_open_cost:
description: 次留成本
type: number
attribution_next_day_open_rate:
description: 次留率
type: number
average_play_time_per_play:
description: 视频数据-平均单次播放时长,单位:秒
type: number
avg_click_cost:
description: 点击成本
type: number
avg_show_cost:
description: 计算字段
type: number
campaign_id:
description: 广告组ID
type: string
campaign_name:
description: 广告主组名称
type: string
click:
description: 点击量
type: integer
click_install:
description: 点击安装数
type: integer
convert:
description: 转化数
type: integer
convert_cost:
description: 转化成本
type: number
convert_rate:
description: 转化率
type: number
cost:
description: 花费
type: number
creative_id:
description: 创意id
type: string
ctr:
description: 点击率
type: number
deep_convert:
description: 深度转化数
type: integer
deep_convert_cost:
description: 深度转化成本
type: number
deep_convert_rate:
description: 深度转化率
type: number
download_finish:
description: 安卓下载完成数
type: integer
download_finish_cost:
description: 安卓下载完成成本
type: number
download_finish_rate:
description: 安卓下载完成率
type: number
download_start:
description: 安卓下载开始数
type: integer
download_start_cost:
description: 安卓下载开始成本
type: number
download_start_rate:
description: 安卓下载开始率
type: number
game_addiction:
description: 关键行为数
type: integer
game_addiction_cost:
description: 关键行为成本
type: number
game_addiction_rate:
description: 关键行为率
type: number
game_pay_count:
description: 付费次数
type: integer
in_app_cart:
description: APP内加入购物车
type: integer
in_app_detail_uv:
description: APP内访问详情页
type: integer
in_app_order:
description: APP内下单
type: integer
in_app_pay:
description: APP内付费
type: integer
in_app_uv:
description: APP内访问
type: integer
install_finish:
description: 安卓安装完成数
type: integer
install_finish_cost:
description: 安卓安装完成成本
type: number
install_finish_rate:
description: 安卓安装完成率
type: number
next_day_open:
description: 次留数
type: integer
next_day_open_cost:
description: 次留成本
type: number
next_day_open_rate:
description: 次留率
type: number
pay_count:
description: 首次付费次数
type: integer
play_25_feed_break:
description: 视频数据-25%进度播放数
type: integer
play_50_feed_break:
description: 视频数据-50%进度播放数
type: integer
play_75_feed_break:
description: 视频数据-75%进度播放数
type: integer
play_100_feed_break:
description: 视频数据-99%进度播放数
type: integer
play_duration_sum:
description: 视频数据-播放时长,单位ms
type: integer
play_over_rate:
description: 播完率
type: number
register:
description: 注册数
type: integer
show:
description: 展示量
type: integer
stat_datetime:
description: 数据起始时间(yyyy-MM-dd HH:mm:ss)
type: integer
timestamp:
description: 创建时间(yyyy-MM-dd HH:mm:ss)
type: string
total_play:
description: 视频数据-播放数
type: integer
valid_play:
description: 视频数据-有效播放数
type: integer
valid_play_cost:
description: 有效播放成本
type: number
valid_play_rate:
description: 有效播放率
type: number
type: object
biz.ListAdResponse:
properties:
list:
description: 数据信息
items:
$ref: '#/definitions/biz.Ad'
type: array
page_info:
allOf:
- $ref: '#/definitions/common.PageInfo'
description: 页码信息
type: object
biz.ListCampaignResponse:
properties:
list:
description: 数据信息
items:
$ref: '#/definitions/biz.Campaign'
type: array
page_info:
allOf:
- $ref: '#/definitions/common.PageInfo'
description: 页码信息
type: object
biz.ListCreativeResponse:
properties:
list:
description: 数据信息
items:
$ref: '#/definitions/biz.Creative'
type: array
page_info:
allOf:
- $ref: '#/definitions/common.PageInfo'
description: 页码信息
type: object
biz.ListReportRequest:
properties:
end_date:
description: 结束时间(格式YYYY-MM-DD)
type: string
order_by:
description: 排序字段
type: string
order_by_mode:
description: 排序方式 desc asc
type: string
page:
description: 页码
type: integer
page_size:
description: 每页大小
type: integer
start_date:
description: 开始时间(格式YYYY-MM-DD)
type: string
time_granularity:
allOf:
- $ref: '#/definitions/biz.TimeGranularity'
description: 时间粒度(允许值:STAT_TIME_GRANULARITY_DAILY (按天维度),STAT_TIME_GRANULARITY_HOURLY
(按小时维度))
type: object
biz.Response:
properties:
code:
type: string
data: {}
msg:
type: string
request_id:
type: string
type: object
biz.TimeGranularity:
enum:
- STAT_TIME_GRANULARITY_DAILY
- STAT_TIME_GRANULARITY_HOURLY
type: string
x-enum-comments:
StatTimeGranularityDaily: 按天维度
StatTimeGranularityHourly: 按小时维度
x-enum-varnames:
- StatTimeGranularityDaily
- StatTimeGranularityHourly
common.PageInfo:
properties:
page:
description: 当前页码
type: integer
page_size:
description: 每页大小
type: integer
total_number:
description: 数据总数
type: integer
total_page:
description: 总页码数
type: integer
type: object
host: 127.0.0.1:8000
info:
contact: {}
description: swagger api for [ads](https://test.adsdesk.cn/)
title: Ads Api Docs
version: "1.0"
paths:
/report/ad:
post:
consumes:
- application/json
description: 查询广告计划数据报表
parameters:
- description: 请求参数
in: body
name: req
required: true
schema:
$ref: '#/definitions/biz.ListReportRequest'
produces:
- application/json
responses:
"200":
description: success
schema:
allOf:
- $ref: '#/definitions/biz.Response'
- properties:
data:
$ref: '#/definitions/biz.ListAdResponse'
type: object
summary: 查询广告计划数据报表
tags:
- report
/report/campaign:
post:
consumes:
- application/json
description: 查询广告组数据报表
parameters:
- description: 请求参数
in: body
name: req
required: true
schema:
$ref: '#/definitions/biz.ListReportRequest'
produces:
- application/json
responses:
"200":
description: success
schema:
allOf:
- $ref: '#/definitions/biz.Response'
- properties:
data:
$ref: '#/definitions/biz.ListCampaignResponse'
type: object
summary: 查询广告组数据报表
tags:
- report
/report/creative:
post:
consumes:
- application/json
description: 查询广告创意数据报表
parameters:
- description: 请求参数
in: body
name: req
required: true
schema:
$ref: '#/definitions/biz.ListReportRequest'
produces:
- application/json
responses:
"200":
description: success
schema:
allOf:
- $ref: '#/definitions/biz.Response'
- properties:
data:
$ref: '#/definitions/biz.ListCreativeResponse'
type: object
summary: 查询广告创意数据报表
tags:
- report
securityDefinitions:
ApiKeyAuth:
in: header
name: token
type: apiKey
swagger: "2.0"
......@@ -19,11 +19,21 @@ require (
github.com/gin-gonic/gin v1.8.2
github.com/google/uuid v1.3.0
github.com/shopspring/decimal v1.3.1
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a
github.com/swaggo/gin-swagger v1.5.3
github.com/swaggo/swag v1.8.1
)
require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.4 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-playground/form/v4 v4.2.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
......@@ -36,8 +46,10 @@ require (
github.com/imdario/mergo v0.3.12 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
......
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
......@@ -12,6 +20,7 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
......@@ -25,6 +34,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4=
github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk=
github.com/gin-contrib/pprof v1.4.0 h1:XxiBSf5jWZ5i16lNOPbMTVdgHBdhfGRD5PZ1LWazzvg=
github.com/gin-contrib/pprof v1.4.0/go.mod h1:RrehPJasUVBPK6yTUwOl8/NP6i0vbUgmxtis+Z5KE90=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
......@@ -39,6 +50,16 @@ github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic=
......@@ -89,6 +110,7 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
......@@ -99,8 +121,11 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
......@@ -111,6 +136,10 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
......@@ -118,6 +147,13 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OH
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
......@@ -131,11 +167,15 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shirou/gopsutil/v3 v3.21.8/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ=
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
......@@ -147,12 +187,20 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a h1:kAe4YSu0O0UFn1DowNo2MY5p6xzqtJ/wQ7LZynSvGaY=
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
github.com/swaggo/gin-swagger v1.5.3 h1:8mWmHLolIbrhJJTflsaFoZzRBYVmEE7JZGIq08EiC0Q=
github.com/swaggo/gin-swagger v1.5.3/go.mod h1:3XJKSfHjDMB5dBo/0rrTXidPmgLeqsX89Yp4uA50HpI=
github.com/swaggo/swag v1.8.1 h1:JuARzFX1Z1njbCGz+ZytBR15TFJwF2Q7fu8puJHhQYI=
github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
......@@ -161,6 +209,7 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk=
go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
......@@ -170,6 +219,7 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
......@@ -183,7 +233,10 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
......@@ -193,6 +246,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
......@@ -205,13 +259,16 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
......@@ -233,12 +290,15 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
......@@ -277,6 +337,7 @@ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
......@@ -286,6 +347,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
......
......@@ -4,3 +4,10 @@ import "github.com/google/wire"
// ProviderSet is biz providers.
var ProviderSet = wire.NewSet(NewReportUsecase)
type Response struct {
RequestId string `json:"request_id"`
Code string `json:"code"`
Msg string `json:"msg"`
Data interface{} `json:"data"`
}
......@@ -6,6 +6,10 @@ import (
"github.com/gin-contrib/pprof"
"github.com/gin-gonic/gin"
"github.com/swaggo/files"
"github.com/swaggo/gin-swagger"
_ "demo/docs"
"demo/internal/router/mid"
"demo/internal/service"
)
......@@ -17,17 +21,29 @@ type Web struct {
Report *service.ReportService
}
// RouterInit
// @title Ads Api Docs
// @version 1.0
// @description swagger api for [ads](https://test.adsdesk.cn/)
// @host 127.0.0.1:8000
// @BasePath /api/v1
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name token
func (p *Web) RouterInit(engine *gin.Engine) {
engine.Use(p.Common.SetRequestId, p.Common.PassMethods)
engine.NoRoute(func(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{"code": "404", "message": "PageNo not found"})
})
if gin.Mode() != gin.ReleaseMode {
engine.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
}
// add pprof to look at the heap,a 30-second CPU and so on profile
// eg: go tool pprof http://localhost:8000/api/pprof/profile
pprof.Register(engine, "/api/pprof")
// add api
engine.GET("/hello/:name", p.Greeter.SayHello)
api := engine.Group("/api", p.Jwt.CheckToken)
api := engine.Group("/api/v1", p.Jwt.CheckToken)
{
report := api.Group("/report")
{
......
......@@ -22,6 +22,14 @@ func NewReportService(uc *biz.ReportUsecase, logger log.Logger) *ReportService {
}
// ListCampaignData 查询广告组数据报表
// @tags report
// @Summary 查询广告组数据报表
// @Description 查询广告组数据报表
// @Accept json
// @Produce json
// @Param req body biz.ListReportRequest true "请求参数"
// @Success 200 {object} biz.Response{data=biz.ListCampaignResponse} "success"
// @Router /report/campaign [POST]
func (p *ReportService) ListCampaignData(ctx *gin.Context) {
var req biz.ListReportRequest
if err := ctx.ShouldBind(&req); err != nil {
......@@ -52,6 +60,14 @@ func (p *ReportService) ListCampaignData(ctx *gin.Context) {
}
// ListAdData 查询广告计划数据报表
// @tags report
// @Summary 查询广告计划数据报表
// @Description 查询广告计划数据报表
// @Accept json
// @Produce json
// @Param req body biz.ListReportRequest true "请求参数"
// @Success 200 {object} biz.Response{data=biz.ListAdResponse} "success"
// @Router /report/ad [POST]
func (p *ReportService) ListAdData(ctx *gin.Context) {
var req biz.ListReportRequest
if err := ctx.ShouldBind(&req); err != nil {
......@@ -82,6 +98,14 @@ func (p *ReportService) ListAdData(ctx *gin.Context) {
}
// ListCreativeData 查询广告创意数据报表
// @tags report
// @Summary 查询广告创意数据报表
// @Description 查询广告创意数据报表
// @Accept json
// @Produce json
// @Param req body biz.ListReportRequest true "请求参数"
// @Success 200 {object} biz.Response{data=biz.ListCreativeResponse} "success"
// @Router /report/creative [POST]
func (p *ReportService) ListCreativeData(ctx *gin.Context) {
var req biz.ListReportRequest
if err := ctx.ShouldBind(&req); err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment