Commit e4392844 authored by vicotor's avatar vicotor

add sentry service interface.

parent 79393410
.idea .idea
.vscode .vscode
protocol protocol
.go
This diff is collapsed.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: meta/base/v1/resource.proto
package basev1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// The default Shelf resource representation.
type Shelf struct {
// The unique shelf id.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Indicates when the shelf was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Indicates when the shelf was last updated.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The unique id of the parent example resource.
ExampleId string `protobuf:"bytes,4,opt,name=example_id,json=exampleId,proto3" json:"example_id,omitempty"`
// The display name for the shelf.
DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shelf) Reset() { *m = Shelf{} }
func (m *Shelf) String() string { return proto.CompactTextString(m) }
func (*Shelf) ProtoMessage() {}
func (*Shelf) Descriptor() ([]byte, []int) {
return fileDescriptor_65113dfb5be99422, []int{0}
}
func (m *Shelf) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Shelf.Unmarshal(m, b)
}
func (m *Shelf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Shelf.Marshal(b, m, deterministic)
}
func (m *Shelf) XXX_Merge(src proto.Message) {
xxx_messageInfo_Shelf.Merge(m, src)
}
func (m *Shelf) XXX_Size() int {
return xxx_messageInfo_Shelf.Size(m)
}
func (m *Shelf) XXX_DiscardUnknown() {
xxx_messageInfo_Shelf.DiscardUnknown(m)
}
var xxx_messageInfo_Shelf proto.InternalMessageInfo
func (m *Shelf) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Shelf) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Shelf) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *Shelf) GetExampleId() string {
if m != nil {
return m.ExampleId
}
return ""
}
func (m *Shelf) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func init() {
proto.RegisterType((*Shelf)(nil), "meta.base.v1.Shelf")
}
func init() { proto.RegisterFile("meta/base/v1/resource.proto", fileDescriptor_65113dfb5be99422) }
var fileDescriptor_65113dfb5be99422 = []byte{
// 225 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x31, 0x4f, 0xc3, 0x30,
0x10, 0x85, 0x95, 0x40, 0x2b, 0x7a, 0xa9, 0x18, 0x32, 0x59, 0x45, 0x88, 0xc2, 0xd4, 0xc9, 0x56,
0x60, 0x64, 0x63, 0x63, 0x61, 0x28, 0x4c, 0x2c, 0xd1, 0xa5, 0xbe, 0x16, 0x4b, 0x36, 0xb6, 0x6c,
0x27, 0x82, 0xdf, 0xc9, 0x1f, 0x42, 0xb6, 0x5b, 0x56, 0xd6, 0xf7, 0xbe, 0xef, 0xd9, 0x3a, 0xb8,
0x32, 0x14, 0x51, 0x0c, 0x18, 0x48, 0x4c, 0x9d, 0xf0, 0x14, 0xec, 0xe8, 0x77, 0xc4, 0x9d, 0xb7,
0xd1, 0xb6, 0xcb, 0x54, 0xf2, 0x54, 0xf2, 0xa9, 0x5b, 0xdd, 0x1c, 0xac, 0x3d, 0x68, 0x12, 0xb9,
0x1b, 0xc6, 0xbd, 0x88, 0xca, 0x50, 0x88, 0x68, 0x5c, 0xc1, 0xef, 0x7e, 0x2a, 0x98, 0xbd, 0x7e,
0x90, 0xde, 0xb7, 0x97, 0x50, 0x2b, 0xc9, 0xaa, 0x75, 0xb5, 0x59, 0x6c, 0x6b, 0x25, 0xdb, 0x47,
0x68, 0x76, 0x9e, 0x30, 0x52, 0x9f, 0x1c, 0x56, 0xaf, 0xab, 0x4d, 0x73, 0xbf, 0xe2, 0x65, 0x90,
0x9f, 0x06, 0xf9, 0xdb, 0x69, 0x70, 0x0b, 0x05, 0x4f, 0x41, 0x92, 0x47, 0x27, 0xff, 0xe4, 0xb3,
0xff, 0xe5, 0x82, 0x67, 0xf9, 0x1a, 0x80, 0xbe, 0xd0, 0x38, 0x4d, 0xbd, 0x92, 0xec, 0x3c, 0xff,
0x68, 0x71, 0x4c, 0x9e, 0x65, 0x7b, 0x0b, 0x4b, 0xa9, 0x82, 0xd3, 0xf8, 0xdd, 0x7f, 0xa2, 0x21,
0x36, 0xcb, 0x40, 0x73, 0xcc, 0x5e, 0xd0, 0xd0, 0xd3, 0xc5, 0xfb, 0x3c, 0x5d, 0x60, 0xea, 0x86,
0x79, 0x7e, 0xeb, 0xe1, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xac, 0x35, 0x96, 0x34, 0x01, 0x00,
0x00,
}
This diff is collapsed.
This diff is collapsed.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: meta/crypter/v1/resource.proto
package crypterv1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type CryptType int32
const (
CryptType_CRYPT_TYPE_INVALID CryptType = 0
CryptType_CRYPT_TYPE_SECP256K1 CryptType = 1
)
var CryptType_name = map[int32]string{
0: "CRYPT_TYPE_INVALID",
1: "CRYPT_TYPE_SECP256K1",
}
var CryptType_value = map[string]int32{
"CRYPT_TYPE_INVALID": 0,
"CRYPT_TYPE_SECP256K1": 1,
}
func (x CryptType) String() string {
return proto.EnumName(CryptType_name, int32(x))
}
func (CryptType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_01f1bddfec97ea3e, []int{0}
}
func init() {
proto.RegisterEnum("meta.crypter.v1.CryptType", CryptType_name, CryptType_value)
}
func init() { proto.RegisterFile("meta/crypter/v1/resource.proto", fileDescriptor_01f1bddfec97ea3e) }
var fileDescriptor_01f1bddfec97ea3e = []byte{
// 157 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x4d, 0x2d, 0x49,
0xd4, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0xd4, 0x2f, 0x4a, 0x2d, 0xce,
0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x07, 0xc9, 0xeb, 0x41,
0xe5, 0xf5, 0xca, 0x0c, 0xa5, 0xe4, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xd2, 0x49,
0xa5, 0x69, 0xfa, 0x25, 0x99, 0xb9, 0xa9, 0xc5, 0x25, 0x89, 0xb9, 0x05, 0x10, 0x1d, 0x5a, 0xb6,
0x5c, 0x9c, 0xce, 0x20, 0xe5, 0x21, 0x95, 0x05, 0xa9, 0x42, 0x62, 0x5c, 0x42, 0xce, 0x41, 0x91,
0x01, 0x21, 0xf1, 0x21, 0x91, 0x01, 0xae, 0xf1, 0x9e, 0x7e, 0x61, 0x8e, 0x3e, 0x9e, 0x2e, 0x02,
0x0c, 0x42, 0x12, 0x5c, 0x22, 0x48, 0xe2, 0xc1, 0xae, 0xce, 0x01, 0x46, 0xa6, 0x66, 0xde, 0x86,
0x02, 0x8c, 0x4e, 0xdc, 0x51, 0x9c, 0x50, 0xdb, 0xca, 0x0c, 0x93, 0xd8, 0xc0, 0x46, 0x1a, 0x03,
0x02, 0x00, 0x00, 0xff, 0xff, 0x54, 0x54, 0x92, 0x6c, 0xa6, 0x00, 0x00, 0x00,
}
This diff is collapsed.
This diff is collapsed.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: meta/nebula/v1/resource.proto
package nebulav1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// The default Shelf resource representation.
type Shelf struct {
// The unique shelf id.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Indicates when the shelf was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Indicates when the shelf was last updated.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The unique id of the parent example resource.
ExampleId string `protobuf:"bytes,4,opt,name=example_id,json=exampleId,proto3" json:"example_id,omitempty"`
// The display name for the shelf.
DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shelf) Reset() { *m = Shelf{} }
func (m *Shelf) String() string { return proto.CompactTextString(m) }
func (*Shelf) ProtoMessage() {}
func (*Shelf) Descriptor() ([]byte, []int) {
return fileDescriptor_ff711f70efaef7a0, []int{0}
}
func (m *Shelf) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Shelf.Unmarshal(m, b)
}
func (m *Shelf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Shelf.Marshal(b, m, deterministic)
}
func (m *Shelf) XXX_Merge(src proto.Message) {
xxx_messageInfo_Shelf.Merge(m, src)
}
func (m *Shelf) XXX_Size() int {
return xxx_messageInfo_Shelf.Size(m)
}
func (m *Shelf) XXX_DiscardUnknown() {
xxx_messageInfo_Shelf.DiscardUnknown(m)
}
var xxx_messageInfo_Shelf proto.InternalMessageInfo
func (m *Shelf) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Shelf) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Shelf) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *Shelf) GetExampleId() string {
if m != nil {
return m.ExampleId
}
return ""
}
func (m *Shelf) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func init() {
proto.RegisterType((*Shelf)(nil), "meta.nebula.v1.Shelf")
}
func init() { proto.RegisterFile("meta/nebula/v1/resource.proto", fileDescriptor_ff711f70efaef7a0) }
var fileDescriptor_ff711f70efaef7a0 = []byte{
// 227 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x31, 0x4f, 0xc3, 0x30,
0x10, 0x85, 0x95, 0x40, 0x11, 0xbd, 0xa0, 0x0e, 0x99, 0xac, 0x4a, 0x15, 0x85, 0xa9, 0x93, 0xad,
0xc0, 0xc8, 0xc6, 0xc6, 0xc2, 0x50, 0x98, 0x58, 0xa2, 0x4b, 0x7d, 0x2d, 0x96, 0xec, 0xda, 0x72,
0xec, 0x08, 0x7e, 0x27, 0x7f, 0x08, 0xd9, 0x6e, 0x59, 0x59, 0xdf, 0x7b, 0xdf, 0x67, 0xeb, 0x60,
0x65, 0x28, 0xa0, 0x38, 0xd2, 0x10, 0x35, 0x8a, 0xa9, 0x13, 0x9e, 0x46, 0x1b, 0xfd, 0x8e, 0xb8,
0xf3, 0x36, 0xd8, 0x76, 0x91, 0x6a, 0x5e, 0x6a, 0x3e, 0x75, 0xcb, 0xdb, 0x83, 0xb5, 0x07, 0x4d,
0x22, 0xb7, 0x43, 0xdc, 0x8b, 0xa0, 0x0c, 0x8d, 0x01, 0x8d, 0x2b, 0xc0, 0xfd, 0x4f, 0x05, 0xb3,
0xb7, 0x4f, 0xd2, 0xfb, 0x76, 0x01, 0xb5, 0x92, 0xac, 0x5a, 0x57, 0x9b, 0xf9, 0xb6, 0x56, 0xb2,
0x7d, 0x82, 0x66, 0xe7, 0x09, 0x03, 0xf5, 0x89, 0x61, 0xf5, 0xba, 0xda, 0x34, 0x0f, 0x4b, 0x5e,
0x84, 0xfc, 0x2c, 0xe4, 0xef, 0x67, 0xe1, 0x16, 0xca, 0x3c, 0x05, 0x09, 0x8e, 0x4e, 0xfe, 0xc1,
0x17, 0xff, 0xc3, 0x65, 0x9e, 0xe1, 0x15, 0x00, 0x7d, 0xa1, 0x71, 0x9a, 0x7a, 0x25, 0xd9, 0x65,
0xfe, 0xd1, 0xfc, 0x94, 0xbc, 0xc8, 0xf6, 0x0e, 0x6e, 0xa4, 0x1a, 0x9d, 0xc6, 0xef, 0xfe, 0x88,
0x86, 0xd8, 0x2c, 0x0f, 0x9a, 0x53, 0xf6, 0x8a, 0x86, 0x9e, 0xe1, 0xe3, 0xba, 0xdc, 0x60, 0xea,
0x86, 0xab, 0xfc, 0xda, 0xe3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x29, 0x9c, 0xd0, 0x23, 0x3a,
0x01, 0x00, 0x00,
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: meta/p2p/v1/service.proto
package p2pv1
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("meta/p2p/v1/service.proto", fileDescriptor_97b8545d889c3217) }
var fileDescriptor_97b8545d889c3217 = []byte{
// 196 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x4d, 0x2d, 0x49,
0xd4, 0x2f, 0x30, 0x2a, 0xd0, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0x49, 0xe9, 0x15, 0x18, 0x15, 0xe8, 0x95, 0x19,
0x4a, 0x29, 0x21, 0xab, 0x2b, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x89, 0x2f, 0x4a, 0x2d, 0x2e,
0xc8, 0xcf, 0x2b, 0x86, 0x6a, 0x30, 0xfa, 0xcf, 0xc8, 0xc5, 0x15, 0x60, 0x14, 0x10, 0x0c, 0x31,
0x45, 0xc8, 0x9f, 0x8b, 0xc7, 0xa9, 0x28, 0x3f, 0x31, 0xc5, 0x39, 0xb1, 0xb8, 0xc4, 0xb7, 0x38,
0x5d, 0x48, 0x56, 0x0f, 0xc9, 0x40, 0x3d, 0xb8, 0x54, 0x10, 0xc4, 0x30, 0x29, 0x39, 0x5c, 0xd2,
0x10, 0x3b, 0x94, 0x18, 0x84, 0x3c, 0xb9, 0x38, 0x82, 0x53, 0xf3, 0x52, 0x5c, 0x12, 0x4b, 0x12,
0x85, 0x64, 0x50, 0x54, 0xc3, 0x84, 0x61, 0x66, 0xc9, 0xe2, 0x90, 0x85, 0x1b, 0x15, 0xca, 0xc5,
0x13, 0x5c, 0x9a, 0x54, 0x9c, 0x5c, 0x94, 0x99, 0x94, 0x0a, 0x72, 0x9b, 0x02, 0xaa, 0x06, 0x24,
0x29, 0x98, 0x91, 0x8a, 0x78, 0x54, 0xc0, 0x8c, 0x75, 0x62, 0x8f, 0x62, 0x2d, 0x30, 0x2a, 0x28,
0x33, 0x4c, 0x62, 0x03, 0x87, 0x88, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x7b, 0xc3, 0xd9,
0x5f, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// P2PServiceClient is the client API for P2PService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type P2PServiceClient interface {
BroadCastMsg(ctx context.Context, in *BroadCastRequest, opts ...grpc.CallOption) (*BroadCastResponse, error)
SendData(ctx context.Context, in *SendDataRequest, opts ...grpc.CallOption) (*SendDataResponse, error)
SubscribeMsg(ctx context.Context, in *SubscribeMsgRequest, opts ...grpc.CallOption) (*SubscribeMsgResponse, error)
}
type p2PServiceClient struct {
cc *grpc.ClientConn
}
func NewP2PServiceClient(cc *grpc.ClientConn) P2PServiceClient {
return &p2PServiceClient{cc}
}
func (c *p2PServiceClient) BroadCastMsg(ctx context.Context, in *BroadCastRequest, opts ...grpc.CallOption) (*BroadCastResponse, error) {
out := new(BroadCastResponse)
err := c.cc.Invoke(ctx, "/meta.p2p.v1.P2PService/BroadCastMsg", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *p2PServiceClient) SendData(ctx context.Context, in *SendDataRequest, opts ...grpc.CallOption) (*SendDataResponse, error) {
out := new(SendDataResponse)
err := c.cc.Invoke(ctx, "/meta.p2p.v1.P2PService/SendData", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *p2PServiceClient) SubscribeMsg(ctx context.Context, in *SubscribeMsgRequest, opts ...grpc.CallOption) (*SubscribeMsgResponse, error) {
out := new(SubscribeMsgResponse)
err := c.cc.Invoke(ctx, "/meta.p2p.v1.P2PService/SubscribeMsg", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// P2PServiceServer is the server API for P2PService service.
type P2PServiceServer interface {
BroadCastMsg(context.Context, *BroadCastRequest) (*BroadCastResponse, error)
SendData(context.Context, *SendDataRequest) (*SendDataResponse, error)
SubscribeMsg(context.Context, *SubscribeMsgRequest) (*SubscribeMsgResponse, error)
}
// UnimplementedP2PServiceServer can be embedded to have forward compatible implementations.
type UnimplementedP2PServiceServer struct {
}
func (*UnimplementedP2PServiceServer) BroadCastMsg(ctx context.Context, req *BroadCastRequest) (*BroadCastResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BroadCastMsg not implemented")
}
func (*UnimplementedP2PServiceServer) SendData(ctx context.Context, req *SendDataRequest) (*SendDataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendData not implemented")
}
func (*UnimplementedP2PServiceServer) SubscribeMsg(ctx context.Context, req *SubscribeMsgRequest) (*SubscribeMsgResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubscribeMsg not implemented")
}
func RegisterP2PServiceServer(s *grpc.Server, srv P2PServiceServer) {
s.RegisterService(&_P2PService_serviceDesc, srv)
}
func _P2PService_BroadCastMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BroadCastRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(P2PServiceServer).BroadCastMsg(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.p2p.v1.P2PService/BroadCastMsg",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(P2PServiceServer).BroadCastMsg(ctx, req.(*BroadCastRequest))
}
return interceptor(ctx, in, info, handler)
}
func _P2PService_SendData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendDataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(P2PServiceServer).SendData(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.p2p.v1.P2PService/SendData",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(P2PServiceServer).SendData(ctx, req.(*SendDataRequest))
}
return interceptor(ctx, in, info, handler)
}
func _P2PService_SubscribeMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SubscribeMsgRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(P2PServiceServer).SubscribeMsg(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.p2p.v1.P2PService/SubscribeMsg",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(P2PServiceServer).SubscribeMsg(ctx, req.(*SubscribeMsgRequest))
}
return interceptor(ctx, in, info, handler)
}
var _P2PService_serviceDesc = grpc.ServiceDesc{
ServiceName: "meta.p2p.v1.P2PService",
HandlerType: (*P2PServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "BroadCastMsg",
Handler: _P2PService_BroadCastMsg_Handler,
},
{
MethodName: "SendData",
Handler: _P2PService_SendData_Handler,
},
{
MethodName: "SubscribeMsg",
Handler: _P2PService_SubscribeMsg_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "meta/p2p/v1/service.proto",
}
This diff is collapsed.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: meta/ring/v1/resource.proto
package meta_ring_v1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("meta/ring/v1/resource.proto", fileDescriptor_92ae7458bb171b6e) }
var fileDescriptor_92ae7458bb171b6e = []byte{
// 68 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xce, 0x4d, 0x2d, 0x49,
0xd4, 0x2f, 0xca, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a,
0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x49, 0xea, 0x81, 0x24, 0xf5, 0xca,
0x0c, 0x93, 0xd8, 0xc0, 0x82, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x39, 0xf7, 0x3e,
0x33, 0x00, 0x00, 0x00,
}
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: meta/ring/v1/service.proto
package meta_ring_v1
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("meta/ring/v1/service.proto", fileDescriptor_e770cde54344f3d9) }
var fileDescriptor_e770cde54344f3d9 = []byte{
// 173 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x4d, 0x2d, 0x49,
0xd4, 0x2f, 0xca, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e,
0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0xc9, 0xe9, 0x81, 0xe4, 0xf4, 0xca, 0x0c,
0xa5, 0x94, 0x51, 0x54, 0x16, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0xc4, 0x17, 0xa5, 0x16, 0x17,
0xe4, 0xe7, 0x15, 0x43, 0xb5, 0x18, 0x5d, 0x60, 0xe4, 0xe2, 0x75, 0x2d, 0xc9, 0x08, 0x2a, 0x48,
0x0e, 0x86, 0x18, 0x25, 0x94, 0xc9, 0x25, 0x14, 0x9c, 0x9a, 0x97, 0x12, 0x94, 0x58, 0x1e, 0x52,
0x94, 0x98, 0x57, 0x9c, 0x98, 0x5c, 0x92, 0x99, 0x9f, 0x27, 0xa4, 0xae, 0x87, 0x6c, 0xb6, 0x1e,
0xa6, 0x8a, 0x20, 0x88, 0xf9, 0x52, 0x1a, 0x84, 0x15, 0x42, 0x1c, 0xa0, 0xc4, 0x20, 0x14, 0xc2,
0xc5, 0xed, 0x5a, 0x5c, 0x92, 0x99, 0x9b, 0x58, 0x92, 0xea, 0x9e, 0x58, 0x2c, 0xa4, 0x80, 0xaa,
0x15, 0x49, 0x0a, 0x66, 0xb8, 0x22, 0x1e, 0x15, 0x30, 0x53, 0x93, 0xd8, 0xc0, 0x3e, 0x33, 0x06,
0x04, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xa8, 0x28, 0x74, 0x2a, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// EthRpcServiceClient is the client API for EthRpcService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EthRpcServiceClient interface {
SendRawTransaction(ctx context.Context, in *SendRawTransactionRequest, opts ...grpc.CallOption) (*SendRawTransactionResponse, error)
EstimateGas(ctx context.Context, in *EstimateGasRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error)
}
type ethRpcServiceClient struct {
cc *grpc.ClientConn
}
func NewEthRpcServiceClient(cc *grpc.ClientConn) EthRpcServiceClient {
return &ethRpcServiceClient{cc}
}
func (c *ethRpcServiceClient) SendRawTransaction(ctx context.Context, in *SendRawTransactionRequest, opts ...grpc.CallOption) (*SendRawTransactionResponse, error) {
out := new(SendRawTransactionResponse)
err := c.cc.Invoke(ctx, "/meta.ring.v1.EthRpcService/SendRawTransaction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ethRpcServiceClient) EstimateGas(ctx context.Context, in *EstimateGasRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) {
out := new(EstimateGasResponse)
err := c.cc.Invoke(ctx, "/meta.ring.v1.EthRpcService/EstimateGas", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EthRpcServiceServer is the server API for EthRpcService service.
type EthRpcServiceServer interface {
SendRawTransaction(context.Context, *SendRawTransactionRequest) (*SendRawTransactionResponse, error)
EstimateGas(context.Context, *EstimateGasRequest) (*EstimateGasResponse, error)
}
// UnimplementedEthRpcServiceServer can be embedded to have forward compatible implementations.
type UnimplementedEthRpcServiceServer struct {
}
func (*UnimplementedEthRpcServiceServer) SendRawTransaction(ctx context.Context, req *SendRawTransactionRequest) (*SendRawTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendRawTransaction not implemented")
}
func (*UnimplementedEthRpcServiceServer) EstimateGas(ctx context.Context, req *EstimateGasRequest) (*EstimateGasResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method EstimateGas not implemented")
}
func RegisterEthRpcServiceServer(s *grpc.Server, srv EthRpcServiceServer) {
s.RegisterService(&_EthRpcService_serviceDesc, srv)
}
func _EthRpcService_SendRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendRawTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EthRpcServiceServer).SendRawTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.ring.v1.EthRpcService/SendRawTransaction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EthRpcServiceServer).SendRawTransaction(ctx, req.(*SendRawTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EthRpcService_EstimateGas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EstimateGasRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EthRpcServiceServer).EstimateGas(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.ring.v1.EthRpcService/EstimateGas",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EthRpcServiceServer).EstimateGas(ctx, req.(*EstimateGasRequest))
}
return interceptor(ctx, in, info, handler)
}
var _EthRpcService_serviceDesc = grpc.ServiceDesc{
ServiceName: "meta.ring.v1.EthRpcService",
HandlerType: (*EthRpcServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SendRawTransaction",
Handler: _EthRpcService_SendRawTransaction_Handler,
},
{
MethodName: "EstimateGas",
Handler: _EthRpcService_EstimateGas_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "meta/ring/v1/service.proto",
}
This diff is collapsed.
...@@ -21,76 +21,64 @@ message ListShelvesRequest { ...@@ -21,76 +21,64 @@ message ListShelvesRequest {
string example_id = 5; string example_id = 5;
} }
// The standard List response definition. message LimitInfoRequest {
message ListShelvesResponse { // block height to get limit info from contract.
// The retrieved list of shelves. uint32 height = 1;
repeated Shelf shelves = 1;
// True if more shelves are available.
bool next = 2;
} }
// The standard BatchGet request definition. message LimitInfoResponse {
message BatchGetShelvesRequest { // tx count in one batchTx.
// The ids of the requested shelves. uint32 batch_tx_count = 1;
repeated string ids = 1; // batchTx count in one block.
uint32 block_batch_count = 2;
} }
// The standard BatchGet response definition. message CommitBatchTxRequest {
message BatchGetShelvesResponse { bytes txdata = 1;
// The retrieved shelves.
repeated Shelf shelves = 1;
} }
// The standard Get request definition. message CommitBatchTxResponse {
message GetShelfRequest { string txhash = 1;
// The id of the requested shelf. string err_msg = 2;
string id = 1;
} }
// The standard Get response definition. message GetReceiptRequest {
message GetShelfResponse { string txhash = 1;
// The retrieved shelf.
Shelf shelf = 1;
} }
// The standard Create request definition. message GetReceiptResponse {
message CreateShelfRequest { bytes receipt_data = 1;
// The shelf to create. string err_msg = 2;
Shelf shelf = 1;
// The unique id of the parent example where the shelf is to be created.
string example_id = 2;
} }
// The standard Create response definition. message GetNewBlockRequest {
message CreateShelfResponse { uint32 last_block = 1;
// The created shelf.
Shelf shelf = 1;
} }
// The standard Update request definition. message GetNewBlockResponse {
message UpdateShelfRequest { uint32 block_num = 1;
// The id of the shelf to be updated. uint64 block_time = 2;
string id = 1; string batch_txs = 3;
// The shelf which replaces the shelf on the server.
Shelf shelf = 2;
// The update mask applied to the shelf. See https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
google.protobuf.FieldMask update_mask = 3;
} }
// The standard Update response definition. message CommitBlockRequest {
message UpdateShelfResponse { string validator = 1;
// The updated shelf. uint64 block_number = 2;
Shelf shelf = 1; bytes block_data = 3;
} }
// The standard Delete request definition. message CommitBlockResponse {
message DeleteShelfRequest { string txhash = 1;
// The id of the shelf to be deleted. string err_msg = 2;
string id = 1;
} }
// The standard Delete response definition. message GetConsensusedBlockRequest {
message DeleteShelfResponse { uint64 block_number = 1;
// The deleted shelf.
Shelf shelf = 1;
} }
message GetConsensusedBlockResponse {
uint64 block_number = 1;
bytes block_data = 2;
}
This diff is collapsed.
...@@ -5,7 +5,7 @@ option go_package = "sentryv1"; ...@@ -5,7 +5,7 @@ option go_package = "sentryv1";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
// The default Shelf resource representation. // The default Shelf resource representation.
message Shelf { message Example {
// The unique shelf id. // The unique shelf id.
string id = 1; string id = 1;
// Indicates when the shelf was created. // Indicates when the shelf was created.
...@@ -16,4 +16,4 @@ message Shelf { ...@@ -16,4 +16,4 @@ message Shelf {
string example_id = 4; string example_id = 4;
// The display name for the shelf. // The display name for the shelf.
string display_name = 5; string display_name = 5;
} }
\ No newline at end of file
This diff is collapsed.
...@@ -4,14 +4,18 @@ package meta.sentry.v1; ...@@ -4,14 +4,18 @@ package meta.sentry.v1;
option go_package = "sentryv1"; option go_package = "sentryv1";
import "meta/sentry/v1/request_response.proto"; import "meta/sentry/v1/request_response.proto";
// SentryService methods for other module. // SentryService methods for other module.
service SentryService { service SentryService {
// LimitInfo get latest param for make batch tx. // LimitInfo get latest param for make batch tx.
rpc LimitInfo() returns() {} rpc LimitInfo(LimitInfoRequest) returns(LimitInfoResponse) {}
rpc CommitBatchTx() returns() {} // CommitBatchTx used to commit batch tx to tx-sort-network
rpc GetReceipt() returns() {} rpc CommitBatchTx(CommitBatchTxRequest) returns(CommitBatchTxResponse) {}
rpc GetNewBlock() returns() {} // GetTxReceipt from tx-sort-network with txhash
rpc CommitBlockState() returns() {} rpc GetReceipt(GetReceiptRequest) returns(GetReceiptResponse) {}
rpc GetConsensusedBlock() returns() {} // GetNewBlock used for nebula get new virtual block info from contract with lastblock.
} rpc GetNewBlock(GetNewBlockRequest) returns(GetNewBlockResponse) {}
\ No newline at end of file // CommitBlock used for nebula commit new block and state info to contract.
rpc CommitBlock(CommitBlockRequest) returns(CommitBlockResponse) {}
// GetConsensusedBlock used for nebula get special block consensus result.
rpc GetConsensusedBlock(GetConsensusedBlockRequest) returns(GetConsensusedBlockResponse) {}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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