123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- syntax = "proto3";
- package card;
- option go_package = "ttmylife.com/zeuszhao/types/card;card";
- option java_multiple_files = true;
- option java_package = "card";
- import "third_party/google/api/annotations.proto";
- import "common/user/account.proto";
- import "card/common/card.proto";
- import "common/aliyun/alioss.proto";
- import "common/pagination/pagination.proto";
- service Card {
- rpc CreateAccountUser (CreateAccountUserRequest) returns (CreateAccountUserReply) {
- option (google.api.http) = {
- post: "/v1/account/create"
- body: "*"
- };
- }
-
- rpc LoginAccount (LoginAccountRequest) returns (LoginAccountReply) {
- option (google.api.http) = {
- post: "/v1/account/login"
- body: "*"
- };
- }
-
- rpc WxRegisterLogin(WxRegisterLoginRequest) returns (WxRegisterLoginReply) {
- option (google.api.http) = {
- post: "/v1/account/wx/login"
- body: "*"
- };
- }
-
- rpc CreateCard(CreateCardRequest) returns (CreateCardReply) {
- option (google.api.http) = {
- post: "/v1/card/create"
- body: "*"
- };
- }
-
- rpc GetCardInfo(GetCardInfoRequest) returns (GetCardInfoReply) {
- option (google.api.http) = {
- post: "/v1/card/info"
- body: "*"
- };
- }
-
- rpc GetMyCards(GetMyCardsRequest) returns (GetMyCardsReply) {
- option (google.api.http) = {
- post: "/v1/cards"
- body: "*"
- };
- }
-
- rpc DelCard(DelCardInfoRequest) returns (DelCardReply) {
- option (google.api.http) = {
- post: "/v1/card/del"
- body: "*"
- };
- }
-
- rpc SaveCard(SaveCardInfoRequest) returns (SaveCardReply) {
- option (google.api.http) = {
- post: "/v1/card/save"
- body: "*"
- };
- }
-
- rpc SearchCard(SearchCardRequest) returns (SearchCardReply) {
- option (google.api.http) = {
- post: "/v1/card/search"
- body: "*"
- };
- }
-
- rpc GetTemplates(GetTemplatesRequest) returns (GetTemplatesReply) {
- option (google.api.http) = {
- post: "/v1/card/templates"
- body: "*"
- };
- }
-
- rpc CreateShareToken(CreateShareTokenRequest) returns (CreateShareTokenReply) {
- option (google.api.http) = {
- post: "/v1/card/token/create"
- body: "*"
- };
- }
-
- rpc AddCardByShareToken(AddCardByShareTokenRequest) returns (AddCardByShareTokenReply) {
- option (google.api.http) = {
- post: "/v1/card/user/bind"
- body: "*"
- };
- }
-
- rpc OCRCard(OCRCardRequest) returns (OCRCardReply) {
- option (google.api.http) = {
- post: "/v1/card/ocr"
- body: "*"
- };
- }
-
- rpc OssUpload(OssUploadRequest) returns (OssUploadReplay) {
- option (google.api.http) = {
- post: "/v1/card/ossupload"
- body: "*"
- };
- }
- }
- message OssUploadRequest{}
- message OssUploadReplay {
- aliyun.Oss body = 1;
- }
- message OCRCardRequest {
- string url = 1;
- }
- message OCRCardReply {
- common.CardBaseBody body = 1;
- repeated common.CardSupplementBaseBody supplements = 2;
- }
- message AddCardByShareTokenRequest {
- string token = 1;
- }
- message AddCardByShareTokenReply {
- bool ok = 1;
- }
- message CreateShareTokenRequest {
- uint32 card_id = 1;
- }
- message CreateShareTokenReply {
- string token = 1;
- string expire = 2;
- }
- message GetTemplatesRequest {}
- message GetTemplatesReply {
- repeated common.CardTemplateBody templates = 1;
- }
- message WxRegisterLoginRequest {
- string code = 1;
- }
- message WxRegisterLoginReply {
- string token = 1;
- }
- message GetMyCardsRequest {
- }
- message GetMyCardsReply {
- repeated common.CardBody cards = 1;
- repeated common.CardSupplementBaseBody supplements = 2;
- repeated common.CardTemplateBody templates = 3;
- }
- message SearchCardRequest {
- common.CardFilterBody filter = 1;
- pagination.PaginationBody page = 2;
- }
- message SearchCardReply {
- repeated common.CardBody cards = 1;
- repeated common.CardSupplementBaseBody supplements = 2;
- uint32 total = 3;
- }
- message SaveCardInfoRequest {
- uint32 card_id = 1;
- common.CardBaseBody card = 2;
- repeated common.CardSupplementBaseBody supplements = 3;
- }
- message SaveCardReply {
- bool ok = 1;
- }
- message DelCardInfoRequest {
- uint32 card_id = 1;
- }
- message DelCardReply {
- bool ok = 1;
- }
- message GetCardInfoRequest {
- uint32 card_id = 1;
- }
- message GetCardInfoReply {
- common.CardBaseBody card = 1;
- repeated common.CardSupplementBaseBody supplements = 2;
- common.CardTemplateBaseBody template = 3;
- }
- message CreateCardRequest {
- common.CardBaseBody card = 1;
- repeated common.CardSupplementBaseBody supplements = 2;
- }
- message CreateCardReply {
- uint32 id = 1;
- }
- message LoginAccountRequest {
- user.AccountBaseBody account = 1;
- }
- message LoginAccountReply {
- string token = 1;
- }
- message CreateAccountUserRequest {
- user.AccountBaseBody account = 1;
- }
- message CreateAccountUserReply {
- bool ok = 1;
- }
|