Compare commits
No commits in common. "master" and "v1.2.44" have entirely different histories.
@ -1,69 +0,0 @@
|
|||||||
package game
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
||||||
)
|
|
||||||
|
|
||||||
type GetAnchorUserReq struct {
|
|
||||||
*requests.RpcRequest
|
|
||||||
UserName string `position:"Body" field:"user_name"`
|
|
||||||
AnchorType int64 `position:"Body" field:"type"`
|
|
||||||
Columns string `position:"Body" field:"columns"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetAnchorUserResp struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Data AnchorUser `json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AnchorUser struct {
|
|
||||||
Id int64 `json:"id"`
|
|
||||||
UserName string `json:"user_name"`
|
|
||||||
JoinTime int64 `json:"join_time"`
|
|
||||||
Remark string `json:"remark"`
|
|
||||||
AutoAudit int64 `json:"auto_audit"`
|
|
||||||
VirtualWithdraw int64 `json:"virtual_withdraw"`
|
|
||||||
Status int64 `json:"status"`
|
|
||||||
Level int64 `json:"level"`
|
|
||||||
ZhuanshengLv int64 `json:"zhuansheng_lv"`
|
|
||||||
MoneyId int64 `json:"money_id"`
|
|
||||||
PayEntryStatus int64 `json:"pay_entry_status"`
|
|
||||||
IssueMoneyMax float64 `json:"issue_money_max"`
|
|
||||||
RealMoneyProportion float64 `json:"real_money_proportion"`
|
|
||||||
DayIssueMoneyLimit float64 `json:"day_issue_money_limit"`
|
|
||||||
IssueRegTimeLimit int64 `json:"issue_reg_time_limit"`
|
|
||||||
IssueRoleCreateTimeLimit int64 `json:"issue_role_create_time_limit"`
|
|
||||||
AnchorType int64 `json:"type"`
|
|
||||||
GameIds string `json:"game_ids"`
|
|
||||||
AgentIds string `json:"agent_ids"`
|
|
||||||
DayWithdrawLimit float64 `json:"day_withdraw_limit"`
|
|
||||||
BankCompany string `json:"bank_company"`
|
|
||||||
BankAccount string `json:"bank_account"`
|
|
||||||
BankCardName string `json:"bank_card_name"`
|
|
||||||
PayPassword string `json:"pay_password"`
|
|
||||||
IssueConfigIds string `json:"issue_config_ids"`
|
|
||||||
BigMoneyProportion int64 `json:"big_money_proportion"`
|
|
||||||
BigMoneyRangeMin int64 `json:"big_money_range_min"`
|
|
||||||
BigMoneyRangeMax int64 `json:"big_money_range_max"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateGetAnchorUserReq(UserName string, AnchorType int64, Columns string) *GetAnchorUserReq {
|
|
||||||
req := &GetAnchorUserReq{
|
|
||||||
RpcRequest: &requests.RpcRequest{},
|
|
||||||
}
|
|
||||||
req.UserName = UserName
|
|
||||||
req.AnchorType = AnchorType
|
|
||||||
req.Columns = Columns
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/api/activity/getAnchorUser")
|
|
||||||
req.Method = requests.POST
|
|
||||||
return req
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateGetAnchorUserResp() *GetAnchorUserResp {
|
|
||||||
return &GetAnchorUserResp{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -155,11 +155,3 @@ func (c *Client) GetGameRoleName(req *GetGameRoleNameReq) (response *GetGameRole
|
|||||||
err = c.DoAction(req, response)
|
err = c.DoAction(req, response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAnchorUser
|
|
||||||
// 获取主播信息接口
|
|
||||||
func (c *Client) GetAnchorUser(req *GetAnchorUserReq) (resp *GetAnchorUserResp, err error) {
|
|
||||||
resp = CreateGetAnchorUserResp()
|
|
||||||
err = c.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
@ -255,19 +255,3 @@ func TestGetGameClientInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
_ = resp
|
_ = resp
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetAnchorUser(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
req := CreateGetAnchorUserReq("vd22543241", 2, "*")
|
|
||||||
getAnchorUser, err := client.GetAnchorUser(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
fmt.Println(getAnchorUser)
|
|
||||||
fmt.Println(getAnchorUser.Data.UserName)
|
|
||||||
fmt.Println(getAnchorUser.Data.Id)
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
package mkt2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
VERSION = "2026-02-03"
|
|
||||||
)
|
|
||||||
|
|
||||||
var HOST = requests.Host{
|
|
||||||
Default: "mkt2-api",
|
|
||||||
}
|
|
||||||
|
|
||||||
type Client struct {
|
|
||||||
sdk.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewClient() (client *Client, err error) {
|
|
||||||
client = new(Client)
|
|
||||||
err = client.Init()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) MaterialTaskNotify(request *MaterialTaskNotifyRequest) (response *MaterialTaskNotifyResponse, err error) {
|
|
||||||
response = CreateMaterialTaskNotifyResponse()
|
|
||||||
err = c.DoAction(request, response)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package mkt2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// TestClient_MaterialTaskNotify 测试素材处理任务通知
|
|
||||||
func TestClient_MaterialTaskNotify(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Error("NewClient error:", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
request := CreateMaterialTaskNotifyRequest(MaterialTaskNotifyParam{
|
|
||||||
TaskType: "resource_to_vdb",
|
|
||||||
TaskId: 223,
|
|
||||||
FileInfo: FileInfo{
|
|
||||||
Md5: "2fcf1306458f2321bccbb0e2ee8a712b",
|
|
||||||
Duration: 0,
|
|
||||||
Size: 14745,
|
|
||||||
Width: 480,
|
|
||||||
Height: 392,
|
|
||||||
Bitrate: 0,
|
|
||||||
Format: "jpg",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
response, err := client.MaterialTaskNotify(request)
|
|
||||||
if err != nil {
|
|
||||||
t.Error("MaterialTaskNotify error:", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
t.Log("response:", response)
|
|
||||||
fmt.Println("")
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
package mkt2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
||||||
)
|
|
||||||
|
|
||||||
type MaterialTaskNotifyParam struct {
|
|
||||||
TaskType string `json:"task_type"`
|
|
||||||
TaskId int64 `json:"task_id"`
|
|
||||||
FileInfo FileInfo `json:"file_info"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// MaterialTaskNotifyRequest 媒资任务通知请求
|
|
||||||
type MaterialTaskNotifyRequest struct {
|
|
||||||
*requests.JsonRequest
|
|
||||||
TaskType string `position:"Json" field:"task_type"`
|
|
||||||
TaskId int64 `position:"Json" field:"task_id"`
|
|
||||||
FileInfo FileInfo `position:"Json" field:"file_info"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FileInfo 文件信息
|
|
||||||
type FileInfo struct {
|
|
||||||
Md5 string `json:"md5"`
|
|
||||||
Duration float64 `json:"duration"`
|
|
||||||
Size int64 `json:"size"`
|
|
||||||
Width int64 `json:"width"`
|
|
||||||
Height int64 `json:"height"`
|
|
||||||
Bitrate int64 `json:"bitrate"`
|
|
||||||
Format string `json:"format"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type MaterialTaskNotifyResponse struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
StatusCode int `json:"status_code"`
|
|
||||||
StatusMsg string `json:"status_msg"`
|
|
||||||
TraceId string `json:"trace_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateMaterialTaskNotifyRequest(param MaterialTaskNotifyParam) (req *MaterialTaskNotifyRequest) {
|
|
||||||
req = &MaterialTaskNotifyRequest{
|
|
||||||
JsonRequest: &requests.JsonRequest{},
|
|
||||||
TaskType: param.TaskType,
|
|
||||||
TaskId: param.TaskId,
|
|
||||||
FileInfo: param.FileInfo,
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/api/cooperation/creativesMaterial/materialTaskNotify")
|
|
||||||
req.Method = requests.POST
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateMaterialTaskNotifyResponse() (response *MaterialTaskNotifyResponse) {
|
|
||||||
response = &MaterialTaskNotifyResponse{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package mkt2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
VERSION = "2026-02-03"
|
|
||||||
)
|
|
||||||
|
|
||||||
var HOST = requests.Host{
|
|
||||||
Default: "res-proc",
|
|
||||||
}
|
|
||||||
|
|
||||||
type Client struct {
|
|
||||||
sdk.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewClient() (client *Client, err error) {
|
|
||||||
client = new(Client)
|
|
||||||
err = client.Init()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) AddTask(request *AddTaskRequest) (response *AddTaskResponse, err error) {
|
|
||||||
response = CreateAddTaskResponse()
|
|
||||||
err = c.DoAction(request, response)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
package mkt2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils/random"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// TestAddResourceToVdbTask 添加素材上传向量库逻辑
|
|
||||||
func TestAddResourceToVdbTask(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Error("NewClient error:", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
request := CreateResourceToVdbTaskRequest(ResourceToVdbTaskParam{
|
|
||||||
MaxRetry: 0,
|
|
||||||
TraceId: random.StrRandom(10),
|
|
||||||
Payload: ResourceToVdbPayload{
|
|
||||||
ResourceURL: "https://resouce-mkt.gaore.com/material/video/2021-09/01/2124474664246343/6eb5621f8ff2de8f64d4aefa3db4f551.mp4",
|
|
||||||
MD5: "",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
response, err := client.AddTask(request)
|
|
||||||
if err != nil {
|
|
||||||
t.Error("MaterialTaskNotify error:", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
t.Log("response:", response)
|
|
||||||
fmt.Println("")
|
|
||||||
}
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
package mkt2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AddTaskRequest struct {
|
|
||||||
*requests.JsonRequest
|
|
||||||
TaskType string `position:"Json" field:"task_type"`
|
|
||||||
MaxRetry int64 `position:"Json" field:"max_retry"`
|
|
||||||
TraceId string `position:"Json" field:"trace_id"`
|
|
||||||
Payload any `position:"Json" field:"payload"`
|
|
||||||
Extra any `position:"Json" field:"extra"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AddTaskResponseData struct {
|
|
||||||
TaskId int64 `json:"task_id"`
|
|
||||||
}
|
|
||||||
type AddTaskResponse struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Data AddTaskResponseData `json:"data"`
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Err string `json:"err"`
|
|
||||||
TraceId string `json:"trace_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AddTaskParam struct {
|
|
||||||
TaskType string `position:"Json" field:"task_type"`
|
|
||||||
MaxRetry int64 `position:"Json" field:"max_retry"`
|
|
||||||
TraceId string `position:"Json" field:"trace_id"`
|
|
||||||
Payload any `position:"Json" field:"payload"`
|
|
||||||
Extra any `position:"Json" field:"extra"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateAddTaskRequest(param AddTaskParam) (req *AddTaskRequest) {
|
|
||||||
req = &AddTaskRequest{
|
|
||||||
JsonRequest: &requests.JsonRequest{},
|
|
||||||
TaskType: param.TaskType,
|
|
||||||
MaxRetry: param.MaxRetry,
|
|
||||||
TraceId: param.TraceId,
|
|
||||||
Payload: param.Payload,
|
|
||||||
Extra: param.Extra,
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/api/task/add")
|
|
||||||
req.Method = requests.POST
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateAddTaskResponse() (response *AddTaskResponse) {
|
|
||||||
response = &AddTaskResponse{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceToVdbPayload
|
|
||||||
//素材上传向量库任务playLod
|
|
||||||
|
|
||||||
const TaskTypeResourceToVdb = "resource_to_vdb"
|
|
||||||
|
|
||||||
type ResourceToVdbPayload struct {
|
|
||||||
ResourceURL string `json:"resource_url"` // 资源 URL
|
|
||||||
MD5 string `json:"md5"` // 资源 MD5
|
|
||||||
}
|
|
||||||
|
|
||||||
type ResourceToVdbTaskParam struct {
|
|
||||||
MaxRetry int64
|
|
||||||
TraceId string
|
|
||||||
Payload ResourceToVdbPayload
|
|
||||||
Extra map[string]any
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateResourceToVdbTaskRequest(param ResourceToVdbTaskParam) (req *AddTaskRequest) {
|
|
||||||
return CreateAddTaskRequest(AddTaskParam{
|
|
||||||
TaskType: TaskTypeResourceToVdb,
|
|
||||||
MaxRetry: param.MaxRetry,
|
|
||||||
TraceId: param.TraceId,
|
|
||||||
Payload: param.Payload,
|
|
||||||
Extra: param.Extra,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -198,7 +198,6 @@ type UserRegParam struct {
|
|||||||
FromAd int64 `position:"Body" field:"from_ad" default:"0" json:"from_ad"`
|
FromAd int64 `position:"Body" field:"from_ad" default:"0" json:"from_ad"`
|
||||||
FanCode string `position:"Body" field:"fan_code" default:"" json:"fan_code"`
|
FanCode string `position:"Body" field:"fan_code" default:"" json:"fan_code"`
|
||||||
InvalidUuid int64 `position:"Body" field:"invalid_uuid" default:"0" json:"invalid_uuid"`
|
InvalidUuid int64 `position:"Body" field:"invalid_uuid" default:"0" json:"invalid_uuid"`
|
||||||
GameAwemeId string `position:"Body" field:"game_aweme_id" default:"0" json:"game_aweme_id"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserRegRequest struct {
|
type UserRegRequest struct {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user