mirror of https://github.com/usememos/memos.git
chore: rename list inbox
This commit is contained in:
parent
4f1bb55e55
commit
18107248aa
|
|
@ -3,37 +3,39 @@ package v2
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) ListInbox(ctx context.Context, _ *apiv2pb.ListInboxRequest) (*apiv2pb.ListInboxResponse, error) {
|
||||
func (s *APIV2Service) ListInboxes(ctx context.Context, _ *apiv2pb.ListInboxesRequest) (*apiv2pb.ListInboxesResponse, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user")
|
||||
}
|
||||
|
||||
inboxList, err := s.Store.ListInbox(ctx, &store.FindInbox{
|
||||
inboxes, err := s.Store.ListInboxes(ctx, &store.FindInbox{
|
||||
ReceiverID: &user.ID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to list inbox: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListInboxResponse{
|
||||
Inbox: []*apiv2pb.Inbox{},
|
||||
response := &apiv2pb.ListInboxesResponse{
|
||||
Inboxes: []*apiv2pb.Inbox{},
|
||||
}
|
||||
for _, inbox := range inboxList {
|
||||
for _, inbox := range inboxes {
|
||||
inboxMessage, err := s.convertInboxFromStore(ctx, inbox)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to convert inbox from store: %v", err)
|
||||
}
|
||||
response.Inbox = append(response.Inbox, inboxMessage)
|
||||
response.Inboxes = append(response.Inboxes, inboxMessage)
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
|
@ -103,10 +105,11 @@ func (s *APIV2Service) convertInboxFromStore(ctx context.Context, inbox *store.I
|
|||
}
|
||||
|
||||
return &apiv2pb.Inbox{
|
||||
Name: fmt.Sprintf("inbox/%d", inbox.ID),
|
||||
Name: fmt.Sprintf("inboxes/%d", inbox.ID),
|
||||
Sender: fmt.Sprintf("users/%s", sender.Username),
|
||||
Receiver: fmt.Sprintf("users/%s", receiver.Username),
|
||||
Status: convertInboxStatusFromStore(inbox.Status),
|
||||
CreateTime: timestamppb.New(time.Unix(inbox.CreatedTs, 0)),
|
||||
Type: apiv2pb.Inbox_Type(inbox.Message.Type),
|
||||
ActivityId: inbox.Message.ActivityId,
|
||||
}, nil
|
||||
|
|
|
|||
|
|
@ -5,31 +5,32 @@ package memos.api.v2;
|
|||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service InboxService {
|
||||
rpc ListInbox(ListInboxRequest) returns (ListInboxResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/inbox"};
|
||||
rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/inboxes"};
|
||||
}
|
||||
|
||||
rpc UpdateInbox(UpdateInboxRequest) returns (UpdateInboxResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v2/inbox"
|
||||
patch: "/v2/inboxes"
|
||||
body: "inbox"
|
||||
};
|
||||
option (google.api.method_signature) = "inbox,update_mask";
|
||||
}
|
||||
|
||||
rpc DeleteInbox(DeleteInboxRequest) returns (DeleteInboxResponse) {
|
||||
option (google.api.http) = {delete: "/v2/{name=inbox/*}"};
|
||||
option (google.api.http) = {delete: "/v2/{name=inboxes/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
||||
|
||||
message Inbox {
|
||||
// The name of the inbox.
|
||||
// Format: inbox/{id}
|
||||
// Format: inboxes/{id}
|
||||
string name = 1;
|
||||
// Format: users/{username}
|
||||
string sender = 2;
|
||||
|
|
@ -44,22 +45,24 @@ message Inbox {
|
|||
}
|
||||
Status status = 4;
|
||||
|
||||
google.protobuf.Timestamp create_time = 5;
|
||||
|
||||
enum Type {
|
||||
TYPE_UNSPECIFIED = 0;
|
||||
TYPE_MEMO_COMMENT = 1;
|
||||
}
|
||||
Type type = 5;
|
||||
Type type = 6;
|
||||
|
||||
optional int32 activity_id = 6;
|
||||
optional int32 activity_id = 7;
|
||||
}
|
||||
|
||||
message ListInboxRequest {
|
||||
// Format: /users/{username}
|
||||
message ListInboxesRequest {
|
||||
// Format: users/{username}
|
||||
string user = 1;
|
||||
}
|
||||
|
||||
message ListInboxResponse {
|
||||
repeated Inbox inbox = 1;
|
||||
message ListInboxesResponse {
|
||||
repeated Inbox inboxes = 1;
|
||||
}
|
||||
|
||||
message UpdateInboxRequest {
|
||||
|
|
@ -74,7 +77,7 @@ message UpdateInboxResponse {
|
|||
|
||||
message DeleteInboxRequest {
|
||||
// The name of the inbox to delete.
|
||||
// Format: inbox/{inbox}
|
||||
// Format: inboxes/{inbox}
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
- [DeleteInboxRequest](#memos-api-v2-DeleteInboxRequest)
|
||||
- [DeleteInboxResponse](#memos-api-v2-DeleteInboxResponse)
|
||||
- [Inbox](#memos-api-v2-Inbox)
|
||||
- [ListInboxRequest](#memos-api-v2-ListInboxRequest)
|
||||
- [ListInboxResponse](#memos-api-v2-ListInboxResponse)
|
||||
- [ListInboxesRequest](#memos-api-v2-ListInboxesRequest)
|
||||
- [ListInboxesResponse](#memos-api-v2-ListInboxesResponse)
|
||||
- [UpdateInboxRequest](#memos-api-v2-UpdateInboxRequest)
|
||||
- [UpdateInboxResponse](#memos-api-v2-UpdateInboxResponse)
|
||||
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | The name of the inbox to delete. Format: inbox/{inbox} |
|
||||
| name | [string](#string) | | The name of the inbox to delete. Format: inboxes/{inbox} |
|
||||
|
||||
|
||||
|
||||
|
|
@ -163,10 +163,11 @@
|
|||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | The name of the inbox. Format: inbox/{id} |
|
||||
| name | [string](#string) | | The name of the inbox. Format: inboxes/{id} |
|
||||
| sender | [string](#string) | | Format: users/{username} |
|
||||
| receiver | [string](#string) | | Format: users/{username} |
|
||||
| status | [Inbox.Status](#memos-api-v2-Inbox-Status) | | |
|
||||
| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
|
||||
| type | [Inbox.Type](#memos-api-v2-Inbox-Type) | | |
|
||||
| activity_id | [int32](#int32) | optional | |
|
||||
|
||||
|
|
@ -175,30 +176,30 @@
|
|||
|
||||
|
||||
|
||||
<a name="memos-api-v2-ListInboxRequest"></a>
|
||||
<a name="memos-api-v2-ListInboxesRequest"></a>
|
||||
|
||||
### ListInboxRequest
|
||||
### ListInboxesRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| user | [string](#string) | | Format: /users/{username} |
|
||||
| user | [string](#string) | | Format: users/{username} |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="memos-api-v2-ListInboxResponse"></a>
|
||||
<a name="memos-api-v2-ListInboxesResponse"></a>
|
||||
|
||||
### ListInboxResponse
|
||||
### ListInboxesResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| inbox | [Inbox](#memos-api-v2-Inbox) | repeated | |
|
||||
| inboxes | [Inbox](#memos-api-v2-Inbox) | repeated | |
|
||||
|
||||
|
||||
|
||||
|
|
@ -275,7 +276,7 @@
|
|||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| ListInbox | [ListInboxRequest](#memos-api-v2-ListInboxRequest) | [ListInboxResponse](#memos-api-v2-ListInboxResponse) | |
|
||||
| ListInboxes | [ListInboxesRequest](#memos-api-v2-ListInboxesRequest) | [ListInboxesResponse](#memos-api-v2-ListInboxesResponse) | |
|
||||
| UpdateInbox | [UpdateInboxRequest](#memos-api-v2-UpdateInboxRequest) | [UpdateInboxResponse](#memos-api-v2-UpdateInboxResponse) | |
|
||||
| DeleteInbox | [DeleteInboxRequest](#memos-api-v2-DeleteInboxRequest) | [DeleteInboxResponse](#memos-api-v2-DeleteInboxResponse) | |
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
|
@ -126,15 +127,16 @@ type Inbox struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The name of the inbox.
|
||||
// Format: inbox/{id}
|
||||
// Format: inboxes/{id}
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Format: users/{username}
|
||||
Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
|
||||
// Format: users/{username}
|
||||
Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
|
||||
Status Inbox_Status `protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v2.Inbox_Status" json:"status,omitempty"`
|
||||
Type Inbox_Type `protobuf:"varint,5,opt,name=type,proto3,enum=memos.api.v2.Inbox_Type" json:"type,omitempty"`
|
||||
ActivityId *int32 `protobuf:"varint,6,opt,name=activity_id,json=activityId,proto3,oneof" json:"activity_id,omitempty"`
|
||||
Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
|
||||
Status Inbox_Status `protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v2.Inbox_Status" json:"status,omitempty"`
|
||||
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
Type Inbox_Type `protobuf:"varint,6,opt,name=type,proto3,enum=memos.api.v2.Inbox_Type" json:"type,omitempty"`
|
||||
ActivityId *int32 `protobuf:"varint,7,opt,name=activity_id,json=activityId,proto3,oneof" json:"activity_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Inbox) Reset() {
|
||||
|
|
@ -197,6 +199,13 @@ func (x *Inbox) GetStatus() Inbox_Status {
|
|||
return Inbox_STATUS_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *Inbox) GetCreateTime() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreateTime
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Inbox) GetType() Inbox_Type {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
|
|
@ -211,17 +220,17 @@ func (x *Inbox) GetActivityId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
type ListInboxRequest struct {
|
||||
type ListInboxesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Format: /users/{username}
|
||||
// Format: users/{username}
|
||||
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListInboxRequest) Reset() {
|
||||
*x = ListInboxRequest{}
|
||||
func (x *ListInboxesRequest) Reset() {
|
||||
*x = ListInboxesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
|
|
@ -229,13 +238,13 @@ func (x *ListInboxRequest) Reset() {
|
|||
}
|
||||
}
|
||||
|
||||
func (x *ListInboxRequest) String() string {
|
||||
func (x *ListInboxesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListInboxRequest) ProtoMessage() {}
|
||||
func (*ListInboxesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListInboxRequest) ProtoReflect() protoreflect.Message {
|
||||
func (x *ListInboxesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
|
|
@ -247,28 +256,28 @@ func (x *ListInboxRequest) ProtoReflect() protoreflect.Message {
|
|||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListInboxRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListInboxRequest) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ListInboxesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListInboxesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListInboxRequest) GetUser() string {
|
||||
func (x *ListInboxesRequest) GetUser() string {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListInboxResponse struct {
|
||||
type ListInboxesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Inbox []*Inbox `protobuf:"bytes,1,rep,name=inbox,proto3" json:"inbox,omitempty"`
|
||||
Inboxes []*Inbox `protobuf:"bytes,1,rep,name=inboxes,proto3" json:"inboxes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListInboxResponse) Reset() {
|
||||
*x = ListInboxResponse{}
|
||||
func (x *ListInboxesResponse) Reset() {
|
||||
*x = ListInboxesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
|
|
@ -276,13 +285,13 @@ func (x *ListInboxResponse) Reset() {
|
|||
}
|
||||
}
|
||||
|
||||
func (x *ListInboxResponse) String() string {
|
||||
func (x *ListInboxesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListInboxResponse) ProtoMessage() {}
|
||||
func (*ListInboxesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListInboxResponse) ProtoReflect() protoreflect.Message {
|
||||
func (x *ListInboxesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
|
|
@ -294,14 +303,14 @@ func (x *ListInboxResponse) ProtoReflect() protoreflect.Message {
|
|||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListInboxResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListInboxResponse) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ListInboxesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListInboxesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListInboxResponse) GetInbox() []*Inbox {
|
||||
func (x *ListInboxesResponse) GetInboxes() []*Inbox {
|
||||
if x != nil {
|
||||
return x.Inbox
|
||||
return x.Inboxes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -414,7 +423,7 @@ type DeleteInboxRequest struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The name of the inbox to delete.
|
||||
// Format: inbox/{inbox}
|
||||
// Format: inboxes/{inbox}
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
|
|
@ -506,86 +515,93 @@ var file_api_v2_inbox_service_proto_rawDesc = []byte{
|
|||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63,
|
||||
0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63,
|
||||
0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x79, 0x70,
|
||||
0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x44, 0x0a,
|
||||
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55,
|
||||
0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
|
||||
0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52,
|
||||
0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45,
|
||||
0x44, 0x10, 0x03, 0x22, 0x33, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54,
|
||||
0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x43,
|
||||
0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74,
|
||||
0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x26, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x05, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
|
||||
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65,
|
||||
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52,
|
||||
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x44, 0x0a, 0x06, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
|
||||
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a,
|
||||
0x06, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x41,
|
||||
0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10,
|
||||
0x03, 0x22, 0x33, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
|
||||
0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x43, 0x4f, 0x4d,
|
||||
0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x28, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e,
|
||||
0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72,
|
||||
0x22, 0x3e, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x22, 0x7c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f,
|
||||
0x78, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
|
||||
0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x40,
|
||||
0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x32, 0xed, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12,
|
||||
0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x80, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x22, 0x44, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x69,
|
||||
0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x22, 0x7c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05,
|
||||
0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46,
|
||||
0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4d, 0x61, 0x73, 0x6b, 0x22, 0x40, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e,
|
||||
0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69,
|
||||
0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52,
|
||||
0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf9, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x62, 0x6f,
|
||||
0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62,
|
||||
0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e,
|
||||
0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62,
|
||||
0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49,
|
||||
0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xda, 0x41,
|
||||
0x11, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
|
||||
0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x32,
|
||||
0x09, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x75, 0x0a, 0x0b, 0x44, 0x65,
|
||||
0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x11, 0x69,
|
||||
0x6e, 0x62, 0x6f, 0x78, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x32, 0x0b, 0x2f,
|
||||
0x76, 0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x0b, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,
|
||||
0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21,
|
||||
0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f,
|
||||
0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x2f, 0x2a,
|
||||
0x7d, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03,
|
||||
0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e,
|
||||
0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56,
|
||||
0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32,
|
||||
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23,
|
||||
0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f,
|
||||
0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73,
|
||||
0x2f, 0x2a, 0x7d, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
|
||||
0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2,
|
||||
0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70,
|
||||
0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
|
||||
0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c,
|
||||
0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||
0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -606,32 +622,34 @@ var file_api_v2_inbox_service_proto_goTypes = []interface{}{
|
|||
(Inbox_Status)(0), // 0: memos.api.v2.Inbox.Status
|
||||
(Inbox_Type)(0), // 1: memos.api.v2.Inbox.Type
|
||||
(*Inbox)(nil), // 2: memos.api.v2.Inbox
|
||||
(*ListInboxRequest)(nil), // 3: memos.api.v2.ListInboxRequest
|
||||
(*ListInboxResponse)(nil), // 4: memos.api.v2.ListInboxResponse
|
||||
(*ListInboxesRequest)(nil), // 3: memos.api.v2.ListInboxesRequest
|
||||
(*ListInboxesResponse)(nil), // 4: memos.api.v2.ListInboxesResponse
|
||||
(*UpdateInboxRequest)(nil), // 5: memos.api.v2.UpdateInboxRequest
|
||||
(*UpdateInboxResponse)(nil), // 6: memos.api.v2.UpdateInboxResponse
|
||||
(*DeleteInboxRequest)(nil), // 7: memos.api.v2.DeleteInboxRequest
|
||||
(*DeleteInboxResponse)(nil), // 8: memos.api.v2.DeleteInboxResponse
|
||||
(*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
|
||||
(*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask
|
||||
}
|
||||
var file_api_v2_inbox_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v2.Inbox.status:type_name -> memos.api.v2.Inbox.Status
|
||||
1, // 1: memos.api.v2.Inbox.type:type_name -> memos.api.v2.Inbox.Type
|
||||
2, // 2: memos.api.v2.ListInboxResponse.inbox:type_name -> memos.api.v2.Inbox
|
||||
2, // 3: memos.api.v2.UpdateInboxRequest.inbox:type_name -> memos.api.v2.Inbox
|
||||
9, // 4: memos.api.v2.UpdateInboxRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
2, // 5: memos.api.v2.UpdateInboxResponse.inbox:type_name -> memos.api.v2.Inbox
|
||||
3, // 6: memos.api.v2.InboxService.ListInbox:input_type -> memos.api.v2.ListInboxRequest
|
||||
5, // 7: memos.api.v2.InboxService.UpdateInbox:input_type -> memos.api.v2.UpdateInboxRequest
|
||||
7, // 8: memos.api.v2.InboxService.DeleteInbox:input_type -> memos.api.v2.DeleteInboxRequest
|
||||
4, // 9: memos.api.v2.InboxService.ListInbox:output_type -> memos.api.v2.ListInboxResponse
|
||||
6, // 10: memos.api.v2.InboxService.UpdateInbox:output_type -> memos.api.v2.UpdateInboxResponse
|
||||
8, // 11: memos.api.v2.InboxService.DeleteInbox:output_type -> memos.api.v2.DeleteInboxResponse
|
||||
9, // [9:12] is the sub-list for method output_type
|
||||
6, // [6:9] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
0, // 0: memos.api.v2.Inbox.status:type_name -> memos.api.v2.Inbox.Status
|
||||
9, // 1: memos.api.v2.Inbox.create_time:type_name -> google.protobuf.Timestamp
|
||||
1, // 2: memos.api.v2.Inbox.type:type_name -> memos.api.v2.Inbox.Type
|
||||
2, // 3: memos.api.v2.ListInboxesResponse.inboxes:type_name -> memos.api.v2.Inbox
|
||||
2, // 4: memos.api.v2.UpdateInboxRequest.inbox:type_name -> memos.api.v2.Inbox
|
||||
10, // 5: memos.api.v2.UpdateInboxRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
2, // 6: memos.api.v2.UpdateInboxResponse.inbox:type_name -> memos.api.v2.Inbox
|
||||
3, // 7: memos.api.v2.InboxService.ListInboxes:input_type -> memos.api.v2.ListInboxesRequest
|
||||
5, // 8: memos.api.v2.InboxService.UpdateInbox:input_type -> memos.api.v2.UpdateInboxRequest
|
||||
7, // 9: memos.api.v2.InboxService.DeleteInbox:input_type -> memos.api.v2.DeleteInboxRequest
|
||||
4, // 10: memos.api.v2.InboxService.ListInboxes:output_type -> memos.api.v2.ListInboxesResponse
|
||||
6, // 11: memos.api.v2.InboxService.UpdateInbox:output_type -> memos.api.v2.UpdateInboxResponse
|
||||
8, // 12: memos.api.v2.InboxService.DeleteInbox:output_type -> memos.api.v2.DeleteInboxResponse
|
||||
10, // [10:13] is the sub-list for method output_type
|
||||
7, // [7:10] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_inbox_service_proto_init() }
|
||||
|
|
@ -653,7 +671,7 @@ func file_api_v2_inbox_service_proto_init() {
|
|||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListInboxRequest); i {
|
||||
switch v := v.(*ListInboxesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
|
@ -665,7 +683,7 @@ func file_api_v2_inbox_service_proto_init() {
|
|||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListInboxResponse); i {
|
||||
switch v := v.(*ListInboxesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -32,37 +32,37 @@ var _ = utilities.NewDoubleArray
|
|||
var _ = metadata.Join
|
||||
|
||||
var (
|
||||
filter_InboxService_ListInbox_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
filter_InboxService_ListInboxes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_InboxService_ListInbox_0(ctx context.Context, marshaler runtime.Marshaler, client InboxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ListInboxRequest
|
||||
func request_InboxService_ListInboxes_0(ctx context.Context, marshaler runtime.Marshaler, client InboxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ListInboxesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInbox_0); err != nil {
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInboxes_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ListInbox(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ListInboxes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_InboxService_ListInbox_0(ctx context.Context, marshaler runtime.Marshaler, server InboxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ListInboxRequest
|
||||
func local_request_InboxService_ListInboxes_0(ctx context.Context, marshaler runtime.Marshaler, server InboxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ListInboxesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInbox_0); err != nil {
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInboxes_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ListInbox(ctx, &protoReq)
|
||||
msg, err := server.ListInboxes(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ func local_request_InboxService_DeleteInbox_0(ctx context.Context, marshaler run
|
|||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInboxServiceHandlerFromEndpoint instead.
|
||||
func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InboxServiceServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_InboxService_ListInbox_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("GET", pattern_InboxService_ListInboxes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
|
|
@ -199,12 +199,12 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
|||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInbox", runtime.WithHTTPPathPattern("/api/v2/inbox"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v2/inboxes"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_InboxService_ListInbox_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_InboxService_ListInboxes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
|
|
@ -212,7 +212,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
|||
return
|
||||
}
|
||||
|
||||
forward_InboxService_ListInbox_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_InboxService_ListInboxes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
|||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inbox"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inboxes"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
|
|
@ -249,7 +249,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
|||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inbox/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inboxes/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
|
|
@ -307,25 +307,25 @@ func RegisterInboxServiceHandler(ctx context.Context, mux *runtime.ServeMux, con
|
|||
// "InboxServiceClient" to call the correct interceptors.
|
||||
func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InboxServiceClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_InboxService_ListInbox_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("GET", pattern_InboxService_ListInboxes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInbox", runtime.WithHTTPPathPattern("/api/v2/inbox"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v2/inboxes"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_InboxService_ListInbox_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_InboxService_ListInboxes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InboxService_ListInbox_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_InboxService_ListInboxes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
|||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inbox"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inboxes"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
|
|
@ -357,7 +357,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
|||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inbox/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inboxes/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
|
|
@ -377,15 +377,15 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
|||
}
|
||||
|
||||
var (
|
||||
pattern_InboxService_ListInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "inbox"}, ""))
|
||||
pattern_InboxService_ListInboxes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "inboxes"}, ""))
|
||||
|
||||
pattern_InboxService_UpdateInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v2", "inbox"}, ""))
|
||||
pattern_InboxService_UpdateInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v2", "inboxes"}, ""))
|
||||
|
||||
pattern_InboxService_DeleteInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v2", "inbox", "name"}, ""))
|
||||
pattern_InboxService_DeleteInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v2", "inboxes", "name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_InboxService_ListInbox_0 = runtime.ForwardResponseMessage
|
||||
forward_InboxService_ListInboxes_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_InboxService_UpdateInbox_0 = runtime.ForwardResponseMessage
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import (
|
|||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
InboxService_ListInbox_FullMethodName = "/memos.api.v2.InboxService/ListInbox"
|
||||
InboxService_ListInboxes_FullMethodName = "/memos.api.v2.InboxService/ListInboxes"
|
||||
InboxService_UpdateInbox_FullMethodName = "/memos.api.v2.InboxService/UpdateInbox"
|
||||
InboxService_DeleteInbox_FullMethodName = "/memos.api.v2.InboxService/DeleteInbox"
|
||||
)
|
||||
|
|
@ -28,7 +28,7 @@ const (
|
|||
//
|
||||
// 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.
|
||||
type InboxServiceClient interface {
|
||||
ListInbox(ctx context.Context, in *ListInboxRequest, opts ...grpc.CallOption) (*ListInboxResponse, error)
|
||||
ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error)
|
||||
UpdateInbox(ctx context.Context, in *UpdateInboxRequest, opts ...grpc.CallOption) (*UpdateInboxResponse, error)
|
||||
DeleteInbox(ctx context.Context, in *DeleteInboxRequest, opts ...grpc.CallOption) (*DeleteInboxResponse, error)
|
||||
}
|
||||
|
|
@ -41,9 +41,9 @@ func NewInboxServiceClient(cc grpc.ClientConnInterface) InboxServiceClient {
|
|||
return &inboxServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *inboxServiceClient) ListInbox(ctx context.Context, in *ListInboxRequest, opts ...grpc.CallOption) (*ListInboxResponse, error) {
|
||||
out := new(ListInboxResponse)
|
||||
err := c.cc.Invoke(ctx, InboxService_ListInbox_FullMethodName, in, out, opts...)
|
||||
func (c *inboxServiceClient) ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) {
|
||||
out := new(ListInboxesResponse)
|
||||
err := c.cc.Invoke(ctx, InboxService_ListInboxes_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ func (c *inboxServiceClient) DeleteInbox(ctx context.Context, in *DeleteInboxReq
|
|||
// All implementations must embed UnimplementedInboxServiceServer
|
||||
// for forward compatibility
|
||||
type InboxServiceServer interface {
|
||||
ListInbox(context.Context, *ListInboxRequest) (*ListInboxResponse, error)
|
||||
ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error)
|
||||
UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error)
|
||||
DeleteInbox(context.Context, *DeleteInboxRequest) (*DeleteInboxResponse, error)
|
||||
mustEmbedUnimplementedInboxServiceServer()
|
||||
|
|
@ -82,8 +82,8 @@ type InboxServiceServer interface {
|
|||
type UnimplementedInboxServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedInboxServiceServer) ListInbox(context.Context, *ListInboxRequest) (*ListInboxResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListInbox not implemented")
|
||||
func (UnimplementedInboxServiceServer) ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListInboxes not implemented")
|
||||
}
|
||||
func (UnimplementedInboxServiceServer) UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateInbox not implemented")
|
||||
|
|
@ -104,20 +104,20 @@ func RegisterInboxServiceServer(s grpc.ServiceRegistrar, srv InboxServiceServer)
|
|||
s.RegisterService(&InboxService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _InboxService_ListInbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListInboxRequest)
|
||||
func _InboxService_ListInboxes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListInboxesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(InboxServiceServer).ListInbox(ctx, in)
|
||||
return srv.(InboxServiceServer).ListInboxes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: InboxService_ListInbox_FullMethodName,
|
||||
FullMethod: InboxService_ListInboxes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(InboxServiceServer).ListInbox(ctx, req.(*ListInboxRequest))
|
||||
return srv.(InboxServiceServer).ListInboxes(ctx, req.(*ListInboxesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
|
@ -166,8 +166,8 @@ var InboxService_ServiceDesc = grpc.ServiceDesc{
|
|||
HandlerType: (*InboxServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListInbox",
|
||||
Handler: _InboxService_ListInbox_Handler,
|
||||
MethodName: "ListInboxes",
|
||||
Handler: _InboxService_ListInboxes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateInbox",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ func (d *DB) CreateInbox(ctx context.Context, create *store.Inbox) (*store.Inbox
|
|||
}
|
||||
|
||||
// nolint
|
||||
func (d *DB) ListInbox(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
||||
func (d *DB) ListInboxes(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ func (d *DB) CreateInbox(ctx context.Context, create *store.Inbox) (*store.Inbox
|
|||
return create, nil
|
||||
}
|
||||
|
||||
func (d *DB) ListInbox(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
||||
func (d *DB) ListInboxes(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
||||
where, args := []string{"1 = 1"}, []any{}
|
||||
|
||||
if find.ID != nil {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ type Driver interface {
|
|||
|
||||
// Inbox model related methods.
|
||||
CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
|
||||
ListInbox(ctx context.Context, find *FindInbox) ([]*Inbox, error)
|
||||
ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error)
|
||||
UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error)
|
||||
DeleteInbox(ctx context.Context, delete *DeleteInbox) error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ func (s *Store) CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
|
|||
return s.driver.CreateInbox(ctx, create)
|
||||
}
|
||||
|
||||
func (s *Store) ListInbox(ctx context.Context, find *FindInbox) ([]*Inbox, error) {
|
||||
return s.driver.ListInbox(ctx, find)
|
||||
func (s *Store) ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error) {
|
||||
return s.driver.ListInboxes(ctx, find)
|
||||
}
|
||||
|
||||
func (s *Store) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ func TestInboxStore(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.NotNil(t, inbox)
|
||||
require.Equal(t, create.Message, inbox.Message)
|
||||
inboxes, err := ts.ListInbox(ctx, &store.FindInbox{
|
||||
inboxes, err := ts.ListInboxes(ctx, &store.FindInbox{
|
||||
ReceiverID: &user.ID,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
|
@ -45,7 +45,7 @@ func TestInboxStore(t *testing.T) {
|
|||
ID: inbox.ID,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
inboxes, err = ts.ListInbox(ctx, &store.FindInbox{
|
||||
inboxes, err = ts.ListInboxes(ctx, &store.FindInbox{
|
||||
ReceiverID: &user.ID,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue