Documentation
¶
Overview ¶
Package pmc 消息服务 API
Index ¶
- func AccureQuery(clt *core.SDKClient) (int64, error)
- func Read(ctx context.Context, clt *core.SDKClient) <-chan Command
- func UserCancel(clt *core.SDKClient, ownerID string) (bool, error)
- func UserPermit(clt *core.SDKClient, topics []string, accessToken string) (bool, error)
- type AccrueQueryRequest
- type AccrueQueryResponse
- type Command
- type CommandType
- type Event
- type EventType
- type Message
- type TradeModifiedEvent
- type User
- type UserCancelRequest
- type UserCancelResponse
- type UserGetRequest
- type UserGetResponse
- type UserPermitRequest
- type UserPermitResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserCancel ¶
UserCancel 取消用户的消息服务
Types ¶
type AccrueQueryRequest ¶
type AccrueQueryRequest struct{}
AccrueQueryRequest 消息队列积压数量查询 API Request
func (AccrueQueryRequest) GetType ¶
func (r AccrueQueryRequest) GetType() string
GetType implement Request interface
type AccrueQueryResponse ¶
type AccrueQueryResponse struct {
model.CommonResponse
Response struct {
// Number 消息积压数量
Number int64 `json:"number,omitempty"`
} `json:"pmc_user_get_response"`
}
AccrueQueryResponse 消息队列积压数量查询 API Response
type Command ¶
type Command struct {
ID uint64 `json:"id,omitempty"`
CommandType CommandType `json:"commandType,omitempty"`
Time int64 `json:"time,omitempty"`
SendTime int64 `json:"sendTime,omitempty"`
Message Message `json:"message,omitempty"`
}
Command pmc record
type CommandType ¶
type CommandType string
const ( CommandType_COMMON CommandType = "Common" CommandType_FAIL CommandType = "Fail" )
type EventType ¶
type EventType string
const (
EventType_TradeModifiedEvent EventType = "pdd_ddjb_TradeModified"
)
type TradeModifiedEvent ¶
type TradeModifiedEvent struct {
// Tid 订单号
Tid string `json:"tid,omitempty"`
// Status 订单状态:0-已支付;1-已成团;2-确认收货;3-审核成功;4-审核失败(不可提现);5-已经结算 ;10-已处罚
Status int `json:"status,omitempty"`
// Pid 推广位ID
Pid string `json:"pid,omitempty"`
// CustomParameters 代理身份自定义参数
CustomParameters string `json:"custom_parameters,omitempty"`
// ModifyTime 最后更新时间
ModifyTime int64 `json:"modify_time,omitempty"`
}
TradeModifiedEvent 多多进宝订单状态变更
func (TradeModifiedEvent) Type ¶
func (m TradeModifiedEvent) Type() EventType
Type implement Event interface
type User ¶
type User struct {
// Created 用户首次开通时间
Created string `json:"created,omitempty"`
// Modified 用户最后开通时间
Modified string `json:"modified,omitempty"`
// IsExpire 用户授权是否有效,0表示授权有效,1表示授权过期
IsExpire int `json:"is_expire,omitempty"`
// OwnerID 用户ID
OwnerID string `json:"owner_id,omitempty"`
// Topics 用户开通的消息类型列表。如果为空表示应用开通的所有类型
Topics []string `json:"topics,omitempty"`
}
User 开通的用户数据
type UserCancelRequest ¶
type UserCancelRequest struct {
// OwnerID 用户唯一id
OwnerID string `json:"owner_id,omitempty"`
}
UserCancelRequest 取消用户的消息服务 API Request
func (UserCancelRequest) GetType ¶
func (r UserCancelRequest) GetType() string
GetType implement Request interface
type UserCancelResponse ¶
type UserCancelResponse struct {
model.CommonResponse
Response struct {
// IsSuccess 是否成功
IsSuccess bool `json:"is_success,omitempty"`
} `json:"tmc_user_cancel_response"`
}
UserCancelResponse 取消用户的消息服务 API Response
type UserGetRequest ¶
type UserGetRequest struct {
// OwnerID 用户唯一id
OwnerID string `json:"owner_id,omitempty"`
}
UserGetRequest 获取用户已开通消息 API Request
func (UserGetRequest) GetType ¶
func (r UserGetRequest) GetType() string
GetType implement Request interface
type UserGetResponse ¶
type UserGetResponse struct {
model.CommonResponse
Response struct {
// User 开通的用户数据
User *User `json:"pmc_user,omitempty"`
} `json:"pmc_user_get_response"`
}
UserGetResponse 获取用户已开通消息 API Response
type UserPermitRequest ¶
type UserPermitRequest struct {
// Topics 消息主题列表,用半角逗号分隔。当用户订阅的topic是应用订阅的子集时才需要设置,不设置表示继承应用所订阅的所有topic,一般情况建议不要设置。
Topics string `json:"topics,omitempty"`
}
UserPermitRequest 为已授权的用户开通消息服务 API Request
func (UserPermitRequest) GetType ¶
func (r UserPermitRequest) GetType() string
GetType implement Request interface
type UserPermitResponse ¶
type UserPermitResponse struct {
model.CommonResponse
Response struct {
// IsSuccess 是否成功
IsSuccess bool `json:"is_success,omitempty"`
} `json:"pmc_user_permit_response"`
}
UserPermitResponse 为已授权的用户开通消息服务 API Response
Click to show internal directories.
Click to hide internal directories.