api.proto 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. syntax = "proto3";
  2. package main.service.identify.game.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. // DelCacheReq request param for rpc DelCache
  6. message DelCacheReq {
  7. string token = 1;
  8. }
  9. // DelCacheReply del cache reply
  10. message DelCacheReply {
  11. }
  12. //
  13. service IdentifyGame {
  14. // CookieInfo identify info by cookie.
  15. rpc DelCache (DelCacheReq) returns (DelCacheReply);
  16. rpc GetCookieByToken(CreateCookieReq) returns (CreateCookieReply);
  17. }
  18. message CreateCookieReq {
  19. string Token = 1 [(gogoproto.jsontag) = "token",(gogoproto.moretags) = "form:\"access_key\" validate:\"required\""];
  20. string From = 2 [(gogoproto.jsontag) = "from",(gogoproto.moretags) = "form:\"from\""];
  21. }
  22. message CreateCookieReply {
  23. CookieInfo BiliCookies = 1 [(gogoproto.jsontag) = "cookie_info"];
  24. repeated string SSO = 2 [(gogoproto.jsontag) = "sso"];
  25. }
  26. message CookieInfo{
  27. repeated Cookie Cookies = 1 [(gogoproto.jsontag) = "cookies"];
  28. repeated string Domains = 2 [(gogoproto.jsontag) = "domains"];
  29. }
  30. message Cookie{
  31. string Name = 1 [(gogoproto.jsontag) = "name"];
  32. string Value = 2 [(gogoproto.jsontag) = "value"];
  33. int64 HttpOnly = 3 [(gogoproto.jsontag) = "http_only"];
  34. int64 Expires = 4 [(gogoproto.jsontag) = "expires"];
  35. }