Commit 5840998a authored by Ubuntu's avatar Ubuntu

merge remote

parents 7b2ea958 934aec6c
...@@ -18,9 +18,12 @@ generate: ...@@ -18,9 +18,12 @@ generate:
@buf generate @buf generate
deps: deps:
@go get -u github.com/gogo/protobuf/protoc-gen-gogo \ @go get github.com/gogo/protobuf/proto
@go install github.com/gogo/protobuf/protoc-gen-gogo
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
@go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
@go install github.com/bufbuild/buf/cmd/buf@v1.9.0 @go install github.com/bufbuild/buf/cmd/buf@v1.9.0
clean: clean:
@rm -f $(PROTO_GO_FILES) $(BIN) \ @rm -f $(PROTO_GO_FILES) $(BIN)
@rm -rf gen @rm -rf gen
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc (unknown)
// source: base/v1/service.proto
package basev1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_base_v1_service_proto protoreflect.FileDescriptor
var file_base_v1_service_proto_rawDesc = []byte{
0x0a, 0x15, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
0x1a, 0x1e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x32, 0x43, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x34, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x4c, 0x50, 0x44, 0x61, 0x74,
0x61, 0x1a, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x22, 0x00, 0x42, 0x96, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61,
0x73, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6d, 0x70, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x73,
0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x42, 0x61, 0x73, 0x65,
0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13,
0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_base_v1_service_proto_goTypes = []interface{}{
(*RLPData)(nil), // 0: base.v1.RLPData
(*Account)(nil), // 1: base.v1.Account
}
var file_base_v1_service_proto_depIdxs = []int32{
0, // 0: base.v1.BaseService.ParseAccount:input_type -> base.v1.RLPData
1, // 1: base.v1.BaseService.ParseAccount:output_type -> base.v1.Account
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_base_v1_service_proto_init() }
func file_base_v1_service_proto_init() {
if File_base_v1_service_proto != nil {
return
}
file_base_v1_request_response_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_base_v1_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_base_v1_service_proto_goTypes,
DependencyIndexes: file_base_v1_service_proto_depIdxs,
}.Build()
File_base_v1_service_proto = out.File
file_base_v1_service_proto_rawDesc = nil
file_base_v1_service_proto_goTypes = nil
file_base_v1_service_proto_depIdxs = nil
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: base/v1/service.proto
package basev1
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
// BaseServiceClient is the client API for BaseService 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 BaseServiceClient interface {
ParseAccount(ctx context.Context, in *RLPData, opts ...grpc.CallOption) (*Account, error)
}
type baseServiceClient struct {
cc grpc.ClientConnInterface
}
func NewBaseServiceClient(cc grpc.ClientConnInterface) BaseServiceClient {
return &baseServiceClient{cc}
}
func (c *baseServiceClient) ParseAccount(ctx context.Context, in *RLPData, opts ...grpc.CallOption) (*Account, error) {
out := new(Account)
err := c.cc.Invoke(ctx, "/base.v1.BaseService/ParseAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BaseServiceServer is the server API for BaseService service.
// All implementations must embed UnimplementedBaseServiceServer
// for forward compatibility
type BaseServiceServer interface {
ParseAccount(context.Context, *RLPData) (*Account, error)
mustEmbedUnimplementedBaseServiceServer()
}
// UnimplementedBaseServiceServer must be embedded to have forward compatible implementations.
type UnimplementedBaseServiceServer struct {
}
func (UnimplementedBaseServiceServer) ParseAccount(context.Context, *RLPData) (*Account, error) {
return nil, status.Errorf(codes.Unimplemented, "method ParseAccount not implemented")
}
func (UnimplementedBaseServiceServer) mustEmbedUnimplementedBaseServiceServer() {}
// UnsafeBaseServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BaseServiceServer will
// result in compilation errors.
type UnsafeBaseServiceServer interface {
mustEmbedUnimplementedBaseServiceServer()
}
func RegisterBaseServiceServer(s grpc.ServiceRegistrar, srv BaseServiceServer) {
s.RegisterService(&BaseService_ServiceDesc, srv)
}
func _BaseService_ParseAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RLPData)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BaseServiceServer).ParseAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/base.v1.BaseService/ParseAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BaseServiceServer).ParseAccount(ctx, req.(*RLPData))
}
return interceptor(ctx, in, info, handler)
}
// BaseService_ServiceDesc is the grpc.ServiceDesc for BaseService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BaseService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "base.v1.BaseService",
HandlerType: (*BaseServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ParseAccount",
Handler: _BaseService_ParseAccount_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "base/v1/service.proto",
}
...@@ -8,9 +8,15 @@ require ( ...@@ -8,9 +8,15 @@ require (
) )
require ( require (
github.com/ghodss/yaml v1.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.5.2 // indirect github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 // indirect golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 // indirect
golang.org/x/text v0.3.3 // indirect golang.org/x/text v0.3.3 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 // indirect
gopkg.in/yaml.v2 v2.2.3 // indirect
) )
This diff is collapsed.
...@@ -5,13 +5,13 @@ import ( ...@@ -5,13 +5,13 @@ import (
"fmt" "fmt"
"net" "net"
metabase "github.com/cmpchain/metaprotocol/gen/proto/go/base/v1" metabase "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/base/v1"
metacrypter "github.com/cmpchain/metaprotocol/gen/proto/go/crypter/v1" metacrypter "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/crypter/v1"
metanebula "github.com/cmpchain/metaprotocol/gen/proto/go/nebula/v1" metanebula "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/nebula/v1"
metap2p "github.com/cmpchain/metaprotocol/gen/proto/go/p2p/v1" metap2p "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/p2p/v1"
metaring "github.com/cmpchain/metaprotocol/gen/proto/go/ring/v1" metaring "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/ring/v1"
metasentry "github.com/cmpchain/metaprotocol/gen/proto/go/sentry/v1" metasentry "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/sentry/v1"
txchecker "github.com/cmpchain/metaprotocol/gen/proto/go/txchecker/v1" txchecker "github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/txchecker/v1"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
...@@ -35,10 +35,6 @@ type TxCheckServer struct { ...@@ -35,10 +35,6 @@ type TxCheckServer struct {
txchecker.UnimplementedTxCheckerServiceServer txchecker.UnimplementedTxCheckerServiceServer
} }
// hello server
type BaseType struct {
metabase.UnimplementedBaseServiceServer
}
type RingServer struct { type RingServer struct {
metaring.UnimplementedRingServiceServer metaring.UnimplementedRingServiceServer
......
...@@ -2,6 +2,7 @@ syntax = "proto3"; ...@@ -2,6 +2,7 @@ syntax = "proto3";
package nebula.v1; package nebula.v1;
import "base/v1/resource.proto"; import "base/v1/resource.proto";
message Tx { message Tx {
base.v1.Address address = 1; base.v1.Address address = 1;
base.v1.Hash hash = 2; base.v1.Hash hash = 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment