Demo entry 6787092

thrift接口以及协议

   

Submitted by anonymous on Apr 09, 2019 at 06:09
Language: Thrift. Code size: 3.3 kB.

struct banUserIDReq
{
    1:AuthorizeMsg authmsg, //鉴权信息,必选
    2:i64 topsid, //顶级频道号
    3:list<i64> uids, //被封uid列表
    4:bool ban, //ban:true-封禁,false-解封
    5:string reason, //被封原因
}
struct banUserIDRes
{
    1:i32 rescode, //调用结果码,默认为0,必选
    2:map<string,string> keyvalue, //扩展,必选
    3:list<i64> successUids, //封禁或解封成功的uid列表
    4:list<i64> failUids, //封禁或解封失败的uid
}
struct banUserPCReq
{
    1:AuthorizeMsg authmsg, //鉴权信息,必选
    2:i64 topsid, //顶级频道号
    3:list<string> pcinfos, //被封pcinfo列表
    4:bool ban, //ban:true-封禁,false-解封
    5:string reason, //被封原因
}
struct banUserPCRes
{
    1:i32 rescode, //调用结果码,默认为0,必选
    2:map<string,string> keyvalue, //扩展,必选
    3:list<string> successPcinfos, //封禁或解封成功的pcinfo列表
    4:list<string> failPcinfos, //封禁或解封失败的pcinfo
}
struct delChannelBanUserListReq
{
    1:AuthorizeMsg authmsg, //鉴权信息,必选
    2:i64 topsid, //级频道号
    3:i32 banType, //banType:1-BanPc,2-BanId
}

    banUserIDRes chanif_banUserID(1:banUserIDReq req)//封禁用户ID
    banUserPCRes chanif_banUserPC(1:banUserPCReq req)//封禁用户PC
    CommonRes chanif_delChannelBanUserList(1:delChannelBanUserListReq req)//删除频道封禁用户ID/PC列表


------------------------------------
struct setSubChannelOrderReq{
    1:AuthorizeMsg authmsg, //鉴权信息,必选
    2:i64 topsid, //顶级频道
    3:map<i64,map<i64,i64>> subsidOreder, //最内层的map中,key为子频道id,value为该子频道的排序顺序值,它外层map的key为父频道id
}

    CommonRes chanif_setSubChannelOrder(1:setSubChannelOrderReq req) //设置子频道顺序
--------------------------------------
struct PSS_SetSubChannelOrder : public Marshallable
{
  enum { uri = (20003 << 8 | SESSION_SVID) };
  uint64_t topsid;
  uint64_t admin;
  std::map<uint64_t,map<uint64_t,uint64_t>> subsidOreder; //<pid,<sid,order>>
};

struct PSS_BanUserID : public Marshallable
{
  enum { uri = (20005 << 8 | SESSION_SVID) };
  uint64_t topsid;
  uint64_t admin;
  bool     isban;
  std::string reason;
  std::vector<uint64_t> uids;

  virtual void marshal(Pack &p) const
  {
    p << topsid << admin << isban << reason;
    marshal_container(p, uids);
  }
  virtual void unmarshal(const Unpack &p)
  {
    p >> topsid >> admin >> isban >> reason;
    unmarshal_container(p, std::inserter(uids, uids.end()));
  }
};

struct PSS_BanUserPC : public Marshallable
{
  enum { uri = (20007 << 8 | SESSION_SVID) };
  uint64_t topsid;
  uint64_t admin;
  bool     isban;
  std::string reason;
  std::vector<std::string> pcinfos;

  virtual void marshal(Pack &p) const
  {
    p << topsid << admin << isban << reason;
    marshal_container(p, pcinfos);
  }
  virtual void unmarshal(const Unpack &p)
  {
    p >> topsid >> admin >> isban >> reason;
    unmarshal_container(p, std::inserter(pcinfos, pcinfos.end()));
  }
};

struct PSS_DelChannelBanUserList : public Marshallable
{
  enum { uri = (20009 << 8 | SESSION_SVID) };
  uint64_t topsid;
  uint64_t admin;
  std::string reason;
  uint32_t banType;

  virtual void marshal(Pack &p) const
  {
    p << topsid << admin << reason;
    marshal_container(p, pcinfos);
  }
  virtual void unmarshal(const Unpack &p)
  {
    p >> topsid >> admin >> reason;
    unmarshal_container(p, std::inserter(pcinfos, pcinfos.end()));
  }
};

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).