From 7593e52be188668856823fa991245ed4ff7366cd Mon Sep 17 00:00:00 2001 From: SparkLee Date: Mon, 29 May 2023 22:35:26 +0800 Subject: [PATCH 1/5] bug fixed: incorrect password still allows login. --- app/shop/interface/internal/data/user.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/shop/interface/internal/data/user.go b/app/shop/interface/internal/data/user.go index 359f391..3c070a6 100644 --- a/app/shop/interface/internal/data/user.go +++ b/app/shop/interface/internal/data/user.go @@ -28,13 +28,16 @@ func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo { } func (rp *userRepo) VerifyPassword(ctx context.Context, u *biz.User, password string) error { - _, err := rp.data.uc.VerifyPassword(ctx, &usV1.VerifyPasswordReq{ + reply, err := rp.data.uc.VerifyPassword(ctx, &usV1.VerifyPasswordReq{ Username: u.Username, Password: password, }) if err != nil { return err } + if reply.Ok == false { + return biz.ErrPasswordInvalid + } return nil } From 96ad23cb2ba0211ec39e72437e51e8df96e86453 Mon Sep 17 00:00:00 2001 From: SparkLee Date: Mon, 29 May 2023 23:33:33 +0800 Subject: [PATCH 2/5] bug fixed: card name didn't save --- api/shop/interface/v1/shop_interface.pb.go | 352 +++++++++--------- api/shop/interface/v1/shop_interface.proto | 1 + .../interface/v1/shop_interface.swagger.json | 9 + .../interface/v1/shop_interface_error.pb.go | 4 +- .../v1/shop_interface_error.swagger.json | 1 + .../interface/v1/shop_interface_grpc.pb.go | 87 +++-- .../interface/v1/shop_interface_http.pb.go | 85 +++-- api/user/service/v1/user.pb.go | 193 +++++----- api/user/service/v1/user.proto | 1 + api/user/service/v1/user.swagger.json | 4 + api/user/service/v1/user_error.pb.go | 4 +- api/user/service/v1/user_error.swagger.json | 1 + api/user/service/v1/user_grpc.pb.go | 72 ++-- app/shop/interface/internal/biz/user.go | 1 + app/shop/interface/internal/data/user.go | 1 + app/shop/interface/internal/service/user.go | 1 + app/user/service/internal/biz/card.go | 1 + app/user/service/internal/data/card.go | 2 + app/user/service/internal/service/card.go | 1 + 19 files changed, 463 insertions(+), 358 deletions(-) diff --git a/api/shop/interface/v1/shop_interface.pb.go b/api/shop/interface/v1/shop_interface.pb.go index 6b4995c..69f7ae9 100644 --- a/api/shop/interface/v1/shop_interface.pb.go +++ b/api/shop/interface/v1/shop_interface.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 +// protoc-gen-go v1.30.0 +// protoc v4.22.5 // source: v1/shop_interface.proto package v1 @@ -1152,6 +1152,7 @@ type CreateCardReq struct { CardNo string `protobuf:"bytes,2,opt,name=card_no,json=cardNo,proto3" json:"card_no,omitempty"` Ccv string `protobuf:"bytes,3,opt,name=ccv,proto3" json:"ccv,omitempty"` Expires string `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` } func (x *CreateCardReq) Reset() { @@ -1214,6 +1215,13 @@ func (x *CreateCardReq) GetExpires() string { return "" } +func (x *CreateCardReq) GetName() string { + if x != nil { + return x.Name + } + return "" +} + type CreateCardReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2491,190 +2499,192 @@ var file_v1_shop_interface_proto_rawDesc = []byte{ 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, - 0x22, 0x66, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x22, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x72, - 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x72, 0x64, - 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x1f, - 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x0f, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, - 0x6f, 0x6b, 0x22, 0x45, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x93, 0x02, 0x0a, 0x0d, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3f, 0x0a, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, - 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x42, - 0x65, 0x65, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0xc0, 0x01, 0x0a, - 0x04, 0x42, 0x65, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x2e, 0x42, 0x65, 0x65, 0x72, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x19, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, - 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc2, 0x01, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x68, 0x6f, 0x70, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x19, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x22, 0x49, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, - 0x65, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, + 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x63, 0x61, 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x45, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x13, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x65, 0x71, 0x22, 0x12, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, - 0x74, 0x65, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x46, - 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x19, - 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xc1, 0x0d, 0x0a, 0x0d, 0x53, 0x68, 0x6f, - 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, - 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x01, - 0x2a, 0x12, 0x59, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x73, 0x68, 0x6f, - 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, - 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x5d, 0x0a, 0x06, - 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0a, 0x2f, 0x76, - 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x68, 0x6f, - 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x93, 0x02, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x3f, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x2e, 0x42, 0x65, 0x65, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x1a, 0xc0, 0x01, 0x0a, 0x04, 0x42, 0x65, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, + 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x42, 0x65, 0x65, 0x72, 0x2e, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x19, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x22, 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, + 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x7a, - 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x23, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x73, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x68, 0x6f, - 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0x64, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x68, - 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x73, 0x68, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x19, 0x0a, 0x05, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x49, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, + 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, + 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, + 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x22, 0x12, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x43, + 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x10, 0x0a, 0x0e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x12, + 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x46, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xc1, 0x0d, 0x0a, + 0x0d, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x65, + 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x73, 0x68, 0x6f, + 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x73, 0x68, 0x6f, + 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x17, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, + 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x16, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, - 0x63, 0x61, 0x72, 0x64, 0x73, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x61, 0x72, 0x64, 0x12, 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, - 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x66, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x12, - 0x1d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1f, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, + 0x12, 0x5d, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x2e, 0x73, 0x68, 0x6f, + 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, + 0x6f, 0x75, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, + 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, + 0x71, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0a, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x12, 0x20, 0x2e, 0x73, 0x68, 0x6f, - 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x1a, 0x23, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, + 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x12, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x73, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x67, 0x0a, - 0x08, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x2f, 0x62, 0x65, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, - 0x72, 0x12, 0x1d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x1a, 0x1f, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x63, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x62, 0x65, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x6a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, - 0x6d, 0x12, 0x22, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, - 0x65, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, + 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x12, + 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, + 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x12, 0x20, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x68, 0x6f, 0x70, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x12, 0x66, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, + 0x61, 0x72, 0x64, 0x12, 0x1d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x6f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x12, 0x20, + 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x1a, 0x22, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, 0x13, 0x2f, 0x76, + 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x67, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x12, 0x1e, 0x2e, + 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, + 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x65, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x62, 0x65, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x42, 0x65, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x65, 0x72, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x62, 0x65, 0x65, 0x72, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, + 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, - 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x10, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x72, 0x74, 0x12, 0x6a, 0x0a, - 0x0b, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x21, 0x2e, 0x73, + 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x73, 0x68, 0x6f, 0x70, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x72, + 0x74, 0x12, 0x6a, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x21, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, + 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, + 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x72, 0x74, 0x12, 0x6c, 0x0a, + 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x1a, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x22, 0x08, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x61, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x6c, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x73, 0x68, - 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, - 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x42, 0x1a, 0x5a, 0x18, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, + 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x68, 0x6f, 0x70, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x42, 0x1a, 0x5a, 0x18, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/shop/interface/v1/shop_interface.proto b/api/shop/interface/v1/shop_interface.proto index 6a835bb..dbc2918 100644 --- a/api/shop/interface/v1/shop_interface.proto +++ b/api/shop/interface/v1/shop_interface.proto @@ -238,6 +238,7 @@ message CreateCardReq { string card_no = 2; string ccv = 3; string expires = 4; + string name = 5; } message CreateCardReply { diff --git a/api/shop/interface/v1/shop_interface.swagger.json b/api/shop/interface/v1/shop_interface.swagger.json index c45091d..7337a85 100644 --- a/api/shop/interface/v1/shop_interface.swagger.json +++ b/api/shop/interface/v1/shop_interface.swagger.json @@ -579,6 +579,7 @@ "image": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListBeerReplyBeerImage" } } @@ -632,6 +633,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -721,6 +723,9 @@ }, "expires": { "type": "string" + }, + "name": { + "type": "string" } } }, @@ -785,6 +790,7 @@ "image": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1GetBeerReplyImage" } } @@ -822,6 +828,7 @@ "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListAddressReplyAddress" } } @@ -833,6 +840,7 @@ "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListBeerReplyBeer" } } @@ -844,6 +852,7 @@ "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListCardReplyCard" } } diff --git a/api/shop/interface/v1/shop_interface_error.pb.go b/api/shop/interface/v1/shop_interface_error.pb.go index a1a3f69..220125b 100644 --- a/api/shop/interface/v1/shop_interface_error.pb.go +++ b/api/shop/interface/v1/shop_interface_error.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 +// protoc-gen-go v1.30.0 +// protoc v4.22.5 // source: v1/shop_interface_error.proto package v1 diff --git a/api/shop/interface/v1/shop_interface_error.swagger.json b/api/shop/interface/v1/shop_interface_error.swagger.json index d442f3a..0d81465 100644 --- a/api/shop/interface/v1/shop_interface_error.swagger.json +++ b/api/shop/interface/v1/shop_interface_error.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/api/shop/interface/v1/shop_interface_grpc.pb.go b/api/shop/interface/v1/shop_interface_grpc.pb.go index f9f8906..6fe0aab 100644 --- a/api/shop/interface/v1/shop_interface_grpc.pb.go +++ b/api/shop/interface/v1/shop_interface_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.22.5 +// source: v1/shop_interface.proto package v1 @@ -14,6 +18,25 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ShopInterface_Register_FullMethodName = "/shop.interface.v1.ShopInterface/Register" + ShopInterface_Login_FullMethodName = "/shop.interface.v1.ShopInterface/Login" + ShopInterface_Logout_FullMethodName = "/shop.interface.v1.ShopInterface/Logout" + ShopInterface_ListAddress_FullMethodName = "/shop.interface.v1.ShopInterface/ListAddress" + ShopInterface_CreateAddress_FullMethodName = "/shop.interface.v1.ShopInterface/CreateAddress" + ShopInterface_GetAddress_FullMethodName = "/shop.interface.v1.ShopInterface/GetAddress" + ShopInterface_ListCard_FullMethodName = "/shop.interface.v1.ShopInterface/ListCard" + ShopInterface_CreateCard_FullMethodName = "/shop.interface.v1.ShopInterface/CreateCard" + ShopInterface_GetCard_FullMethodName = "/shop.interface.v1.ShopInterface/GetCard" + ShopInterface_DeleteCard_FullMethodName = "/shop.interface.v1.ShopInterface/DeleteCard" + ShopInterface_ListBeer_FullMethodName = "/shop.interface.v1.ShopInterface/ListBeer" + ShopInterface_GetBeer_FullMethodName = "/shop.interface.v1.ShopInterface/GetBeer" + ShopInterface_ListCartItem_FullMethodName = "/shop.interface.v1.ShopInterface/ListCartItem" + ShopInterface_AddCartItem_FullMethodName = "/shop.interface.v1.ShopInterface/AddCartItem" + ShopInterface_CreateOrder_FullMethodName = "/shop.interface.v1.ShopInterface/CreateOrder" + ShopInterface_ListOrder_FullMethodName = "/shop.interface.v1.ShopInterface/ListOrder" +) + // ShopInterfaceClient is the client API for ShopInterface service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -46,7 +69,7 @@ func NewShopInterfaceClient(cc grpc.ClientConnInterface) ShopInterfaceClient { func (c *shopInterfaceClient) Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterReply, error) { out := new(RegisterReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/Register", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_Register_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -55,7 +78,7 @@ func (c *shopInterfaceClient) Register(ctx context.Context, in *RegisterReq, opt func (c *shopInterfaceClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginReply, error) { out := new(LoginReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/Login", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_Login_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -64,7 +87,7 @@ func (c *shopInterfaceClient) Login(ctx context.Context, in *LoginReq, opts ...g func (c *shopInterfaceClient) Logout(ctx context.Context, in *LogoutReq, opts ...grpc.CallOption) (*LogoutReply, error) { out := new(LogoutReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/Logout", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_Logout_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -73,7 +96,7 @@ func (c *shopInterfaceClient) Logout(ctx context.Context, in *LogoutReq, opts .. func (c *shopInterfaceClient) ListAddress(ctx context.Context, in *ListAddressReq, opts ...grpc.CallOption) (*ListAddressReply, error) { out := new(ListAddressReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/ListAddress", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_ListAddress_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -82,7 +105,7 @@ func (c *shopInterfaceClient) ListAddress(ctx context.Context, in *ListAddressRe func (c *shopInterfaceClient) CreateAddress(ctx context.Context, in *CreateAddressReq, opts ...grpc.CallOption) (*CreateAddressReply, error) { out := new(CreateAddressReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/CreateAddress", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_CreateAddress_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -91,7 +114,7 @@ func (c *shopInterfaceClient) CreateAddress(ctx context.Context, in *CreateAddre func (c *shopInterfaceClient) GetAddress(ctx context.Context, in *GetAddressReq, opts ...grpc.CallOption) (*GetAddressReply, error) { out := new(GetAddressReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/GetAddress", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_GetAddress_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -100,7 +123,7 @@ func (c *shopInterfaceClient) GetAddress(ctx context.Context, in *GetAddressReq, func (c *shopInterfaceClient) ListCard(ctx context.Context, in *ListCardReq, opts ...grpc.CallOption) (*ListCardReply, error) { out := new(ListCardReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/ListCard", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_ListCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -109,7 +132,7 @@ func (c *shopInterfaceClient) ListCard(ctx context.Context, in *ListCardReq, opt func (c *shopInterfaceClient) CreateCard(ctx context.Context, in *CreateCardReq, opts ...grpc.CallOption) (*CreateCardReply, error) { out := new(CreateCardReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/CreateCard", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_CreateCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -118,7 +141,7 @@ func (c *shopInterfaceClient) CreateCard(ctx context.Context, in *CreateCardReq, func (c *shopInterfaceClient) GetCard(ctx context.Context, in *GetCardReq, opts ...grpc.CallOption) (*GetCardReply, error) { out := new(GetCardReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/GetCard", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_GetCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -127,7 +150,7 @@ func (c *shopInterfaceClient) GetCard(ctx context.Context, in *GetCardReq, opts func (c *shopInterfaceClient) DeleteCard(ctx context.Context, in *DeleteCardReq, opts ...grpc.CallOption) (*DeleteCardReply, error) { out := new(DeleteCardReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/DeleteCard", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_DeleteCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -136,7 +159,7 @@ func (c *shopInterfaceClient) DeleteCard(ctx context.Context, in *DeleteCardReq, func (c *shopInterfaceClient) ListBeer(ctx context.Context, in *ListBeerReq, opts ...grpc.CallOption) (*ListBeerReply, error) { out := new(ListBeerReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/ListBeer", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_ListBeer_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -145,7 +168,7 @@ func (c *shopInterfaceClient) ListBeer(ctx context.Context, in *ListBeerReq, opt func (c *shopInterfaceClient) GetBeer(ctx context.Context, in *GetBeerReq, opts ...grpc.CallOption) (*GetBeerReply, error) { out := new(GetBeerReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/GetBeer", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_GetBeer_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -154,7 +177,7 @@ func (c *shopInterfaceClient) GetBeer(ctx context.Context, in *GetBeerReq, opts func (c *shopInterfaceClient) ListCartItem(ctx context.Context, in *ListCartItemReq, opts ...grpc.CallOption) (*ListCartItemReply, error) { out := new(ListCartItemReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/ListCartItem", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_ListCartItem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -163,7 +186,7 @@ func (c *shopInterfaceClient) ListCartItem(ctx context.Context, in *ListCartItem func (c *shopInterfaceClient) AddCartItem(ctx context.Context, in *AddCartItemReq, opts ...grpc.CallOption) (*AddCartItemReply, error) { out := new(AddCartItemReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/AddCartItem", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_AddCartItem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -172,7 +195,7 @@ func (c *shopInterfaceClient) AddCartItem(ctx context.Context, in *AddCartItemRe func (c *shopInterfaceClient) CreateOrder(ctx context.Context, in *CreateOrderReq, opts ...grpc.CallOption) (*CreateOrderReply, error) { out := new(CreateOrderReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/CreateOrder", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_CreateOrder_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -181,7 +204,7 @@ func (c *shopInterfaceClient) CreateOrder(ctx context.Context, in *CreateOrderRe func (c *shopInterfaceClient) ListOrder(ctx context.Context, in *ListOrderReq, opts ...grpc.CallOption) (*ListOrderReply, error) { out := new(ListOrderReply) - err := c.cc.Invoke(ctx, "/shop.interface.v1.ShopInterface/ListOrder", in, out, opts...) + err := c.cc.Invoke(ctx, ShopInterface_ListOrder_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -286,7 +309,7 @@ func _ShopInterface_Register_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/Register", + FullMethod: ShopInterface_Register_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).Register(ctx, req.(*RegisterReq)) @@ -304,7 +327,7 @@ func _ShopInterface_Login_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/Login", + FullMethod: ShopInterface_Login_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).Login(ctx, req.(*LoginReq)) @@ -322,7 +345,7 @@ func _ShopInterface_Logout_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/Logout", + FullMethod: ShopInterface_Logout_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).Logout(ctx, req.(*LogoutReq)) @@ -340,7 +363,7 @@ func _ShopInterface_ListAddress_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/ListAddress", + FullMethod: ShopInterface_ListAddress_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).ListAddress(ctx, req.(*ListAddressReq)) @@ -358,7 +381,7 @@ func _ShopInterface_CreateAddress_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/CreateAddress", + FullMethod: ShopInterface_CreateAddress_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).CreateAddress(ctx, req.(*CreateAddressReq)) @@ -376,7 +399,7 @@ func _ShopInterface_GetAddress_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/GetAddress", + FullMethod: ShopInterface_GetAddress_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).GetAddress(ctx, req.(*GetAddressReq)) @@ -394,7 +417,7 @@ func _ShopInterface_ListCard_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/ListCard", + FullMethod: ShopInterface_ListCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).ListCard(ctx, req.(*ListCardReq)) @@ -412,7 +435,7 @@ func _ShopInterface_CreateCard_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/CreateCard", + FullMethod: ShopInterface_CreateCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).CreateCard(ctx, req.(*CreateCardReq)) @@ -430,7 +453,7 @@ func _ShopInterface_GetCard_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/GetCard", + FullMethod: ShopInterface_GetCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).GetCard(ctx, req.(*GetCardReq)) @@ -448,7 +471,7 @@ func _ShopInterface_DeleteCard_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/DeleteCard", + FullMethod: ShopInterface_DeleteCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).DeleteCard(ctx, req.(*DeleteCardReq)) @@ -466,7 +489,7 @@ func _ShopInterface_ListBeer_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/ListBeer", + FullMethod: ShopInterface_ListBeer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).ListBeer(ctx, req.(*ListBeerReq)) @@ -484,7 +507,7 @@ func _ShopInterface_GetBeer_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/GetBeer", + FullMethod: ShopInterface_GetBeer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).GetBeer(ctx, req.(*GetBeerReq)) @@ -502,7 +525,7 @@ func _ShopInterface_ListCartItem_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/ListCartItem", + FullMethod: ShopInterface_ListCartItem_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).ListCartItem(ctx, req.(*ListCartItemReq)) @@ -520,7 +543,7 @@ func _ShopInterface_AddCartItem_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/AddCartItem", + FullMethod: ShopInterface_AddCartItem_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).AddCartItem(ctx, req.(*AddCartItemReq)) @@ -538,7 +561,7 @@ func _ShopInterface_CreateOrder_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/CreateOrder", + FullMethod: ShopInterface_CreateOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).CreateOrder(ctx, req.(*CreateOrderReq)) @@ -556,7 +579,7 @@ func _ShopInterface_ListOrder_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shop.interface.v1.ShopInterface/ListOrder", + FullMethod: ShopInterface_ListOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopInterfaceServer).ListOrder(ctx, req.(*ListOrderReq)) diff --git a/api/shop/interface/v1/shop_interface_http.pb.go b/api/shop/interface/v1/shop_interface_http.pb.go index eaa2c01..02dcad9 100644 --- a/api/shop/interface/v1/shop_interface_http.pb.go +++ b/api/shop/interface/v1/shop_interface_http.pb.go @@ -1,6 +1,8 @@ // Code generated by protoc-gen-go-http. DO NOT EDIT. // versions: -// protoc-gen-go-http v2.1.2 +// - protoc-gen-go-http v2.6.2 +// - protoc v4.22.5 +// source: v1/shop_interface.proto package v1 @@ -17,6 +19,23 @@ var _ = binding.EncodeURL const _ = http.SupportPackageIsVersion1 +const OperationShopInterfaceAddCartItem = "/shop.interface.v1.ShopInterface/AddCartItem" +const OperationShopInterfaceCreateAddress = "/shop.interface.v1.ShopInterface/CreateAddress" +const OperationShopInterfaceCreateCard = "/shop.interface.v1.ShopInterface/CreateCard" +const OperationShopInterfaceCreateOrder = "/shop.interface.v1.ShopInterface/CreateOrder" +const OperationShopInterfaceDeleteCard = "/shop.interface.v1.ShopInterface/DeleteCard" +const OperationShopInterfaceGetAddress = "/shop.interface.v1.ShopInterface/GetAddress" +const OperationShopInterfaceGetBeer = "/shop.interface.v1.ShopInterface/GetBeer" +const OperationShopInterfaceGetCard = "/shop.interface.v1.ShopInterface/GetCard" +const OperationShopInterfaceListAddress = "/shop.interface.v1.ShopInterface/ListAddress" +const OperationShopInterfaceListBeer = "/shop.interface.v1.ShopInterface/ListBeer" +const OperationShopInterfaceListCard = "/shop.interface.v1.ShopInterface/ListCard" +const OperationShopInterfaceListCartItem = "/shop.interface.v1.ShopInterface/ListCartItem" +const OperationShopInterfaceListOrder = "/shop.interface.v1.ShopInterface/ListOrder" +const OperationShopInterfaceLogin = "/shop.interface.v1.ShopInterface/Login" +const OperationShopInterfaceLogout = "/shop.interface.v1.ShopInterface/Logout" +const OperationShopInterfaceRegister = "/shop.interface.v1.ShopInterface/Register" + type ShopInterfaceHTTPServer interface { AddCartItem(context.Context, *AddCartItemReq) (*AddCartItemReply, error) CreateAddress(context.Context, *CreateAddressReq) (*CreateAddressReply, error) @@ -62,7 +81,7 @@ func _ShopInterface_Register0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/Register") + http.SetOperation(ctx, OperationShopInterfaceRegister) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.Register(ctx, req.(*RegisterReq)) }) @@ -81,7 +100,7 @@ func _ShopInterface_Login0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx ht if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/Login") + http.SetOperation(ctx, OperationShopInterfaceLogin) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.Login(ctx, req.(*LoginReq)) }) @@ -100,7 +119,7 @@ func _ShopInterface_Logout0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx h if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/Logout") + http.SetOperation(ctx, OperationShopInterfaceLogout) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.Logout(ctx, req.(*LogoutReq)) }) @@ -119,7 +138,7 @@ func _ShopInterface_ListAddress0_HTTP_Handler(srv ShopInterfaceHTTPServer) func( if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/ListAddress") + http.SetOperation(ctx, OperationShopInterfaceListAddress) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ListAddress(ctx, req.(*ListAddressReq)) }) @@ -138,7 +157,7 @@ func _ShopInterface_CreateAddress0_HTTP_Handler(srv ShopInterfaceHTTPServer) fun if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/CreateAddress") + http.SetOperation(ctx, OperationShopInterfaceCreateAddress) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.CreateAddress(ctx, req.(*CreateAddressReq)) }) @@ -160,7 +179,7 @@ func _ShopInterface_GetAddress0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(c if err := ctx.BindVars(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/GetAddress") + http.SetOperation(ctx, OperationShopInterfaceGetAddress) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetAddress(ctx, req.(*GetAddressReq)) }) @@ -179,7 +198,7 @@ func _ShopInterface_ListCard0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/ListCard") + http.SetOperation(ctx, OperationShopInterfaceListCard) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ListCard(ctx, req.(*ListCardReq)) }) @@ -198,7 +217,7 @@ func _ShopInterface_CreateCard0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(c if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/CreateCard") + http.SetOperation(ctx, OperationShopInterfaceCreateCard) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.CreateCard(ctx, req.(*CreateCardReq)) }) @@ -220,7 +239,7 @@ func _ShopInterface_GetCard0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx if err := ctx.BindVars(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/GetCard") + http.SetOperation(ctx, OperationShopInterfaceGetCard) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetCard(ctx, req.(*GetCardReq)) }) @@ -242,7 +261,7 @@ func _ShopInterface_DeleteCard0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(c if err := ctx.BindVars(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/DeleteCard") + http.SetOperation(ctx, OperationShopInterfaceDeleteCard) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.DeleteCard(ctx, req.(*DeleteCardReq)) }) @@ -261,7 +280,7 @@ func _ShopInterface_ListBeer0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/ListBeer") + http.SetOperation(ctx, OperationShopInterfaceListBeer) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ListBeer(ctx, req.(*ListBeerReq)) }) @@ -283,7 +302,7 @@ func _ShopInterface_GetBeer0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ctx if err := ctx.BindVars(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/GetBeer") + http.SetOperation(ctx, OperationShopInterfaceGetBeer) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetBeer(ctx, req.(*GetBeerReq)) }) @@ -302,7 +321,7 @@ func _ShopInterface_ListCartItem0_HTTP_Handler(srv ShopInterfaceHTTPServer) func if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/ListCartItem") + http.SetOperation(ctx, OperationShopInterfaceListCartItem) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ListCartItem(ctx, req.(*ListCartItemReq)) }) @@ -321,7 +340,7 @@ func _ShopInterface_AddCartItem0_HTTP_Handler(srv ShopInterfaceHTTPServer) func( if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/AddCartItem") + http.SetOperation(ctx, OperationShopInterfaceAddCartItem) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.AddCartItem(ctx, req.(*AddCartItemReq)) }) @@ -340,7 +359,7 @@ func _ShopInterface_CreateOrder0_HTTP_Handler(srv ShopInterfaceHTTPServer) func( if err := ctx.Bind(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/CreateOrder") + http.SetOperation(ctx, OperationShopInterfaceCreateOrder) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.CreateOrder(ctx, req.(*CreateOrderReq)) }) @@ -359,7 +378,7 @@ func _ShopInterface_ListOrder0_HTTP_Handler(srv ShopInterfaceHTTPServer) func(ct if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, "/shop.interface.v1.ShopInterface/ListOrder") + http.SetOperation(ctx, OperationShopInterfaceListOrder) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ListOrder(ctx, req.(*ListOrderReq)) }) @@ -403,7 +422,7 @@ func (c *ShopInterfaceHTTPClientImpl) AddCartItem(ctx context.Context, in *AddCa var out AddCartItemReply pattern := "/v1/cart" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/AddCartItem")) + opts = append(opts, http.Operation(OperationShopInterfaceAddCartItem)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { @@ -416,7 +435,7 @@ func (c *ShopInterfaceHTTPClientImpl) CreateAddress(ctx context.Context, in *Cre var out CreateAddressReply pattern := "/v1/user/addresses" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/CreateAddress")) + opts = append(opts, http.Operation(OperationShopInterfaceCreateAddress)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { @@ -429,7 +448,7 @@ func (c *ShopInterfaceHTTPClientImpl) CreateCard(ctx context.Context, in *Create var out CreateCardReply pattern := "/v1/user/cards" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/CreateCard")) + opts = append(opts, http.Operation(OperationShopInterfaceCreateCard)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { @@ -442,7 +461,7 @@ func (c *ShopInterfaceHTTPClientImpl) CreateOrder(ctx context.Context, in *Creat var out CreateOrderReply pattern := "/v1/orders" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/CreateOrder")) + opts = append(opts, http.Operation(OperationShopInterfaceCreateOrder)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { @@ -455,7 +474,7 @@ func (c *ShopInterfaceHTTPClientImpl) DeleteCard(ctx context.Context, in *Delete var out DeleteCardReply pattern := "/v1/user/cards/{id}" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/DeleteCard")) + opts = append(opts, http.Operation(OperationShopInterfaceDeleteCard)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...) if err != nil { @@ -468,7 +487,7 @@ func (c *ShopInterfaceHTTPClientImpl) GetAddress(ctx context.Context, in *GetAdd var out GetAddressReply pattern := "/v1/user/addresses/{id}" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/GetAddress")) + opts = append(opts, http.Operation(OperationShopInterfaceGetAddress)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -481,7 +500,7 @@ func (c *ShopInterfaceHTTPClientImpl) GetBeer(ctx context.Context, in *GetBeerRe var out GetBeerReply pattern := "/v1/catalog/beers/{id}" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/GetBeer")) + opts = append(opts, http.Operation(OperationShopInterfaceGetBeer)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -494,7 +513,7 @@ func (c *ShopInterfaceHTTPClientImpl) GetCard(ctx context.Context, in *GetCardRe var out GetCardReply pattern := "/v1/user/cards/{id}" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/GetCard")) + opts = append(opts, http.Operation(OperationShopInterfaceGetCard)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -507,7 +526,7 @@ func (c *ShopInterfaceHTTPClientImpl) ListAddress(ctx context.Context, in *ListA var out ListAddressReply pattern := "/v1/user/addresses" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/ListAddress")) + opts = append(opts, http.Operation(OperationShopInterfaceListAddress)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -520,7 +539,7 @@ func (c *ShopInterfaceHTTPClientImpl) ListBeer(ctx context.Context, in *ListBeer var out ListBeerReply pattern := "/v1/catalog/beers" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/ListBeer")) + opts = append(opts, http.Operation(OperationShopInterfaceListBeer)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -533,7 +552,7 @@ func (c *ShopInterfaceHTTPClientImpl) ListCard(ctx context.Context, in *ListCard var out ListCardReply pattern := "/v1/user/cards" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/ListCard")) + opts = append(opts, http.Operation(OperationShopInterfaceListCard)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -546,7 +565,7 @@ func (c *ShopInterfaceHTTPClientImpl) ListCartItem(ctx context.Context, in *List var out ListCartItemReply pattern := "/v1/cart" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/ListCartItem")) + opts = append(opts, http.Operation(OperationShopInterfaceListCartItem)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -559,7 +578,7 @@ func (c *ShopInterfaceHTTPClientImpl) ListOrder(ctx context.Context, in *ListOrd var out ListOrderReply pattern := "/v1/orders" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/ListOrder")) + opts = append(opts, http.Operation(OperationShopInterfaceListOrder)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -572,7 +591,7 @@ func (c *ShopInterfaceHTTPClientImpl) Login(ctx context.Context, in *LoginReq, o var out LoginReply pattern := "/v1/login" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/Login")) + opts = append(opts, http.Operation(OperationShopInterfaceLogin)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { @@ -585,7 +604,7 @@ func (c *ShopInterfaceHTTPClientImpl) Logout(ctx context.Context, in *LogoutReq, var out LogoutReply pattern := "/v1/logout" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/Logout")) + opts = append(opts, http.Operation(OperationShopInterfaceLogout)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { @@ -598,7 +617,7 @@ func (c *ShopInterfaceHTTPClientImpl) Register(ctx context.Context, in *Register var out RegisterReply pattern := "/v1/register" path := binding.EncodeURL(pattern, in, false) - opts = append(opts, http.Operation("/shop.interface.v1.ShopInterface/Register")) + opts = append(opts, http.Operation(OperationShopInterfaceRegister)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) if err != nil { diff --git a/api/user/service/v1/user.pb.go b/api/user/service/v1/user.pb.go index 2236a8a..dcedf35 100644 --- a/api/user/service/v1/user.pb.go +++ b/api/user/service/v1/user.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 +// protoc-gen-go v1.30.0 +// protoc v4.22.5 // source: v1/user.proto package v1 @@ -1020,6 +1020,7 @@ type CreateCardReq struct { CardNo string `protobuf:"bytes,2,opt,name=card_no,json=cardNo,proto3" json:"card_no,omitempty"` Ccv string `protobuf:"bytes,3,opt,name=ccv,proto3" json:"ccv,omitempty"` Expires string `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` } func (x *CreateCardReq) Reset() { @@ -1082,6 +1083,13 @@ func (x *CreateCardReq) GetExpires() string { return "" } +func (x *CreateCardReq) GetName() string { + if x != nil { + return x.Name + } + return "" +} + type CreateCardReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1759,105 +1767,106 @@ var file_v1_user_proto_rawDesc = []byte{ 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, - 0x22, 0x66, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x22, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x72, - 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x72, 0x64, - 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x21, - 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x55, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x1f, 0x0a, 0x0d, 0x53, - 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x32, 0xb5, 0x08, 0x0a, - 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, + 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x0f, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x63, 0x61, 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x22, 0x21, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x55, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, + 0x1f, 0x0a, 0x0d, 0x53, 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x32, 0xb5, 0x08, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x07, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x1a, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x65, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x04, 0x53, 0x61, 0x76, + 0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, + 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x00, 0x12, 0x50, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, + 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x65, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x25, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x04, 0x53, 0x61, 0x76, 0x65, 0x12, 0x1c, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x5c, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x22, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, + 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, - 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x4a, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, + 0x0a, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x4a, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x22, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x1a, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0b, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x59, - 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x08, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x43, 0x61, 0x72, 0x64, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x1a, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, - 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x1a, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x42, 0x18, 0x5a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x18, 0x5a, 0x16, 0x61, 0x70, 0x69, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/user/service/v1/user.proto b/api/user/service/v1/user.proto index d7b2a9d..275d35e 100644 --- a/api/user/service/v1/user.proto +++ b/api/user/service/v1/user.proto @@ -162,6 +162,7 @@ message CreateCardReq { string card_no = 2; string ccv = 3; string expires = 4; + string name = 5; } message CreateCardReply { diff --git a/api/user/service/v1/user.swagger.json b/api/user/service/v1/user.swagger.json index e54ffc5..196cb7c 100644 --- a/api/user/service/v1/user.swagger.json +++ b/api/user/service/v1/user.swagger.json @@ -90,6 +90,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -214,6 +215,7 @@ "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListAddressReplyAddress" } } @@ -225,6 +227,7 @@ "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListCardReplyCard" } } @@ -236,6 +239,7 @@ "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ListUserReplyUser" } } diff --git a/api/user/service/v1/user_error.pb.go b/api/user/service/v1/user_error.pb.go index 98d75f2..8daee1e 100644 --- a/api/user/service/v1/user_error.pb.go +++ b/api/user/service/v1/user_error.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 +// protoc-gen-go v1.30.0 +// protoc v4.22.5 // source: v1/user_error.proto package v1 diff --git a/api/user/service/v1/user_error.swagger.json b/api/user/service/v1/user_error.swagger.json index f7685cf..aaaabe2 100644 --- a/api/user/service/v1/user_error.swagger.json +++ b/api/user/service/v1/user_error.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/api/user/service/v1/user_grpc.pb.go b/api/user/service/v1/user_grpc.pb.go index 8b1b147..2a0e29f 100644 --- a/api/user/service/v1/user_grpc.pb.go +++ b/api/user/service/v1/user_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.22.5 +// source: v1/user.proto package v1 @@ -14,6 +18,22 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + User_GetUser_FullMethodName = "/user.service.v1.User/GetUser" + User_GetUserByUsername_FullMethodName = "/user.service.v1.User/GetUserByUsername" + User_Save_FullMethodName = "/user.service.v1.User/Save" + User_CreateUser_FullMethodName = "/user.service.v1.User/CreateUser" + User_ListUser_FullMethodName = "/user.service.v1.User/ListUser" + User_VerifyPassword_FullMethodName = "/user.service.v1.User/VerifyPassword" + User_ListAddress_FullMethodName = "/user.service.v1.User/ListAddress" + User_CreateAddress_FullMethodName = "/user.service.v1.User/CreateAddress" + User_GetAddress_FullMethodName = "/user.service.v1.User/GetAddress" + User_ListCard_FullMethodName = "/user.service.v1.User/ListCard" + User_CreateCard_FullMethodName = "/user.service.v1.User/CreateCard" + User_GetCard_FullMethodName = "/user.service.v1.User/GetCard" + User_DeleteCard_FullMethodName = "/user.service.v1.User/DeleteCard" +) + // UserClient is the client API for User service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -43,7 +63,7 @@ func NewUserClient(cc grpc.ClientConnInterface) UserClient { func (c *userClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserReply, error) { out := new(GetUserReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/GetUser", in, out, opts...) + err := c.cc.Invoke(ctx, User_GetUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -52,7 +72,7 @@ func (c *userClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.C func (c *userClient) GetUserByUsername(ctx context.Context, in *GetUserByUsernameReq, opts ...grpc.CallOption) (*GetUserByUsernameReply, error) { out := new(GetUserByUsernameReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/GetUserByUsername", in, out, opts...) + err := c.cc.Invoke(ctx, User_GetUserByUsername_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -61,7 +81,7 @@ func (c *userClient) GetUserByUsername(ctx context.Context, in *GetUserByUsernam func (c *userClient) Save(ctx context.Context, in *SaveUserReq, opts ...grpc.CallOption) (*SaveUserReply, error) { out := new(SaveUserReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/Save", in, out, opts...) + err := c.cc.Invoke(ctx, User_Save_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -70,7 +90,7 @@ func (c *userClient) Save(ctx context.Context, in *SaveUserReq, opts ...grpc.Cal func (c *userClient) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserReply, error) { out := new(CreateUserReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/CreateUser", in, out, opts...) + err := c.cc.Invoke(ctx, User_CreateUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -79,7 +99,7 @@ func (c *userClient) CreateUser(ctx context.Context, in *CreateUserReq, opts ... func (c *userClient) ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserReply, error) { out := new(ListUserReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/ListUser", in, out, opts...) + err := c.cc.Invoke(ctx, User_ListUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -88,7 +108,7 @@ func (c *userClient) ListUser(ctx context.Context, in *ListUserReq, opts ...grpc func (c *userClient) VerifyPassword(ctx context.Context, in *VerifyPasswordReq, opts ...grpc.CallOption) (*VerifyPasswordReply, error) { out := new(VerifyPasswordReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/VerifyPassword", in, out, opts...) + err := c.cc.Invoke(ctx, User_VerifyPassword_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -97,7 +117,7 @@ func (c *userClient) VerifyPassword(ctx context.Context, in *VerifyPasswordReq, func (c *userClient) ListAddress(ctx context.Context, in *ListAddressReq, opts ...grpc.CallOption) (*ListAddressReply, error) { out := new(ListAddressReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/ListAddress", in, out, opts...) + err := c.cc.Invoke(ctx, User_ListAddress_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -106,7 +126,7 @@ func (c *userClient) ListAddress(ctx context.Context, in *ListAddressReq, opts . func (c *userClient) CreateAddress(ctx context.Context, in *CreateAddressReq, opts ...grpc.CallOption) (*CreateAddressReply, error) { out := new(CreateAddressReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/CreateAddress", in, out, opts...) + err := c.cc.Invoke(ctx, User_CreateAddress_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -115,7 +135,7 @@ func (c *userClient) CreateAddress(ctx context.Context, in *CreateAddressReq, op func (c *userClient) GetAddress(ctx context.Context, in *GetAddressReq, opts ...grpc.CallOption) (*GetAddressReply, error) { out := new(GetAddressReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/GetAddress", in, out, opts...) + err := c.cc.Invoke(ctx, User_GetAddress_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -124,7 +144,7 @@ func (c *userClient) GetAddress(ctx context.Context, in *GetAddressReq, opts ... func (c *userClient) ListCard(ctx context.Context, in *ListCardReq, opts ...grpc.CallOption) (*ListCardReply, error) { out := new(ListCardReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/ListCard", in, out, opts...) + err := c.cc.Invoke(ctx, User_ListCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -133,7 +153,7 @@ func (c *userClient) ListCard(ctx context.Context, in *ListCardReq, opts ...grpc func (c *userClient) CreateCard(ctx context.Context, in *CreateCardReq, opts ...grpc.CallOption) (*CreateCardReply, error) { out := new(CreateCardReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/CreateCard", in, out, opts...) + err := c.cc.Invoke(ctx, User_CreateCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -142,7 +162,7 @@ func (c *userClient) CreateCard(ctx context.Context, in *CreateCardReq, opts ... func (c *userClient) GetCard(ctx context.Context, in *GetCardReq, opts ...grpc.CallOption) (*GetCardReply, error) { out := new(GetCardReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/GetCard", in, out, opts...) + err := c.cc.Invoke(ctx, User_GetCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -151,7 +171,7 @@ func (c *userClient) GetCard(ctx context.Context, in *GetCardReq, opts ...grpc.C func (c *userClient) DeleteCard(ctx context.Context, in *DeleteCardReq, opts ...grpc.CallOption) (*DeleteCardReply, error) { out := new(DeleteCardReply) - err := c.cc.Invoke(ctx, "/user.service.v1.User/DeleteCard", in, out, opts...) + err := c.cc.Invoke(ctx, User_DeleteCard_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -244,7 +264,7 @@ func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/GetUser", + FullMethod: User_GetUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).GetUser(ctx, req.(*GetUserReq)) @@ -262,7 +282,7 @@ func _User_GetUserByUsername_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/GetUserByUsername", + FullMethod: User_GetUserByUsername_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).GetUserByUsername(ctx, req.(*GetUserByUsernameReq)) @@ -280,7 +300,7 @@ func _User_Save_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/Save", + FullMethod: User_Save_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).Save(ctx, req.(*SaveUserReq)) @@ -298,7 +318,7 @@ func _User_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/CreateUser", + FullMethod: User_CreateUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).CreateUser(ctx, req.(*CreateUserReq)) @@ -316,7 +336,7 @@ func _User_ListUser_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/ListUser", + FullMethod: User_ListUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).ListUser(ctx, req.(*ListUserReq)) @@ -334,7 +354,7 @@ func _User_VerifyPassword_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/VerifyPassword", + FullMethod: User_VerifyPassword_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).VerifyPassword(ctx, req.(*VerifyPasswordReq)) @@ -352,7 +372,7 @@ func _User_ListAddress_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/ListAddress", + FullMethod: User_ListAddress_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).ListAddress(ctx, req.(*ListAddressReq)) @@ -370,7 +390,7 @@ func _User_CreateAddress_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/CreateAddress", + FullMethod: User_CreateAddress_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).CreateAddress(ctx, req.(*CreateAddressReq)) @@ -388,7 +408,7 @@ func _User_GetAddress_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/GetAddress", + FullMethod: User_GetAddress_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).GetAddress(ctx, req.(*GetAddressReq)) @@ -406,7 +426,7 @@ func _User_ListCard_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/ListCard", + FullMethod: User_ListCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).ListCard(ctx, req.(*ListCardReq)) @@ -424,7 +444,7 @@ func _User_CreateCard_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/CreateCard", + FullMethod: User_CreateCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).CreateCard(ctx, req.(*CreateCardReq)) @@ -442,7 +462,7 @@ func _User_GetCard_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/GetCard", + FullMethod: User_GetCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).GetCard(ctx, req.(*GetCardReq)) @@ -460,7 +480,7 @@ func _User_DeleteCard_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.service.v1.User/DeleteCard", + FullMethod: User_DeleteCard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServer).DeleteCard(ctx, req.(*DeleteCardReq)) diff --git a/app/shop/interface/internal/biz/user.go b/app/shop/interface/internal/biz/user.go index 9460f9f..b5f7424 100644 --- a/app/shop/interface/internal/biz/user.go +++ b/app/shop/interface/internal/biz/user.go @@ -32,6 +32,7 @@ type Card struct { CardNo string CCV string Expires string + Name string } func NewUser( diff --git a/app/shop/interface/internal/data/user.go b/app/shop/interface/internal/data/user.go index 3c070a6..4a7e44e 100644 --- a/app/shop/interface/internal/data/user.go +++ b/app/shop/interface/internal/data/user.go @@ -163,6 +163,7 @@ func (rp *userRepo) CreateCard(ctx context.Context, uid int64, c *biz.Card) (*bi CardNo: c.CardNo, Ccv: c.CCV, Expires: c.Expires, + Name: c.Name, }) if err != nil { return nil, err diff --git a/app/shop/interface/internal/service/user.go b/app/shop/interface/internal/service/user.go index 66f4191..35af14a 100644 --- a/app/shop/interface/internal/service/user.go +++ b/app/shop/interface/internal/service/user.go @@ -92,6 +92,7 @@ func (s *ShopInterface) CreateCard(ctx context.Context, req *v1.CreateCardReq) ( CardNo: req.CardNo, CCV: req.Ccv, Expires: req.Expires, + Name: req.Name, }) if err != nil { return nil, err diff --git a/app/user/service/internal/biz/card.go b/app/user/service/internal/biz/card.go index 36a927b..f6ec446 100644 --- a/app/user/service/internal/biz/card.go +++ b/app/user/service/internal/biz/card.go @@ -11,6 +11,7 @@ type Card struct { CardNo string CCV string Expires string + Name string } type CardRepo interface { diff --git a/app/user/service/internal/data/card.go b/app/user/service/internal/data/card.go index 9c50c83..19806e8 100644 --- a/app/user/service/internal/data/card.go +++ b/app/user/service/internal/data/card.go @@ -29,6 +29,7 @@ func (r *cardRepo) CreateCard(ctx context.Context, c *biz.Card) (*biz.Card, erro SetCardNo(c.CardNo). SetCcv(c.CCV). SetExpires(c.Expires). + SetName(c.Name). Save(ctx) if err != nil { return nil, err @@ -38,6 +39,7 @@ func (r *cardRepo) CreateCard(ctx context.Context, c *biz.Card) (*biz.Card, erro CardNo: po.CardNo, CCV: po.Ccv, Expires: po.Expires, + Name: po.Name, }, nil } diff --git a/app/user/service/internal/service/card.go b/app/user/service/internal/service/card.go index 827a054..f5ecfde 100644 --- a/app/user/service/internal/service/card.go +++ b/app/user/service/internal/service/card.go @@ -12,6 +12,7 @@ func (s *UserService) CreateCard(ctx context.Context, req *v1.CreateCardReq) (*v CardNo: req.CardNo, CCV: req.Ccv, Expires: req.Expires, + Name: req.Name, }) if err != nil { return nil, err From f5dedd585af754be2d344291fd119e48a159e7eb Mon Sep 17 00:00:00 2001 From: SparkLee Date: Tue, 30 May 2023 23:05:11 +0800 Subject: [PATCH 3/5] enable tracing for redis operations --- app/user/service/internal/data/data.go | 2 ++ go.mod | 8 ++--- go.sum | 43 ++++++++++++++++++-------- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/app/user/service/internal/data/data.go b/app/user/service/internal/data/data.go index a469ffd..872bf1a 100644 --- a/app/user/service/internal/data/data.go +++ b/app/user/service/internal/data/data.go @@ -2,6 +2,7 @@ package data import ( "context" + "github.com/go-redis/redis/extra/redisotel/v8" "github.com/go-redis/redis/v8" "time" @@ -51,6 +52,7 @@ func NewRedisCmd(conf *conf.Data, logger log.Logger) redis.Cmdable { DialTimeout: time.Second * 2, PoolSize: 10, }) + client.AddHook(redisotel.NewTracingHook()) timeout, cancelFunc := context.WithTimeout(context.Background(), time.Second*2) defer cancelFunc() err := client.Ping(timeout).Err() diff --git a/go.mod b/go.mod index 7f569cb..de42230 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,8 @@ require ( github.com/go-kratos/kratos/contrib/registry/consul/v2 v2.0.0-20220223091357-d6896127b137 github.com/go-kratos/kratos/v2 v2.2.0 github.com/go-kratos/swagger-api v0.1.6 - github.com/go-redis/redis/v8 v8.11.4 + github.com/go-redis/redis/extra/redisotel/v8 v8.11.5 + github.com/go-redis/redis/v8 v8.11.5 github.com/go-sql-driver/mysql v1.6.0 github.com/golang-jwt/jwt v3.2.1+incompatible github.com/golang-jwt/jwt/v4 v4.2.0 @@ -27,13 +28,12 @@ require ( github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/stretchr/testify v1.7.0 go.mongodb.org/mongo-driver v1.5.1 - go.opentelemetry.io/otel v1.3.0 + go.opentelemetry.io/otel v1.5.0 go.opentelemetry.io/otel/exporters/jaeger v1.0.0 - go.opentelemetry.io/otel/sdk v1.3.0 + go.opentelemetry.io/otel/sdk v1.4.1 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 // indirect google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.44.0 google.golang.org/protobuf v1.27.1 diff --git a/go.sum b/go.sum index 8d26d00..e704a9a 100644 --- a/go.sum +++ b/go.sum @@ -143,18 +143,24 @@ github.com/go-kratos/swagger-api v0.1.6/go.mod h1:oTyV1c5b2THGP43XzBv6CX+loCrjHe github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA= github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.0 h1:j4LrlVXgrbIWO83mmQUnK0Hi+YnbD+vzrE1z/EphbFE= +github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic= github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U= -github.com/go-redis/redis/v8 v8.11.4 h1:kHoYkfZP6+pe04aFTnhDH6GDROa5yJdHJVNxV3F46Tg= -github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= +github.com/go-redis/redis/extra/rediscmd/v8 v8.11.5 h1:ftG8tp8SG81xyuL2woNEx5t2RZ8mOJuC2+tumi+/NR8= +github.com/go-redis/redis/extra/rediscmd/v8 v8.11.5/go.mod h1:s9f/6bSbS5r/jC2ozpWhWZ2GsoHDNf6iL+kZKnZnasc= +github.com/go-redis/redis/extra/redisotel/v8 v8.11.5 h1:BqyYJgvdSr2S/6O2l7zmCj26ocUTxDLgagsGIRfkS+Q= +github.com/go-redis/redis/extra/redisotel/v8 v8.11.5/go.mod h1:LlDT9RRdBgOrMGvFjT/m1+GrZAmRlBaMcM3UXHPWf8g= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.5.1-0.20200311113236-681ffa848bae/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= @@ -240,8 +246,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -252,6 +259,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -329,6 +337,7 @@ github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -434,12 +443,15 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= -github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -548,19 +560,24 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnfmS4cg= -go.opentelemetry.io/otel v1.3.0 h1:APxLf0eiBwLl+SOXiJJCVYzA1OOJNyAoV8C5RNRyy7Y= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= +go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= +go.opentelemetry.io/otel v1.5.0 h1:DhCU8oR2sJH9rfnwPdoV/+BJ7UIN5kXHL8DuSGrPU8E= +go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydAjSAHk= go.opentelemetry.io/otel/exporters/jaeger v1.0.0 h1:cLhx8llHw02h5JTqGqaRbYn+QVKHmrzD9vEbKnSPk5U= go.opentelemetry.io/otel/exporters/jaeger v1.0.0/go.mod h1:q10N1AolE1JjqKrFJK2tYw0iZpmX+HBaXBtuCzRnBGQ= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM= -go.opentelemetry.io/otel/sdk v1.3.0 h1:3278edCoH89MEJ0Ky8WQXVmDQv3FX4ZJ3Pp+9fJreAI= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= +go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y= +go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs= -go.opentelemetry.io/otel/trace v1.3.0 h1:doy8Hzb1RJ+I3yFhtDmwNc7tIyw1tNMOIsyPzp1NOGY= go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= +go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= +go.opentelemetry.io/otel/trace v1.5.0 h1:AKQZ9zJsBRFAp7zLdyGNkqG2rToCDIt3i5tcLzQlbmU= +go.opentelemetry.io/otel/trace v1.5.0/go.mod h1:sq55kfhjXYr1zVSyexg0w1mpa03AYXR5eyTkB9NPPdE= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -737,8 +754,8 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI= -golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From ed49e02266904797d88ae1d8f9434fdfb701897e Mon Sep 17 00:00:00 2001 From: SparkLee Date: Tue, 30 May 2023 23:29:55 +0800 Subject: [PATCH 4/5] enable tracing for ent operations --- app/user/service/internal/data/data.go | 19 ++++++++++--- go.mod | 7 ++--- go.sum | 37 +++++++++++++++++++------- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/app/user/service/internal/data/data.go b/app/user/service/internal/data/data.go index 872bf1a..0a70348 100644 --- a/app/user/service/internal/data/data.go +++ b/app/user/service/internal/data/data.go @@ -2,8 +2,11 @@ package data import ( "context" + entsql "entgo.io/ent/dialect/sql" + "github.com/XSAM/otelsql" "github.com/go-redis/redis/extra/redisotel/v8" "github.com/go-redis/redis/v8" + semconv "go.opentelemetry.io/otel/semconv/v1.4.0" "time" "github.com/go-kratos/beer-shop/app/user/service/internal/conf" @@ -29,13 +32,23 @@ type Data struct { func NewEntClient(conf *conf.Data, logger log.Logger) *ent.Client { log := log.NewHelper(log.With(logger, "module", "user-service/data/ent")) - client, err := ent.Open( - conf.Database.Driver, - conf.Database.Source, + // Wrap over sql.Open with OTel instrumentation. + attributes := otelsql.WithAttributes( + semconv.DBSystemKey.String(conf.Database.Driver), ) + spanOptions := otelsql.WithSpanOptions( + otelsql.SpanOptions{ + DisableErrSkip: true, + }) + db, err := otelsql.Open(conf.Database.Driver, conf.Database.Source, attributes, spanOptions) if err != nil { log.Fatalf("failed opening connection to db: %v", err) } + + // New an ent client. + drv := entsql.OpenDB(conf.Database.Driver, db) + client := ent.NewClient(ent.Driver(drv)) + // Run the auto migration tool. if err := client.Schema.Create(context.Background(), migrate.WithForeignKeys(false)); err != nil { log.Fatalf("failed creating schema resources: %v", err) diff --git a/go.mod b/go.mod index de42230..96a13b9 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.16 require ( entgo.io/ent v0.7.0 github.com/Shopify/sarama v1.29.1 + github.com/XSAM/otelsql v0.23.0 github.com/armon/go-metrics v0.3.10 // indirect github.com/fatih/color v1.13.0 // indirect github.com/go-kratos/kratos/contrib/registry/consul/v2 v2.0.0-20220223091357-d6896127b137 @@ -26,11 +27,11 @@ require ( github.com/hashicorp/serf v0.9.6 // indirect github.com/mattn/go-colorable v0.1.11 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.3 go.mongodb.org/mongo-driver v1.5.1 - go.opentelemetry.io/otel v1.5.0 + go.opentelemetry.io/otel v1.16.0 go.opentelemetry.io/otel/exporters/jaeger v1.0.0 - go.opentelemetry.io/otel/sdk v1.4.1 + go.opentelemetry.io/otel/sdk v1.16.0 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c diff --git a/go.sum b/go.sum index e704a9a..3c2c0a3 100644 --- a/go.sum +++ b/go.sum @@ -45,6 +45,8 @@ github.com/Shopify/sarama v1.29.1/go.mod h1:mdtqvCSg8JOxk8PmpTNGyo6wzd4BMm4QXSfD github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/XSAM/otelsql v0.23.0 h1:NsJQS9YhI1+RDsFqE9mW5XIQmPmdF/qa8qQOLZN8XEA= +github.com/XSAM/otelsql v0.23.0/go.mod h1:oX4LXMsb+9lAZhvHjUS61oQP/hbcJRadWHnBKNL+LuM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -144,8 +146,9 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= @@ -247,8 +250,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -517,15 +521,20 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -562,22 +571,29 @@ go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzox go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnfmS4cg= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel v1.5.0 h1:DhCU8oR2sJH9rfnwPdoV/+BJ7UIN5kXHL8DuSGrPU8E= go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydAjSAHk= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/exporters/jaeger v1.0.0 h1:cLhx8llHw02h5JTqGqaRbYn+QVKHmrzD9vEbKnSPk5U= go.opentelemetry.io/otel/exporters/jaeger v1.0.0/go.mod h1:q10N1AolE1JjqKrFJK2tYw0iZpmX+HBaXBtuCzRnBGQ= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= -go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= +go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs= go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/otel/trace v1.5.0 h1:AKQZ9zJsBRFAp7zLdyGNkqG2rToCDIt3i5tcLzQlbmU= go.opentelemetry.io/otel/trace v1.5.0/go.mod h1:sq55kfhjXYr1zVSyexg0w1mpa03AYXR5eyTkB9NPPdE= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -754,8 +770,9 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -824,7 +841,6 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -941,8 +957,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.0.6 h1:mA0XRPjIKi4bkE9nv+NKs6qj6QWOchqUSdWOcpd3x1E= gorm.io/driver/mysql v1.0.6/go.mod h1:KdrTanmfLPPyAOeYGyG+UpDys7/7eeWT1zCq+oekYnU= gorm.io/gorm v1.21.9 h1:INieZtn4P2Pw6xPJ8MzT0G4WUOsHq3RhfuDF1M6GW0E= From 644c860deb7eb46d22611b5d9f171a8424000bf7 Mon Sep 17 00:00:00 2001 From: SparkLee Date: Tue, 30 May 2023 23:59:43 +0800 Subject: [PATCH 5/5] completed DeleteCard --- api/user/service/v1/user.pb.go | 13 +++++++++++-- api/user/service/v1/user.proto | 1 + app/shop/interface/internal/biz/user.go | 5 +++++ app/shop/interface/internal/data/user.go | 10 ++++++++++ app/shop/interface/internal/service/user.go | 10 +++++++++- app/user/service/internal/biz/card.go | 5 +++++ app/user/service/internal/data/card.go | 4 ++++ app/user/service/internal/service/card.go | 12 ++++++++++++ 8 files changed, 57 insertions(+), 3 deletions(-) diff --git a/api/user/service/v1/user.pb.go b/api/user/service/v1/user.pb.go index dcedf35..8607941 100644 --- a/api/user/service/v1/user.pb.go +++ b/api/user/service/v1/user.pb.go @@ -1261,6 +1261,7 @@ type DeleteCardReq struct { unknownFields protoimpl.UnknownFields Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeleteCardReq) Reset() { @@ -1302,6 +1303,13 @@ func (x *DeleteCardReq) GetUid() int64 { return 0 } +func (x *DeleteCardReq) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + type DeleteCardReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1785,9 +1793,10 @@ var file_v1_user_proto_rawDesc = []byte{ 0x63, 0x61, 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x73, 0x22, 0x21, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, + 0x65, 0x73, 0x22, 0x31, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x55, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, diff --git a/api/user/service/v1/user.proto b/api/user/service/v1/user.proto index 275d35e..17d4839 100644 --- a/api/user/service/v1/user.proto +++ b/api/user/service/v1/user.proto @@ -182,6 +182,7 @@ message GetCardReply { message DeleteCardReq { int64 uid = 1; + int64 id = 2; } message DeleteCardReply { diff --git a/app/shop/interface/internal/biz/user.go b/app/shop/interface/internal/biz/user.go index b5f7424..246e15d 100644 --- a/app/shop/interface/internal/biz/user.go +++ b/app/shop/interface/internal/biz/user.go @@ -70,6 +70,7 @@ type UserRepo interface { CreateCard(ctx context.Context, uid int64, c *Card) (*Card, error) GetCard(ctx context.Context, id int64) (*Card, error) ListCard(ctx context.Context, id int64) ([]*Card, error) + DeleteCard(ctx context.Context, id int64) error } type UserUseCase struct { @@ -114,3 +115,7 @@ func (uc *UserUseCase) GetCard(ctx context.Context, id int64) (*Card, error) { func (uc *UserUseCase) ListCard(ctx context.Context, uid int64) ([]*Card, error) { return uc.repo.ListCard(ctx, uid) } + +func (uc *UserUseCase) DeleteCard(ctx context.Context, id int64) error { + return uc.repo.DeleteCard(ctx, id) +} diff --git a/app/shop/interface/internal/data/user.go b/app/shop/interface/internal/data/user.go index 4a7e44e..417f8a3 100644 --- a/app/shop/interface/internal/data/user.go +++ b/app/shop/interface/internal/data/user.go @@ -215,3 +215,13 @@ func (rp *userRepo) ListCard(ctx context.Context, uid int64) ([]*biz.Card, error } return result.([]*biz.Card), nil } + +func (rp *userRepo) DeleteCard(ctx context.Context, id int64) error { + _, err := rp.data.uc.DeleteCard(ctx, &usV1.DeleteCardReq{ + Id: id, + }) + if err != nil { + return err + } + return nil +} diff --git a/app/shop/interface/internal/service/user.go b/app/shop/interface/internal/service/user.go index 35af14a..0505ce9 100644 --- a/app/shop/interface/internal/service/user.go +++ b/app/shop/interface/internal/service/user.go @@ -118,5 +118,13 @@ func (s *ShopInterface) GetCard(ctx context.Context, req *v1.GetCardReq) (*v1.Ge } func (s *ShopInterface) DeleteCard(ctx context.Context, req *v1.DeleteCardReq) (*v1.DeleteCardReply, error) { - return nil, nil + err := s.uc.DeleteCard(ctx, req.Id) + if err != nil { + return &v1.DeleteCardReply{ + Ok: false, + }, err + } + return &v1.DeleteCardReply{ + Ok: true, + }, nil } diff --git a/app/user/service/internal/biz/card.go b/app/user/service/internal/biz/card.go index f6ec446..3b71fa1 100644 --- a/app/user/service/internal/biz/card.go +++ b/app/user/service/internal/biz/card.go @@ -18,6 +18,7 @@ type CardRepo interface { CreateCard(ctx context.Context, c *Card) (*Card, error) GetCard(ctx context.Context, id int64) (*Card, error) ListCard(ctx context.Context, id int64) ([]*Card, error) + DeleteCard(ctx context.Context, id int64) error } type CardUseCase struct { @@ -40,3 +41,7 @@ func (uc *CardUseCase) Get(ctx context.Context, id int64) (*Card, error) { func (uc *CardUseCase) List(ctx context.Context, uid int64) ([]*Card, error) { return uc.repo.ListCard(ctx, uid) } + +func (uc *CardUseCase) Delete(ctx context.Context, id int64) error { + return uc.repo.DeleteCard(ctx, id) +} diff --git a/app/user/service/internal/data/card.go b/app/user/service/internal/data/card.go index 19806e8..06e260d 100644 --- a/app/user/service/internal/data/card.go +++ b/app/user/service/internal/data/card.go @@ -76,3 +76,7 @@ func (r *cardRepo) ListCard(ctx context.Context, uid int64) ([]*biz.Card, error) } return rv, nil } + +func (r *cardRepo) DeleteCard(ctx context.Context, id int64) error { + return r.data.db.Card.DeleteOneID(id).Exec(ctx) +} diff --git a/app/user/service/internal/service/card.go b/app/user/service/internal/service/card.go index f5ecfde..ed48cbc 100644 --- a/app/user/service/internal/service/card.go +++ b/app/user/service/internal/service/card.go @@ -56,3 +56,15 @@ func (s *UserService) ListCard(ctx context.Context, req *v1.ListCardReq) (*v1.Li Results: rs, }, nil } + +func (s *UserService) DeleteCard(ctx context.Context, req *v1.DeleteCardReq) (*v1.DeleteCardReply, error) { + err := s.cc.Delete(ctx, req.Id) + if err != nil { + return &v1.DeleteCardReply{ + Ok: false, + }, err + } + return &v1.DeleteCardReply{ + Ok: true, + }, nil +}