update fileproto: BlocksGet -> BlockGet

This commit is contained in:
Sergey Cherepanov 2023-01-31 14:27:41 +03:00 committed by Mikhail Iudin
parent 10d721b970
commit 7288d0b28f
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0
3 changed files with 51 additions and 51 deletions

View File

@ -705,43 +705,43 @@ func init() {
} }
var fileDescriptor_fd665a7e11c833d5 = []byte{ var fileDescriptor_fd665a7e11c833d5 = []byte{
// 567 bytes of a gzipped FileDescriptorProto // 565 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcd, 0x6e, 0xda, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6e, 0xda, 0x40,
0x10, 0xc7, 0x59, 0xa0, 0x14, 0x86, 0x8f, 0x38, 0x1b, 0x94, 0x52, 0x87, 0x5a, 0xc8, 0x87, 0x0a, 0x10, 0x66, 0x81, 0x52, 0x18, 0x7e, 0xe2, 0x6c, 0x50, 0x4a, 0x1d, 0x6a, 0x21, 0x1f, 0x2a, 0x94,
0xa5, 0x12, 0x91, 0x68, 0x0f, 0xb9, 0xe4, 0x10, 0x03, 0x41, 0xb4, 0x6a, 0x5a, 0x39, 0xea, 0xa5, 0x4a, 0x44, 0xa2, 0x3d, 0xe4, 0x92, 0x03, 0x7f, 0x89, 0x68, 0xd5, 0xb4, 0x72, 0xd4, 0x4b, 0x7b,
0x3d, 0x19, 0x7b, 0x51, 0xac, 0x38, 0x5e, 0xea, 0x5d, 0xaa, 0xe4, 0x2d, 0xfa, 0x24, 0x7d, 0x8e, 0x32, 0xf6, 0xa2, 0x58, 0x71, 0xbc, 0xd4, 0xbb, 0x54, 0xc9, 0x5b, 0xf4, 0x45, 0xfa, 0x1e, 0x39,
0x1c, 0x73, 0xec, 0xb1, 0x82, 0x17, 0xa9, 0xbc, 0x5e, 0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x86, 0x7e, 0x2f, 0xb4, 0xcc, 0xe3, 0x42, 0xcb, 0xfc, 0x5d, 0x68, 0x99, 0xdf, 0x42, 0x43, 0xbf, 0x97, 0x5a, 0xe6, 0x71, 0xa9, 0x65, 0xfe, 0x2e, 0xb5, 0xcc, 0xf7, 0x7a,
0xef, 0xf5, 0xb4, 0x7f, 0xd6, 0x71, 0x41, 0xfc, 0xbc, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xda, 0x1f, 0xeb, 0xa4, 0x20, 0x7e, 0xde, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xb6, 0xed,
0x48, 0x8b, 0xe1, 0x78, 0x05, 0x00, 0x00, 0xc6, 0x77, 0x05, 0x00, 0x00,
} }
func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) { func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) {

View File

@ -40,7 +40,7 @@ func (drpcEncoding_File_commonfile_fileproto_protos_file_proto) JSONUnmarshal(bu
type DRPCFileClient interface { type DRPCFileClient interface {
DRPCConn() drpc.Conn DRPCConn() drpc.Conn
BlocksGet(ctx context.Context, in *BlockGetRequest) (*BlockGetResponse, error) BlockGet(ctx context.Context, in *BlockGetRequest) (*BlockGetResponse, error)
BlockPush(ctx context.Context, in *BlockPushRequest) (*BlockPushResponse, error) BlockPush(ctx context.Context, in *BlockPushRequest) (*BlockPushResponse, error)
BlocksCheck(ctx context.Context, in *BlocksCheckRequest) (*BlocksCheckResponse, error) BlocksCheck(ctx context.Context, in *BlocksCheckRequest) (*BlocksCheckResponse, error)
BlocksBind(ctx context.Context, in *BlocksBindRequest) (*BlocksBindResponse, error) BlocksBind(ctx context.Context, in *BlocksBindRequest) (*BlocksBindResponse, error)
@ -58,9 +58,9 @@ func NewDRPCFileClient(cc drpc.Conn) DRPCFileClient {
func (c *drpcFileClient) DRPCConn() drpc.Conn { return c.cc } func (c *drpcFileClient) DRPCConn() drpc.Conn { return c.cc }
func (c *drpcFileClient) BlocksGet(ctx context.Context, in *BlockGetRequest) (*BlockGetResponse, error) { func (c *drpcFileClient) BlockGet(ctx context.Context, in *BlockGetRequest) (*BlockGetResponse, error) {
out := new(BlockGetResponse) out := new(BlockGetResponse)
err := c.cc.Invoke(ctx, "/filesync.File/BlocksGet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) err := c.cc.Invoke(ctx, "/filesync.File/BlockGet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -113,7 +113,7 @@ func (c *drpcFileClient) Check(ctx context.Context, in *CheckRequest) (*CheckRes
} }
type DRPCFileServer interface { type DRPCFileServer interface {
BlocksGet(context.Context, *BlockGetRequest) (*BlockGetResponse, error) BlockGet(context.Context, *BlockGetRequest) (*BlockGetResponse, error)
BlockPush(context.Context, *BlockPushRequest) (*BlockPushResponse, error) BlockPush(context.Context, *BlockPushRequest) (*BlockPushResponse, error)
BlocksCheck(context.Context, *BlocksCheckRequest) (*BlocksCheckResponse, error) BlocksCheck(context.Context, *BlocksCheckRequest) (*BlocksCheckResponse, error)
BlocksBind(context.Context, *BlocksBindRequest) (*BlocksBindResponse, error) BlocksBind(context.Context, *BlocksBindRequest) (*BlocksBindResponse, error)
@ -123,7 +123,7 @@ type DRPCFileServer interface {
type DRPCFileUnimplementedServer struct{} type DRPCFileUnimplementedServer struct{}
func (s *DRPCFileUnimplementedServer) BlocksGet(context.Context, *BlockGetRequest) (*BlockGetResponse, error) { func (s *DRPCFileUnimplementedServer) BlockGet(context.Context, *BlockGetRequest) (*BlockGetResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
} }
@ -154,14 +154,14 @@ func (DRPCFileDescription) NumMethods() int { return 6 }
func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
switch n { switch n {
case 0: case 0:
return "/filesync.File/BlocksGet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, return "/filesync.File/BlockGet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCFileServer). return srv.(DRPCFileServer).
BlocksGet( BlockGet(
ctx, ctx,
in1.(*BlockGetRequest), in1.(*BlockGetRequest),
) )
}, DRPCFileServer.BlocksGet, true }, DRPCFileServer.BlockGet, true
case 1: case 1:
return "/filesync.File/BlockPush", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, return "/filesync.File/BlockPush", drpcEncoding_File_commonfile_fileproto_protos_file_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
@ -216,16 +216,16 @@ func DRPCRegisterFile(mux drpc.Mux, impl DRPCFileServer) error {
return mux.Register(impl, DRPCFileDescription{}) return mux.Register(impl, DRPCFileDescription{})
} }
type DRPCFile_BlocksGetStream interface { type DRPCFile_BlockGetStream interface {
drpc.Stream drpc.Stream
SendAndClose(*BlockGetResponse) error SendAndClose(*BlockGetResponse) error
} }
type drpcFile_BlocksGetStream struct { type drpcFile_BlockGetStream struct {
drpc.Stream drpc.Stream
} }
func (x *drpcFile_BlocksGetStream) SendAndClose(m *BlockGetResponse) error { func (x *drpcFile_BlockGetStream) SendAndClose(m *BlockGetResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil {
return err return err
} }

View File

@ -10,9 +10,9 @@ enum ErrCodes {
} }
service File { service File {
// GetBlocks streams ipfs blocks from server to client // BlockGet gets one block from a server
rpc BlocksGet(BlockGetRequest) returns (BlockGetResponse); rpc BlockGet(BlockGetRequest) returns (BlockGetResponse);
// BlockPush pushes one block to server // BlockPush pushes one block to a server
rpc BlockPush(BlockPushRequest) returns (BlockPushResponse); rpc BlockPush(BlockPushRequest) returns (BlockPushResponse);
// BlocksCheck checks is CIDs exists // BlocksCheck checks is CIDs exists
rpc BlocksCheck(BlocksCheckRequest) returns (BlocksCheckResponse); rpc BlocksCheck(BlocksCheckRequest) returns (BlocksCheckResponse);