refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: note.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/base/cloud/proto/note.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -38,25 +39,25 @@ const (
|
||||
// 笔记服务
|
||||
type NoteClient interface {
|
||||
// 创建笔记
|
||||
CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 获取笔记详情
|
||||
GetNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error)
|
||||
GetNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error)
|
||||
// 更新笔记
|
||||
UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除笔记
|
||||
DeleteNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DeleteNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 获取笔记列表
|
||||
ListNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error)
|
||||
ListNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error)
|
||||
// 置顶/取消置顶笔记
|
||||
TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 增加浏览次数
|
||||
IncrementViews(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
IncrementViews(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 搜索笔记
|
||||
SearchNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error)
|
||||
SearchNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error)
|
||||
// 上传附件
|
||||
InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除附件
|
||||
DeleteAttachment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DeleteAttachment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type noteClient struct {
|
||||
@@ -67,9 +68,9 @@ func NewNoteClient(cc grpc.ClientConnInterface) NoteClient {
|
||||
return ¬eClient{cc}
|
||||
}
|
||||
|
||||
func (c *noteClient) CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_CreateNote_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -77,7 +78,7 @@ func (c *noteClient) CreateNote(ctx context.Context, in *CreateNoteRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) GetNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error) {
|
||||
func (c *noteClient) GetNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CloudNoteItem)
|
||||
err := c.cc.Invoke(ctx, Note_GetNote_FullMethodName, in, out, cOpts...)
|
||||
@@ -87,9 +88,9 @@ func (c *noteClient) GetNote(ctx context.Context, in *IdentRequest, opts ...grpc
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_UpdateNote_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -97,9 +98,9 @@ func (c *noteClient) UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) DeleteNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) DeleteNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_DeleteNote_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -107,7 +108,7 @@ func (c *noteClient) DeleteNote(ctx context.Context, in *IdentRequest, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) ListNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) {
|
||||
func (c *noteClient) ListNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListNotesResponse)
|
||||
err := c.cc.Invoke(ctx, Note_ListNotes_FullMethodName, in, out, cOpts...)
|
||||
@@ -117,9 +118,9 @@ func (c *noteClient) ListNotes(ctx context.Context, in *FetchRequest, opts ...gr
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_TogglePin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -127,9 +128,9 @@ func (c *noteClient) TogglePin(ctx context.Context, in *TogglePinRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) IncrementViews(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) IncrementViews(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_IncrementViews_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -137,7 +138,7 @@ func (c *noteClient) IncrementViews(ctx context.Context, in *IdentRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) SearchNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) {
|
||||
func (c *noteClient) SearchNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListNotesResponse)
|
||||
err := c.cc.Invoke(ctx, Note_SearchNotes_FullMethodName, in, out, cOpts...)
|
||||
@@ -147,9 +148,9 @@ func (c *noteClient) SearchNotes(ctx context.Context, in *FetchRequest, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_InsertAttachment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -157,9 +158,9 @@ func (c *noteClient) InsertAttachment(ctx context.Context, in *NoteAttachmentIte
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *noteClient) DeleteAttachment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *noteClient) DeleteAttachment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Note_DeleteAttachment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -168,73 +169,71 @@ func (c *noteClient) DeleteAttachment(ctx context.Context, in *IdentRequest, opt
|
||||
}
|
||||
|
||||
// NoteServer is the server API for Note service.
|
||||
// All implementations must embed UnimplementedNoteServer
|
||||
// All implementations should embed UnimplementedNoteServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 笔记服务
|
||||
type NoteServer interface {
|
||||
// 创建笔记
|
||||
CreateNote(context.Context, *CreateNoteRequest) (*StatusReply, error)
|
||||
CreateNote(context.Context, *CreateNoteRequest) (*protobuf.StatusReply, error)
|
||||
// 获取笔记详情
|
||||
GetNote(context.Context, *IdentRequest) (*CloudNoteItem, error)
|
||||
GetNote(context.Context, *protobuf.IdentRequest) (*CloudNoteItem, error)
|
||||
// 更新笔记
|
||||
UpdateNote(context.Context, *CloudNoteItem) (*StatusReply, error)
|
||||
UpdateNote(context.Context, *CloudNoteItem) (*protobuf.StatusReply, error)
|
||||
// 删除笔记
|
||||
DeleteNote(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
DeleteNote(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
// 获取笔记列表
|
||||
ListNotes(context.Context, *FetchRequest) (*ListNotesResponse, error)
|
||||
ListNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error)
|
||||
// 置顶/取消置顶笔记
|
||||
TogglePin(context.Context, *TogglePinRequest) (*StatusReply, error)
|
||||
TogglePin(context.Context, *TogglePinRequest) (*protobuf.StatusReply, error)
|
||||
// 增加浏览次数
|
||||
IncrementViews(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
IncrementViews(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
// 搜索笔记
|
||||
SearchNotes(context.Context, *FetchRequest) (*ListNotesResponse, error)
|
||||
SearchNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error)
|
||||
// 上传附件
|
||||
InsertAttachment(context.Context, *NoteAttachmentItem) (*StatusReply, error)
|
||||
InsertAttachment(context.Context, *NoteAttachmentItem) (*protobuf.StatusReply, error)
|
||||
// 删除附件
|
||||
DeleteAttachment(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedNoteServer()
|
||||
DeleteAttachment(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedNoteServer must be embedded to have
|
||||
// UnimplementedNoteServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedNoteServer struct{}
|
||||
|
||||
func (UnimplementedNoteServer) CreateNote(context.Context, *CreateNoteRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateNote not implemented")
|
||||
func (UnimplementedNoteServer) CreateNote(context.Context, *CreateNoteRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateNote not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) GetNote(context.Context, *IdentRequest) (*CloudNoteItem, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetNote not implemented")
|
||||
func (UnimplementedNoteServer) GetNote(context.Context, *protobuf.IdentRequest) (*CloudNoteItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetNote not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) UpdateNote(context.Context, *CloudNoteItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateNote not implemented")
|
||||
func (UnimplementedNoteServer) UpdateNote(context.Context, *CloudNoteItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateNote not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) DeleteNote(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteNote not implemented")
|
||||
func (UnimplementedNoteServer) DeleteNote(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteNote not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) ListNotes(context.Context, *FetchRequest) (*ListNotesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListNotes not implemented")
|
||||
func (UnimplementedNoteServer) ListNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListNotes not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) TogglePin(context.Context, *TogglePinRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TogglePin not implemented")
|
||||
func (UnimplementedNoteServer) TogglePin(context.Context, *TogglePinRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TogglePin not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) IncrementViews(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method IncrementViews not implemented")
|
||||
func (UnimplementedNoteServer) IncrementViews(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IncrementViews not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) SearchNotes(context.Context, *FetchRequest) (*ListNotesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SearchNotes not implemented")
|
||||
func (UnimplementedNoteServer) SearchNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SearchNotes not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) InsertAttachment(context.Context, *NoteAttachmentItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method InsertAttachment not implemented")
|
||||
func (UnimplementedNoteServer) InsertAttachment(context.Context, *NoteAttachmentItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method InsertAttachment not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) DeleteAttachment(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAttachment not implemented")
|
||||
func (UnimplementedNoteServer) DeleteAttachment(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteAttachment not implemented")
|
||||
}
|
||||
func (UnimplementedNoteServer) mustEmbedUnimplementedNoteServer() {}
|
||||
func (UnimplementedNoteServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedNoteServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNoteServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NoteServer will
|
||||
@@ -244,7 +243,7 @@ type UnsafeNoteServer interface {
|
||||
}
|
||||
|
||||
func RegisterNoteServer(s grpc.ServiceRegistrar, srv NoteServer) {
|
||||
// If the following call pancis, it indicates UnimplementedNoteServer was
|
||||
// If the following call panics, it indicates UnimplementedNoteServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -273,7 +272,7 @@ func _Note_CreateNote_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
|
||||
func _Note_GetNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -285,7 +284,7 @@ func _Note_GetNote_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Note_GetNote_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NoteServer).GetNote(ctx, req.(*IdentRequest))
|
||||
return srv.(NoteServer).GetNote(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -309,7 +308,7 @@ func _Note_UpdateNote_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
|
||||
func _Note_DeleteNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -321,13 +320,13 @@ func _Note_DeleteNote_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
FullMethod: Note_DeleteNote_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NoteServer).DeleteNote(ctx, req.(*IdentRequest))
|
||||
return srv.(NoteServer).DeleteNote(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Note_ListNotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -339,7 +338,7 @@ func _Note_ListNotes_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
FullMethod: Note_ListNotes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NoteServer).ListNotes(ctx, req.(*FetchRequest))
|
||||
return srv.(NoteServer).ListNotes(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -363,7 +362,7 @@ func _Note_TogglePin_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
|
||||
func _Note_IncrementViews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -375,13 +374,13 @@ func _Note_IncrementViews_Handler(srv interface{}, ctx context.Context, dec func
|
||||
FullMethod: Note_IncrementViews_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NoteServer).IncrementViews(ctx, req.(*IdentRequest))
|
||||
return srv.(NoteServer).IncrementViews(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Note_SearchNotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -393,7 +392,7 @@ func _Note_SearchNotes_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
FullMethod: Note_SearchNotes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NoteServer).SearchNotes(ctx, req.(*FetchRequest))
|
||||
return srv.(NoteServer).SearchNotes(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -417,7 +416,7 @@ func _Note_InsertAttachment_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
}
|
||||
|
||||
func _Note_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -429,7 +428,7 @@ func _Note_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
FullMethod: Note_DeleteAttachment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NoteServer).DeleteAttachment(ctx, req.(*IdentRequest))
|
||||
return srv.(NoteServer).DeleteAttachment(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -483,5 +482,5 @@ var Note_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "note.proto",
|
||||
Metadata: "module/base/cloud/proto/note.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user