// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.21.4 // source: tree.proto package main import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // TreeManagerClient is the client API for TreeManager 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. type TreeManagerClient interface { GetSummery(ctx context.Context, in *TreeRequest, opts ...grpc.CallOption) (*Tree, error) GetFile(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (*FileContent, error) RebuildTree(ctx context.Context, in *TreeSecret, opts ...grpc.CallOption) (*RebuildResponse, error) } type treeManagerClient struct { cc grpc.ClientConnInterface } func NewTreeManagerClient(cc grpc.ClientConnInterface) TreeManagerClient { return &treeManagerClient{cc} } func (c *treeManagerClient) GetSummery(ctx context.Context, in *TreeRequest, opts ...grpc.CallOption) (*Tree, error) { out := new(Tree) err := c.cc.Invoke(ctx, "/main.TreeManager/GetSummery", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *treeManagerClient) GetFile(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (*FileContent, error) { out := new(FileContent) err := c.cc.Invoke(ctx, "/main.TreeManager/GetFile", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *treeManagerClient) RebuildTree(ctx context.Context, in *TreeSecret, opts ...grpc.CallOption) (*RebuildResponse, error) { out := new(RebuildResponse) err := c.cc.Invoke(ctx, "/main.TreeManager/RebuildTree", in, out, opts...) if err != nil { return nil, err } return out, nil } // TreeManagerServer is the server API for TreeManager service. // All implementations must embed UnimplementedTreeManagerServer // for forward compatibility type TreeManagerServer interface { GetSummery(context.Context, *TreeRequest) (*Tree, error) GetFile(context.Context, *FileRequest) (*FileContent, error) RebuildTree(context.Context, *TreeSecret) (*RebuildResponse, error) mustEmbedUnimplementedTreeManagerServer() } // UnimplementedTreeManagerServer must be embedded to have forward compatible implementations. type UnimplementedTreeManagerServer struct { } func (UnimplementedTreeManagerServer) GetSummery(context.Context, *TreeRequest) (*Tree, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSummery not implemented") } func (UnimplementedTreeManagerServer) GetFile(context.Context, *FileRequest) (*FileContent, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFile not implemented") } func (UnimplementedTreeManagerServer) RebuildTree(context.Context, *TreeSecret) (*RebuildResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RebuildTree not implemented") } func (UnimplementedTreeManagerServer) mustEmbedUnimplementedTreeManagerServer() {} // UnsafeTreeManagerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TreeManagerServer will // result in compilation errors. type UnsafeTreeManagerServer interface { mustEmbedUnimplementedTreeManagerServer() } func RegisterTreeManagerServer(s grpc.ServiceRegistrar, srv TreeManagerServer) { s.RegisterService(&TreeManager_ServiceDesc, srv) } func _TreeManager_GetSummery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TreeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TreeManagerServer).GetSummery(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/main.TreeManager/GetSummery", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TreeManagerServer).GetSummery(ctx, req.(*TreeRequest)) } return interceptor(ctx, in, info, handler) } func _TreeManager_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TreeManagerServer).GetFile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/main.TreeManager/GetFile", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TreeManagerServer).GetFile(ctx, req.(*FileRequest)) } return interceptor(ctx, in, info, handler) } func _TreeManager_RebuildTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TreeSecret) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TreeManagerServer).RebuildTree(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/main.TreeManager/RebuildTree", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TreeManagerServer).RebuildTree(ctx, req.(*TreeSecret)) } return interceptor(ctx, in, info, handler) } // TreeManager_ServiceDesc is the grpc.ServiceDesc for TreeManager service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var TreeManager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.TreeManager", HandlerType: (*TreeManagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSummery", Handler: _TreeManager_GetSummery_Handler, }, { MethodName: "GetFile", Handler: _TreeManager_GetFile_Handler, }, { MethodName: "RebuildTree", Handler: _TreeManager_RebuildTree_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "tree.proto", }