Commit c29f9964 authored by harrylee's avatar harrylee

add broker

parent 88dd7aa3
package broker
import (
"github.com/33cn/chain33-sdk-go/crypto"
"github.com/33cn/chain33-sdk-go/types"
"math/rand"
"time"
)
//构造发布跨链交易事件交易
func EmitInterchainEvent(paraName,dstServiceID ,funcName string,args[]string,txType uint64)(*types.Transaction,error){
//目的链ID,固定格式0x000001
//string dstServiceID = 2;
////源链ID,固定格式0x000002
//string srcServiceID = 3;
////跨链交易类型 0表示storage,1表示coins,2表示token......
//uint64 type =4;
////调用方法
//string func = 5;
////参数列表
//repeated string args = 6;
payload := &types.BrokerAction{Ty:TyEmitInterchainEventAction,Value:&types.BrokerAction_EmitInterchainEvent{EmitInterchainEvent:&types.InterchainEvent{DstServiceID:dstServiceID,Type:txType,Func:funcName,Args:args}}}
if paraName == "" {
tx := &types.Transaction{Execer: []byte(BrokerX), Payload: types.Encode(payload), Fee: 1e5, Nonce: rand.Int63n(time.Now().UnixNano()), To: Addr}
return tx, nil
} else {
tx := &types.Transaction{Execer: []byte(paraName + BrokerX), Payload: types.Encode(payload), Fee: 1e5, Nonce: rand.Int63n(time.Now().UnixNano()), To: crypto.GetExecAddress(paraName + BrokerX)}
return tx, nil
}
}
//构造更新Index交易
func UpdateIndex(paraName,srcServiceID,dstServiceID string,sequenceNum,reqType uint64,response *types.Response)(*types.Transaction,error){
////当前链已经处理到的位置
//uint64 sequenceNum = 1;
////目的链服务ID,固定格式0x000001
//string dstServiceID = 2;
////源链ID,固定格式0x000002
//string srcServiceID = 3;
////请求类型 0表示信息流入 1表示信息流出 2表示回滚
//uint64 reqType =4;
////响应信息
//Response response = 5;
payload :=&types.BrokerAction{Ty:TyUpdateIndexAction,Value:&types.BrokerAction_UpdateIndex{UpdateIndex:&types.UpdateIndex{DstServiceID:dstServiceID,SrcServiceID:srcServiceID,ReqType:reqType,SequenceNum:sequenceNum,Response:response}}}
if paraName == "" {
tx := &types.Transaction{Execer: []byte(BrokerX), Payload: types.Encode(payload), Fee: 1e5, Nonce: rand.Int63n(time.Now().UnixNano()), To: Addr}
return tx, nil
} else {
tx := &types.Transaction{Execer: []byte(paraName + BrokerX), Payload: types.Encode(payload), Fee: 1e5, Nonce: rand.Int63n(time.Now().UnixNano()), To: crypto.GetExecAddress(paraName + BrokerX)}
return tx, nil
}
}
\ No newline at end of file
package broker
const (
TyUnknowAction = iota + 100
TyRegisterAction
TyAuditAction
TyUpdateIndexAction
TyEmitInterchainEventAction
//NameRegisterAction = "Register"
//NameAuditAction = "Audit"
//NameUpdateIndexAction = "UpdateIndex"
//NameEmitInterchainEventAction = "EmitInterchainEvent"
FuncNamePollingEvent = "PollingEvent"
FuncNameQueryInnerMeta = "QueryInnerMeta"
FuncNameQueryOutterMeta = "QueryOutterMeta"
FuncNameQueryInMessage = "QueryInMessage"
FuncNameQueryOutMessage = "QueryOutMessage"
)
const BrokerX = "broker"
const Addr = "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
package broker
import (
"encoding/json"
"github.com/33cn/chain33-sdk-go/client"
"github.com/33cn/chain33-sdk-go/types"
)
func PollingEvent(prefix, url string,meta *types.Meta) (*types.InterChainEventList, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.PollingEvent{Meta:meta})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNamePollingEvent,
Payload: jsonraw,
}
var eventList types.InterChainEventList
err = jsonClient.Call("Chain33.Query", query, &eventList)
if err != nil {
return nil, err
}
return &eventList, nil
}
func QueryInnerMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryInnerMeta{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInnerMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryOutterMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryOutterMeta{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInnerMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryOutMessage(prefix, url,inServicePair string,index uint64) (*types.Response, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryOutMessage{InServicePair:inServicePair,SequenceNum:index})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryOutMessage,
Payload: jsonraw,
}
var resp types.Response
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
func QueryInMessage(prefix, url,inServicePair string,index uint64) (*types.Response, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryInMessage{InServicePair:inServicePair,SequenceNum:index})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInMessage,
Payload: jsonraw,
}
var resp types.Response
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
\ No newline at end of file
syntax = "proto3";
package types;
//option go_package = "../types";
message BrokerAction {
oneof value {
Register register = 1;
Audit audit = 2;
InterchainEvent emitInterchainEvent = 3;
UpdateIndex updateIndex =4;
}
int32 ty = 5;
}
// 业务合约注册模型: 0表示正在审核,1表示审核通过,2表示审核失败
message Register {
//业务合约名称
string exectorName = 1;
}
//审核
message Audit {
//业务合约名称
string exectorName = 1;
//状态码 0表示正在审核,1表示审核通过,2表示审核失败
string status = 2;
}
// 轮循事件
message PollingEvent {
Meta meta = 1;
}
// 更新跨链事件索引
message UpdateIndex {
//当前链已经处理到的位置
uint64 sequenceNum = 1;
//目的链服务ID,固定格式0x000001
string dstServiceID = 2;
//源链ID,固定格式0x000002
string srcServiceID = 3;
//请求类型 0表示信息流入 1表示信息流出 2表示回滚
uint64 reqType =4;
//响应信息
Response response = 5;
}
// 跨链事件
message InterchainEvent {
//索引值,这个有系统自动生成
uint64 index = 1;
//目的链ID,固定格式0x000001
string dstServiceID = 2;
//源链ID,固定格式0x000002
string srcServiceID = 3;
//跨链交易类型 0表示storage,1表示coins,2表示token......
uint64 type =4;
//调用方法
string func = 5;
//参数列表
repeated string args = 6;
//状态 0表示开始处理 1表示跨链成功 2表示跨链失败
int32 status = 7;
}
//ReceiptBrokerLog
message ReceiptBrokerLog{
oneof value {
Register register = 1;
Audit audit = 2;
InterchainEvent emitInterchainEvent = 3;
UpdateIndex updateIndex =4;
}
int32 ty = 5;
}
service broker {}
//查询跨出事件
message QueryInterchainEvent{
uint64 index =1;
//目的链ID,固定格式0x000001
string dstServiceID = 2;
//源链ID,固定格式0x000002
string srcServiceID = 3;
}
//跨链事件列表
message InterChainEventList{
repeated InterchainEvent list =1;
}
////根据状态查看跨链事件
//message QueryInterchainEventList {
// //事件状态必填(默认是0,只查询待处理状态的事件)
// int32 status = 1;
// // 主键索引
// string primaryKey = 2;
// //单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
// int32 count = 3;
// // 0降序,1升序,默认降序
// int32 direction = 4;
//}
////跨链事件列表
//message InterchainEventList {
// repeated InterchainEvent list = 1;
// string primaryKey = 2;
//}
message QueryOutterMeta{
}
message QueryInnerMeta{
}
message QueryInMessage{
string inServicePair = 1;
uint64 sequenceNum = 2;
}
message QueryOutMessage{
string inServicePair = 1;
uint64 sequenceNum = 2;
}
message Meta {
map<string,uint64> meta = 1;
}
message Response{
// A status code that should follow the HTTP status codes.
int32 status = 1;
// A message associated with the response code.
string message = 2;
// A payload that can be used to include metadata with this response.
bytes payload = 3;
}
\ No newline at end of file
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: broker.proto
package types
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
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.ProtoPackageIsVersion3 // please upgrade the proto package
//option go_package = "../types";
type BrokerAction struct {
// Types that are valid to be assigned to Value:
// *BrokerAction_Register
// *BrokerAction_Audit
// *BrokerAction_EmitInterchainEvent
// *BrokerAction_UpdateIndex
Value isBrokerAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BrokerAction) Reset() { *m = BrokerAction{} }
func (m *BrokerAction) String() string { return proto.CompactTextString(m) }
func (*BrokerAction) ProtoMessage() {}
func (*BrokerAction) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{0}
}
func (m *BrokerAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BrokerAction.Unmarshal(m, b)
}
func (m *BrokerAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BrokerAction.Marshal(b, m, deterministic)
}
func (m *BrokerAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_BrokerAction.Merge(m, src)
}
func (m *BrokerAction) XXX_Size() int {
return xxx_messageInfo_BrokerAction.Size(m)
}
func (m *BrokerAction) XXX_DiscardUnknown() {
xxx_messageInfo_BrokerAction.DiscardUnknown(m)
}
var xxx_messageInfo_BrokerAction proto.InternalMessageInfo
type isBrokerAction_Value interface {
isBrokerAction_Value()
}
type BrokerAction_Register struct {
Register *Register `protobuf:"bytes,1,opt,name=register,proto3,oneof"`
}
type BrokerAction_Audit struct {
Audit *Audit `protobuf:"bytes,2,opt,name=audit,proto3,oneof"`
}
type BrokerAction_EmitInterchainEvent struct {
EmitInterchainEvent *InterchainEvent `protobuf:"bytes,3,opt,name=emitInterchainEvent,proto3,oneof"`
}
type BrokerAction_UpdateIndex struct {
UpdateIndex *UpdateIndex `protobuf:"bytes,4,opt,name=updateIndex,proto3,oneof"`
}
func (*BrokerAction_Register) isBrokerAction_Value() {}
func (*BrokerAction_Audit) isBrokerAction_Value() {}
func (*BrokerAction_EmitInterchainEvent) isBrokerAction_Value() {}
func (*BrokerAction_UpdateIndex) isBrokerAction_Value() {}
func (m *BrokerAction) GetValue() isBrokerAction_Value {
if m != nil {
return m.Value
}
return nil
}
func (m *BrokerAction) GetRegister() *Register {
if x, ok := m.GetValue().(*BrokerAction_Register); ok {
return x.Register
}
return nil
}
func (m *BrokerAction) GetAudit() *Audit {
if x, ok := m.GetValue().(*BrokerAction_Audit); ok {
return x.Audit
}
return nil
}
func (m *BrokerAction) GetEmitInterchainEvent() *InterchainEvent {
if x, ok := m.GetValue().(*BrokerAction_EmitInterchainEvent); ok {
return x.EmitInterchainEvent
}
return nil
}
func (m *BrokerAction) GetUpdateIndex() *UpdateIndex {
if x, ok := m.GetValue().(*BrokerAction_UpdateIndex); ok {
return x.UpdateIndex
}
return nil
}
func (m *BrokerAction) GetTy() int32 {
if m != nil {
return m.Ty
}
return 0
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*BrokerAction) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*BrokerAction_Register)(nil),
(*BrokerAction_Audit)(nil),
(*BrokerAction_EmitInterchainEvent)(nil),
(*BrokerAction_UpdateIndex)(nil),
}
}
// 业务合约注册模型: 0表示正在审核,1表示审核通过,2表示审核失败
type Register struct {
//业务合约名称
ExectorName string `protobuf:"bytes,1,opt,name=exectorName,proto3" json:"exectorName,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Register) Reset() { *m = Register{} }
func (m *Register) String() string { return proto.CompactTextString(m) }
func (*Register) ProtoMessage() {}
func (*Register) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{1}
}
func (m *Register) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Register.Unmarshal(m, b)
}
func (m *Register) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Register.Marshal(b, m, deterministic)
}
func (m *Register) XXX_Merge(src proto.Message) {
xxx_messageInfo_Register.Merge(m, src)
}
func (m *Register) XXX_Size() int {
return xxx_messageInfo_Register.Size(m)
}
func (m *Register) XXX_DiscardUnknown() {
xxx_messageInfo_Register.DiscardUnknown(m)
}
var xxx_messageInfo_Register proto.InternalMessageInfo
func (m *Register) GetExectorName() string {
if m != nil {
return m.ExectorName
}
return ""
}
//审核
type Audit struct {
//业务合约名称
ExectorName string `protobuf:"bytes,1,opt,name=exectorName,proto3" json:"exectorName,omitempty"`
//状态码 0表示正在审核,1表示审核通过,2表示审核失败
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Audit) Reset() { *m = Audit{} }
func (m *Audit) String() string { return proto.CompactTextString(m) }
func (*Audit) ProtoMessage() {}
func (*Audit) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{2}
}
func (m *Audit) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Audit.Unmarshal(m, b)
}
func (m *Audit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Audit.Marshal(b, m, deterministic)
}
func (m *Audit) XXX_Merge(src proto.Message) {
xxx_messageInfo_Audit.Merge(m, src)
}
func (m *Audit) XXX_Size() int {
return xxx_messageInfo_Audit.Size(m)
}
func (m *Audit) XXX_DiscardUnknown() {
xxx_messageInfo_Audit.DiscardUnknown(m)
}
var xxx_messageInfo_Audit proto.InternalMessageInfo
func (m *Audit) GetExectorName() string {
if m != nil {
return m.ExectorName
}
return ""
}
func (m *Audit) GetStatus() string {
if m != nil {
return m.Status
}
return ""
}
// 轮循事件
type PollingEvent struct {
Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PollingEvent) Reset() { *m = PollingEvent{} }
func (m *PollingEvent) String() string { return proto.CompactTextString(m) }
func (*PollingEvent) ProtoMessage() {}
func (*PollingEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{3}
}
func (m *PollingEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PollingEvent.Unmarshal(m, b)
}
func (m *PollingEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PollingEvent.Marshal(b, m, deterministic)
}
func (m *PollingEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_PollingEvent.Merge(m, src)
}
func (m *PollingEvent) XXX_Size() int {
return xxx_messageInfo_PollingEvent.Size(m)
}
func (m *PollingEvent) XXX_DiscardUnknown() {
xxx_messageInfo_PollingEvent.DiscardUnknown(m)
}
var xxx_messageInfo_PollingEvent proto.InternalMessageInfo
func (m *PollingEvent) GetMeta() *Meta {
if m != nil {
return m.Meta
}
return nil
}
// 更新跨链事件索引
type UpdateIndex struct {
//当前链已经处理到的位置
SequenceNum uint64 `protobuf:"varint,1,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
//目的链服务ID,固定格式0x000001
DstServiceID string `protobuf:"bytes,2,opt,name=dstServiceID,proto3" json:"dstServiceID,omitempty"`
//源链ID,固定格式0x000002
SrcServiceID string `protobuf:"bytes,3,opt,name=srcServiceID,proto3" json:"srcServiceID,omitempty"`
//请求类型 0表示信息流入 1表示信息流出 2表示回滚
ReqType uint64 `protobuf:"varint,4,opt,name=reqType,proto3" json:"reqType,omitempty"`
//响应信息
Response *Response `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateIndex) Reset() { *m = UpdateIndex{} }
func (m *UpdateIndex) String() string { return proto.CompactTextString(m) }
func (*UpdateIndex) ProtoMessage() {}
func (*UpdateIndex) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{4}
}
func (m *UpdateIndex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateIndex.Unmarshal(m, b)
}
func (m *UpdateIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateIndex.Marshal(b, m, deterministic)
}
func (m *UpdateIndex) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateIndex.Merge(m, src)
}
func (m *UpdateIndex) XXX_Size() int {
return xxx_messageInfo_UpdateIndex.Size(m)
}
func (m *UpdateIndex) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateIndex.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateIndex proto.InternalMessageInfo
func (m *UpdateIndex) GetSequenceNum() uint64 {
if m != nil {
return m.SequenceNum
}
return 0
}
func (m *UpdateIndex) GetDstServiceID() string {
if m != nil {
return m.DstServiceID
}
return ""
}
func (m *UpdateIndex) GetSrcServiceID() string {
if m != nil {
return m.SrcServiceID
}
return ""
}
func (m *UpdateIndex) GetReqType() uint64 {
if m != nil {
return m.ReqType
}
return 0
}
func (m *UpdateIndex) GetResponse() *Response {
if m != nil {
return m.Response
}
return nil
}
// 跨链事件
type InterchainEvent struct {
//索引值,这个有系统自动生成
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
//目的链ID,固定格式0x000001
DstServiceID string `protobuf:"bytes,2,opt,name=dstServiceID,proto3" json:"dstServiceID,omitempty"`
//源链ID,固定格式0x000002
SrcServiceID string `protobuf:"bytes,3,opt,name=srcServiceID,proto3" json:"srcServiceID,omitempty"`
//跨链交易类型 0表示storage,1表示coins,2表示token......
Type uint64 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"`
//调用方法
Func string `protobuf:"bytes,5,opt,name=func,proto3" json:"func,omitempty"`
//参数列表
Args []string `protobuf:"bytes,6,rep,name=args,proto3" json:"args,omitempty"`
//状态 0表示开始处理 1表示跨链成功 2表示跨链失败
Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InterchainEvent) Reset() { *m = InterchainEvent{} }
func (m *InterchainEvent) String() string { return proto.CompactTextString(m) }
func (*InterchainEvent) ProtoMessage() {}
func (*InterchainEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{5}
}
func (m *InterchainEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InterchainEvent.Unmarshal(m, b)
}
func (m *InterchainEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InterchainEvent.Marshal(b, m, deterministic)
}
func (m *InterchainEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_InterchainEvent.Merge(m, src)
}
func (m *InterchainEvent) XXX_Size() int {
return xxx_messageInfo_InterchainEvent.Size(m)
}
func (m *InterchainEvent) XXX_DiscardUnknown() {
xxx_messageInfo_InterchainEvent.DiscardUnknown(m)
}
var xxx_messageInfo_InterchainEvent proto.InternalMessageInfo
func (m *InterchainEvent) GetIndex() uint64 {
if m != nil {
return m.Index
}
return 0
}
func (m *InterchainEvent) GetDstServiceID() string {
if m != nil {
return m.DstServiceID
}
return ""
}
func (m *InterchainEvent) GetSrcServiceID() string {
if m != nil {
return m.SrcServiceID
}
return ""
}
func (m *InterchainEvent) GetType() uint64 {
if m != nil {
return m.Type
}
return 0
}
func (m *InterchainEvent) GetFunc() string {
if m != nil {
return m.Func
}
return ""
}
func (m *InterchainEvent) GetArgs() []string {
if m != nil {
return m.Args
}
return nil
}
func (m *InterchainEvent) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
//ReceiptBrokerLog
type ReceiptBrokerLog struct {
// Types that are valid to be assigned to Value:
// *ReceiptBrokerLog_Register
// *ReceiptBrokerLog_Audit
// *ReceiptBrokerLog_EmitInterchainEvent
// *ReceiptBrokerLog_UpdateIndex
Value isReceiptBrokerLog_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceiptBrokerLog) Reset() { *m = ReceiptBrokerLog{} }
func (m *ReceiptBrokerLog) String() string { return proto.CompactTextString(m) }
func (*ReceiptBrokerLog) ProtoMessage() {}
func (*ReceiptBrokerLog) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{6}
}
func (m *ReceiptBrokerLog) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptBrokerLog.Unmarshal(m, b)
}
func (m *ReceiptBrokerLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptBrokerLog.Marshal(b, m, deterministic)
}
func (m *ReceiptBrokerLog) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptBrokerLog.Merge(m, src)
}
func (m *ReceiptBrokerLog) XXX_Size() int {
return xxx_messageInfo_ReceiptBrokerLog.Size(m)
}
func (m *ReceiptBrokerLog) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptBrokerLog.DiscardUnknown(m)
}
var xxx_messageInfo_ReceiptBrokerLog proto.InternalMessageInfo
type isReceiptBrokerLog_Value interface {
isReceiptBrokerLog_Value()
}
type ReceiptBrokerLog_Register struct {
Register *Register `protobuf:"bytes,1,opt,name=register,proto3,oneof"`
}
type ReceiptBrokerLog_Audit struct {
Audit *Audit `protobuf:"bytes,2,opt,name=audit,proto3,oneof"`
}
type ReceiptBrokerLog_EmitInterchainEvent struct {
EmitInterchainEvent *InterchainEvent `protobuf:"bytes,3,opt,name=emitInterchainEvent,proto3,oneof"`
}
type ReceiptBrokerLog_UpdateIndex struct {
UpdateIndex *UpdateIndex `protobuf:"bytes,4,opt,name=updateIndex,proto3,oneof"`
}
func (*ReceiptBrokerLog_Register) isReceiptBrokerLog_Value() {}
func (*ReceiptBrokerLog_Audit) isReceiptBrokerLog_Value() {}
func (*ReceiptBrokerLog_EmitInterchainEvent) isReceiptBrokerLog_Value() {}
func (*ReceiptBrokerLog_UpdateIndex) isReceiptBrokerLog_Value() {}
func (m *ReceiptBrokerLog) GetValue() isReceiptBrokerLog_Value {
if m != nil {
return m.Value
}
return nil
}
func (m *ReceiptBrokerLog) GetRegister() *Register {
if x, ok := m.GetValue().(*ReceiptBrokerLog_Register); ok {
return x.Register
}
return nil
}
func (m *ReceiptBrokerLog) GetAudit() *Audit {
if x, ok := m.GetValue().(*ReceiptBrokerLog_Audit); ok {
return x.Audit
}
return nil
}
func (m *ReceiptBrokerLog) GetEmitInterchainEvent() *InterchainEvent {
if x, ok := m.GetValue().(*ReceiptBrokerLog_EmitInterchainEvent); ok {
return x.EmitInterchainEvent
}
return nil
}
func (m *ReceiptBrokerLog) GetUpdateIndex() *UpdateIndex {
if x, ok := m.GetValue().(*ReceiptBrokerLog_UpdateIndex); ok {
return x.UpdateIndex
}
return nil
}
func (m *ReceiptBrokerLog) GetTy() int32 {
if m != nil {
return m.Ty
}
return 0
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ReceiptBrokerLog) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ReceiptBrokerLog_Register)(nil),
(*ReceiptBrokerLog_Audit)(nil),
(*ReceiptBrokerLog_EmitInterchainEvent)(nil),
(*ReceiptBrokerLog_UpdateIndex)(nil),
}
}
//查询跨出事件
type QueryInterchainEvent struct {
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
//目的链ID,固定格式0x000001
DstServiceID string `protobuf:"bytes,2,opt,name=dstServiceID,proto3" json:"dstServiceID,omitempty"`
//源链ID,固定格式0x000002
SrcServiceID string `protobuf:"bytes,3,opt,name=srcServiceID,proto3" json:"srcServiceID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryInterchainEvent) Reset() { *m = QueryInterchainEvent{} }
func (m *QueryInterchainEvent) String() string { return proto.CompactTextString(m) }
func (*QueryInterchainEvent) ProtoMessage() {}
func (*QueryInterchainEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{7}
}
func (m *QueryInterchainEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInterchainEvent.Unmarshal(m, b)
}
func (m *QueryInterchainEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInterchainEvent.Marshal(b, m, deterministic)
}
func (m *QueryInterchainEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInterchainEvent.Merge(m, src)
}
func (m *QueryInterchainEvent) XXX_Size() int {
return xxx_messageInfo_QueryInterchainEvent.Size(m)
}
func (m *QueryInterchainEvent) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInterchainEvent.DiscardUnknown(m)
}
var xxx_messageInfo_QueryInterchainEvent proto.InternalMessageInfo
func (m *QueryInterchainEvent) GetIndex() uint64 {
if m != nil {
return m.Index
}
return 0
}
func (m *QueryInterchainEvent) GetDstServiceID() string {
if m != nil {
return m.DstServiceID
}
return ""
}
func (m *QueryInterchainEvent) GetSrcServiceID() string {
if m != nil {
return m.SrcServiceID
}
return ""
}
//跨链事件列表
type InterChainEventList struct {
List []*InterchainEvent `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InterChainEventList) Reset() { *m = InterChainEventList{} }
func (m *InterChainEventList) String() string { return proto.CompactTextString(m) }
func (*InterChainEventList) ProtoMessage() {}
func (*InterChainEventList) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{8}
}
func (m *InterChainEventList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InterChainEventList.Unmarshal(m, b)
}
func (m *InterChainEventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InterChainEventList.Marshal(b, m, deterministic)
}
func (m *InterChainEventList) XXX_Merge(src proto.Message) {
xxx_messageInfo_InterChainEventList.Merge(m, src)
}
func (m *InterChainEventList) XXX_Size() int {
return xxx_messageInfo_InterChainEventList.Size(m)
}
func (m *InterChainEventList) XXX_DiscardUnknown() {
xxx_messageInfo_InterChainEventList.DiscardUnknown(m)
}
var xxx_messageInfo_InterChainEventList proto.InternalMessageInfo
func (m *InterChainEventList) GetList() []*InterchainEvent {
if m != nil {
return m.List
}
return nil
}
////根据状态查看跨链事件
//message QueryInterchainEventList {
// //事件状态必填(默认是0,只查询待处理状态的事件)
// int32 status = 1;
// // 主键索引
// string primaryKey = 2;
// //单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
// int32 count = 3;
// // 0降序,1升序,默认降序
// int32 direction = 4;
//}
////跨链事件列表
//message InterchainEventList {
// repeated InterchainEvent list = 1;
// string primaryKey = 2;
//}
type QueryOutterMeta struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryOutterMeta) Reset() { *m = QueryOutterMeta{} }
func (m *QueryOutterMeta) String() string { return proto.CompactTextString(m) }
func (*QueryOutterMeta) ProtoMessage() {}
func (*QueryOutterMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{9}
}
func (m *QueryOutterMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOutterMeta.Unmarshal(m, b)
}
func (m *QueryOutterMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryOutterMeta.Marshal(b, m, deterministic)
}
func (m *QueryOutterMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryOutterMeta.Merge(m, src)
}
func (m *QueryOutterMeta) XXX_Size() int {
return xxx_messageInfo_QueryOutterMeta.Size(m)
}
func (m *QueryOutterMeta) XXX_DiscardUnknown() {
xxx_messageInfo_QueryOutterMeta.DiscardUnknown(m)
}
var xxx_messageInfo_QueryOutterMeta proto.InternalMessageInfo
type QueryInnerMeta struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryInnerMeta) Reset() { *m = QueryInnerMeta{} }
func (m *QueryInnerMeta) String() string { return proto.CompactTextString(m) }
func (*QueryInnerMeta) ProtoMessage() {}
func (*QueryInnerMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{10}
}
func (m *QueryInnerMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInnerMeta.Unmarshal(m, b)
}
func (m *QueryInnerMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInnerMeta.Marshal(b, m, deterministic)
}
func (m *QueryInnerMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInnerMeta.Merge(m, src)
}
func (m *QueryInnerMeta) XXX_Size() int {
return xxx_messageInfo_QueryInnerMeta.Size(m)
}
func (m *QueryInnerMeta) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInnerMeta.DiscardUnknown(m)
}
var xxx_messageInfo_QueryInnerMeta proto.InternalMessageInfo
type QueryInMessage struct {
InServicePair string `protobuf:"bytes,1,opt,name=inServicePair,proto3" json:"inServicePair,omitempty"`
SequenceNum uint64 `protobuf:"varint,2,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryInMessage) Reset() { *m = QueryInMessage{} }
func (m *QueryInMessage) String() string { return proto.CompactTextString(m) }
func (*QueryInMessage) ProtoMessage() {}
func (*QueryInMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{11}
}
func (m *QueryInMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInMessage.Unmarshal(m, b)
}
func (m *QueryInMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInMessage.Marshal(b, m, deterministic)
}
func (m *QueryInMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInMessage.Merge(m, src)
}
func (m *QueryInMessage) XXX_Size() int {
return xxx_messageInfo_QueryInMessage.Size(m)
}
func (m *QueryInMessage) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInMessage.DiscardUnknown(m)
}
var xxx_messageInfo_QueryInMessage proto.InternalMessageInfo
func (m *QueryInMessage) GetInServicePair() string {
if m != nil {
return m.InServicePair
}
return ""
}
func (m *QueryInMessage) GetSequenceNum() uint64 {
if m != nil {
return m.SequenceNum
}
return 0
}
type QueryOutMessage struct {
InServicePair string `protobuf:"bytes,1,opt,name=inServicePair,proto3" json:"inServicePair,omitempty"`
SequenceNum uint64 `protobuf:"varint,2,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryOutMessage) Reset() { *m = QueryOutMessage{} }
func (m *QueryOutMessage) String() string { return proto.CompactTextString(m) }
func (*QueryOutMessage) ProtoMessage() {}
func (*QueryOutMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{12}
}
func (m *QueryOutMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOutMessage.Unmarshal(m, b)
}
func (m *QueryOutMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryOutMessage.Marshal(b, m, deterministic)
}
func (m *QueryOutMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryOutMessage.Merge(m, src)
}
func (m *QueryOutMessage) XXX_Size() int {
return xxx_messageInfo_QueryOutMessage.Size(m)
}
func (m *QueryOutMessage) XXX_DiscardUnknown() {
xxx_messageInfo_QueryOutMessage.DiscardUnknown(m)
}
var xxx_messageInfo_QueryOutMessage proto.InternalMessageInfo
func (m *QueryOutMessage) GetInServicePair() string {
if m != nil {
return m.InServicePair
}
return ""
}
func (m *QueryOutMessage) GetSequenceNum() uint64 {
if m != nil {
return m.SequenceNum
}
return 0
}
type Meta struct {
Meta map[string]uint64 `protobuf:"bytes,1,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Meta) Reset() { *m = Meta{} }
func (m *Meta) String() string { return proto.CompactTextString(m) }
func (*Meta) ProtoMessage() {}
func (*Meta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{13}
}
func (m *Meta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Meta.Unmarshal(m, b)
}
func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Meta.Marshal(b, m, deterministic)
}
func (m *Meta) XXX_Merge(src proto.Message) {
xxx_messageInfo_Meta.Merge(m, src)
}
func (m *Meta) XXX_Size() int {
return xxx_messageInfo_Meta.Size(m)
}
func (m *Meta) XXX_DiscardUnknown() {
xxx_messageInfo_Meta.DiscardUnknown(m)
}
var xxx_messageInfo_Meta proto.InternalMessageInfo
func (m *Meta) GetMeta() map[string]uint64 {
if m != nil {
return m.Meta
}
return nil
}
type Response struct {
// A status code that should follow the HTTP status codes.
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
// A message associated with the response code.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// A payload that can be used to include metadata with this response.
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{14}
}
func (m *Response) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Response.Unmarshal(m, b)
}
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
}
func (m *Response) XXX_Merge(src proto.Message) {
xxx_messageInfo_Response.Merge(m, src)
}
func (m *Response) XXX_Size() int {
return xxx_messageInfo_Response.Size(m)
}
func (m *Response) XXX_DiscardUnknown() {
xxx_messageInfo_Response.DiscardUnknown(m)
}
var xxx_messageInfo_Response proto.InternalMessageInfo
func (m *Response) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
func (m *Response) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func (m *Response) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*BrokerAction)(nil), "types.BrokerAction")
proto.RegisterType((*Register)(nil), "types.Register")
proto.RegisterType((*Audit)(nil), "types.Audit")
proto.RegisterType((*PollingEvent)(nil), "types.PollingEvent")
proto.RegisterType((*UpdateIndex)(nil), "types.UpdateIndex")
proto.RegisterType((*InterchainEvent)(nil), "types.InterchainEvent")
proto.RegisterType((*ReceiptBrokerLog)(nil), "types.ReceiptBrokerLog")
proto.RegisterType((*QueryInterchainEvent)(nil), "types.QueryInterchainEvent")
proto.RegisterType((*InterChainEventList)(nil), "types.InterChainEventList")
proto.RegisterType((*QueryOutterMeta)(nil), "types.QueryOutterMeta")
proto.RegisterType((*QueryInnerMeta)(nil), "types.QueryInnerMeta")
proto.RegisterType((*QueryInMessage)(nil), "types.QueryInMessage")
proto.RegisterType((*QueryOutMessage)(nil), "types.QueryOutMessage")
proto.RegisterType((*Meta)(nil), "types.Meta")
proto.RegisterMapType((map[string]uint64)(nil), "types.Meta.MetaEntry")
proto.RegisterType((*Response)(nil), "types.Response")
}
func init() {
proto.RegisterFile("broker.proto", fileDescriptor_f209535e190f2bed)
}
var fileDescriptor_f209535e190f2bed = []byte{
// 620 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x4d, 0x6f, 0xd3, 0x4c,
0x10, 0x8e, 0x1d, 0x3b, 0x6d, 0x26, 0x79, 0xdb, 0xbe, 0xdb, 0x52, 0x59, 0x5c, 0x88, 0xac, 0x1e,
0xca, 0x57, 0x91, 0x8a, 0x04, 0x88, 0x5b, 0x0a, 0x95, 0x52, 0xd4, 0x96, 0xb2, 0x7c, 0x08, 0x8e,
0x5b, 0x67, 0x08, 0x4b, 0x13, 0xdb, 0xdd, 0x1d, 0x57, 0xf5, 0x8d, 0x03, 0xbf, 0x8b, 0x0b, 0x7f,
0x0c, 0xed, 0x7a, 0x93, 0xb8, 0x01, 0xc4, 0xa5, 0xe2, 0xc2, 0xc5, 0xda, 0x79, 0xf6, 0xd9, 0x9d,
0xaf, 0x7d, 0xc6, 0xd0, 0x3d, 0x55, 0xd9, 0x19, 0xaa, 0x9d, 0x5c, 0x65, 0x94, 0xb1, 0x90, 0xca,
0x1c, 0x75, 0xfc, 0xc5, 0x87, 0xee, 0x9e, 0xc5, 0xfb, 0x09, 0xc9, 0x2c, 0x65, 0xf7, 0x61, 0x59,
0xe1, 0x48, 0x6a, 0x42, 0x15, 0x79, 0x3d, 0x6f, 0xbb, 0xb3, 0xbb, 0xba, 0x63, 0xa9, 0x3b, 0xdc,
0xc1, 0x83, 0x06, 0x9f, 0x51, 0xd8, 0x16, 0x84, 0xa2, 0x18, 0x4a, 0x8a, 0x7c, 0xcb, 0xed, 0x3a,
0x6e, 0xdf, 0x60, 0x83, 0x06, 0xaf, 0x36, 0xd9, 0x0b, 0x58, 0xc7, 0x89, 0xa4, 0x83, 0x94, 0x50,
0x25, 0x9f, 0x84, 0x4c, 0xf7, 0x2f, 0x30, 0xa5, 0xa8, 0x69, 0xcf, 0x6c, 0xba, 0x33, 0x0b, 0xbb,
0x83, 0x06, 0xff, 0xd5, 0x21, 0xf6, 0x08, 0x3a, 0x45, 0x3e, 0x14, 0x84, 0x07, 0xe9, 0x10, 0x2f,
0xa3, 0xc0, 0xde, 0xc1, 0xdc, 0x1d, 0x6f, 0xe7, 0x3b, 0x83, 0x06, 0xaf, 0x13, 0xd9, 0x0a, 0xf8,
0x54, 0x46, 0x61, 0xcf, 0xdb, 0x0e, 0xb9, 0x4f, 0xe5, 0xde, 0x12, 0x84, 0x17, 0x62, 0x5c, 0x60,
0x7c, 0x0f, 0x96, 0xa7, 0xa9, 0xb1, 0x1e, 0x74, 0xf0, 0x12, 0x13, 0xca, 0xd4, 0xb1, 0x98, 0xa0,
0x2d, 0x40, 0x9b, 0xd7, 0xa1, 0xb8, 0x0f, 0xa1, 0x4d, 0xee, 0xcf, 0x54, 0xb6, 0x09, 0x2d, 0x4d,
0x82, 0x0a, 0x6d, 0x8b, 0xd3, 0xe6, 0xce, 0x8a, 0x1f, 0x40, 0xf7, 0x24, 0x1b, 0x8f, 0x65, 0x3a,
0xaa, 0x32, 0xba, 0x05, 0xc1, 0x04, 0x49, 0xb8, 0x72, 0x77, 0x5c, 0x2a, 0x47, 0x48, 0x82, 0xdb,
0x8d, 0xf8, 0x9b, 0x07, 0x9d, 0x5a, 0x66, 0xc6, 0xb5, 0xc6, 0xf3, 0x02, 0xd3, 0x04, 0x8f, 0x8b,
0x89, 0x3d, 0x17, 0xf0, 0x3a, 0xc4, 0x62, 0xe8, 0x0e, 0x35, 0xbd, 0x46, 0x75, 0x21, 0x13, 0x3c,
0x78, 0xee, 0x02, 0xb8, 0x82, 0x19, 0x8e, 0x56, 0xc9, 0x9c, 0xd3, 0xac, 0x38, 0x75, 0x8c, 0x45,
0xb0, 0xa4, 0xf0, 0xfc, 0x4d, 0x99, 0xa3, 0x2d, 0x74, 0xc0, 0xa7, 0x26, 0xbb, 0x6b, 0xde, 0x89,
0xce, 0xb3, 0x54, 0xa3, 0x2d, 0x6a, 0xfd, 0x9d, 0x54, 0x30, 0x9f, 0x11, 0xe2, 0xef, 0x1e, 0xac,
0x2e, 0xf6, 0x71, 0x03, 0x42, 0x69, 0x3b, 0x58, 0x85, 0x5f, 0x19, 0xd7, 0x16, 0x38, 0x83, 0x80,
0xe6, 0x51, 0xdb, 0xb5, 0xc1, 0x3e, 0x16, 0x69, 0x62, 0xc3, 0x6d, 0x73, 0xbb, 0x36, 0x98, 0x50,
0x23, 0x1d, 0xb5, 0x7a, 0x4d, 0x83, 0x99, 0x75, 0xad, 0x6f, 0x4b, 0xf6, 0xb5, 0x4c, 0xfb, 0xf6,
0xd5, 0x87, 0x35, 0x8e, 0x09, 0xca, 0x9c, 0x2a, 0xc9, 0x1c, 0x66, 0xa3, 0x7f, 0x50, 0x2f, 0x04,
0x1b, 0xaf, 0x0a, 0x54, 0xe5, 0x5f, 0x6d, 0x68, 0xdc, 0x87, 0x75, 0xeb, 0xf0, 0xd9, 0xcc, 0xe1,
0xa1, 0xd4, 0xc4, 0xee, 0x40, 0x30, 0x96, 0x9a, 0x22, 0xaf, 0xd7, 0xfc, 0x7d, 0x69, 0xb8, 0xe5,
0xc4, 0xff, 0xc3, 0xaa, 0x0d, 0xfc, 0x65, 0x41, 0x84, 0xca, 0xe8, 0x2b, 0x5e, 0x83, 0x15, 0x97,
0x4b, 0xea, 0x90, 0xf7, 0x33, 0xe4, 0x08, 0xb5, 0x16, 0x23, 0x64, 0x5b, 0xf0, 0x9f, 0x4c, 0x5d,
0x20, 0x27, 0x42, 0x2a, 0x27, 0xf5, 0xab, 0xe0, 0xa2, 0x26, 0xfd, 0x9f, 0x34, 0x19, 0x7f, 0x98,
0xbb, 0xbf, 0xee, 0xab, 0x3f, 0x43, 0x60, 0x82, 0x67, 0xb7, 0x67, 0x93, 0xc4, 0x54, 0xe3, 0x46,
0x6d, 0x92, 0xd8, 0xcf, 0x7e, 0x4a, 0xaa, 0xac, 0x66, 0xca, 0xcd, 0xc7, 0xd0, 0x9e, 0x41, 0x6c,
0x0d, 0x9a, 0x67, 0x58, 0x3a, 0xef, 0x66, 0x69, 0x9a, 0x69, 0xbb, 0xed, 0xbc, 0x55, 0xc6, 0x53,
0xff, 0x89, 0x17, 0xbf, 0x33, 0xe3, 0xb2, 0xd2, 0x75, 0x4d, 0x29, 0x5e, 0x5d, 0x29, 0x66, 0x6c,
0x4c, 0xaa, 0x14, 0x5d, 0xbf, 0xa7, 0xa6, 0xd9, 0xc9, 0x45, 0x39, 0xce, 0xc4, 0xd0, 0x76, 0xb9,
0xcb, 0xa7, 0xe6, 0xee, 0x32, 0xb4, 0xaa, 0x1f, 0xd4, 0x69, 0xcb, 0xfe, 0xa1, 0x1e, 0xfe, 0x08,
0x00, 0x00, 0xff, 0xff, 0x06, 0xca, 0x4f, 0xda, 0xb1, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// BrokerClient is the client API for Broker service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BrokerClient interface {
}
type brokerClient struct {
cc grpc.ClientConnInterface
}
func NewBrokerClient(cc grpc.ClientConnInterface) BrokerClient {
return &brokerClient{cc}
}
// BrokerServer is the server API for Broker service.
type BrokerServer interface {
}
// UnimplementedBrokerServer can be embedded to have forward compatible implementations.
type UnimplementedBrokerServer struct {
}
func RegisterBrokerServer(s *grpc.Server, srv BrokerServer) {
s.RegisterService(&_Broker_serviceDesc, srv)
}
var _Broker_serviceDesc = grpc.ServiceDesc{
ServiceName: "types.broker",
HandlerType: (*BrokerServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{},
Metadata: "broker.proto",
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: cert.proto
package types
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
math "math"
)
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)
)
// 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 that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
// cert合约action
type CertAction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Value:
// Types that are valid to be assigned to Value:
// *CertAction_New
// *CertAction_Update
// *CertAction_Normal
Value isCertAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,4,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *CertAction) Reset() {
*x = CertAction{}
if protoimpl.UnsafeEnabled {
mi := &file_cert_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (m *CertAction) Reset() { *m = CertAction{} }
func (m *CertAction) String() string { return proto.CompactTextString(m) }
func (*CertAction) ProtoMessage() {}
func (*CertAction) Descriptor() ([]byte, []int) {
return fileDescriptor_a142e29cbef9b1cf, []int{0}
}
func (x *CertAction) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *CertAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertAction.Unmarshal(m, b)
}
func (m *CertAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertAction.Marshal(b, m, deterministic)
}
func (m *CertAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertAction.Merge(m, src)
}
func (m *CertAction) XXX_Size() int {
return xxx_messageInfo_CertAction.Size(m)
}
func (m *CertAction) XXX_DiscardUnknown() {
xxx_messageInfo_CertAction.DiscardUnknown(m)
}
func (*CertAction) ProtoMessage() {}
var xxx_messageInfo_CertAction proto.InternalMessageInfo
func (x *CertAction) ProtoReflect() protoreflect.Message {
mi := &file_cert_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
type isCertAction_Value interface {
isCertAction_Value()
}
// Deprecated: Use CertAction.ProtoReflect.Descriptor instead.
func (*CertAction) Descriptor() ([]byte, []int) {
return file_cert_proto_rawDescGZIP(), []int{0}
type CertAction_New struct {
New *CertNew `protobuf:"bytes,1,opt,name=new,proto3,oneof"`
}
type CertAction_Update struct {
Update *CertUpdate `protobuf:"bytes,2,opt,name=update,proto3,oneof"`
}
type CertAction_Normal struct {
Normal *CertNormal `protobuf:"bytes,3,opt,name=normal,proto3,oneof"`
}
func (*CertAction_New) isCertAction_Value() {}
func (*CertAction_Update) isCertAction_Value() {}
func (*CertAction_Normal) isCertAction_Value() {}
func (m *CertAction) GetValue() isCertAction_Value {
if m != nil {
return m.Value
......@@ -78,439 +87,270 @@ func (m *CertAction) GetValue() isCertAction_Value {
return nil
}
func (x *CertAction) GetNew() *CertNew {
if x, ok := x.GetValue().(*CertAction_New); ok {
func (m *CertAction) GetNew() *CertNew {
if x, ok := m.GetValue().(*CertAction_New); ok {
return x.New
}
return nil
}
func (x *CertAction) GetUpdate() *CertUpdate {
if x, ok := x.GetValue().(*CertAction_Update); ok {
func (m *CertAction) GetUpdate() *CertUpdate {
if x, ok := m.GetValue().(*CertAction_Update); ok {
return x.Update
}
return nil
}
func (x *CertAction) GetNormal() *CertNormal {
if x, ok := x.GetValue().(*CertAction_Normal); ok {
func (m *CertAction) GetNormal() *CertNormal {
if x, ok := m.GetValue().(*CertAction_Normal); ok {
return x.Normal
}
return nil
}
func (x *CertAction) GetTy() int32 {
if x != nil {
return x.Ty
func (m *CertAction) GetTy() int32 {
if m != nil {
return m.Ty
}
return 0
}
type isCertAction_Value interface {
isCertAction_Value()
}
type CertAction_New struct {
New *CertNew `protobuf:"bytes,1,opt,name=new,proto3,oneof"`
}
type CertAction_Update struct {
Update *CertUpdate `protobuf:"bytes,2,opt,name=update,proto3,oneof"`
}
type CertAction_Normal struct {
Normal *CertNormal `protobuf:"bytes,3,opt,name=normal,proto3,oneof"`
// XXX_OneofWrappers is for the internal use of the proto package.
func (*CertAction) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*CertAction_New)(nil),
(*CertAction_Update)(nil),
(*CertAction_Normal)(nil),
}
}
func (*CertAction_New) isCertAction_Value() {}
func (*CertAction_Update) isCertAction_Value() {}
func (*CertAction_Normal) isCertAction_Value() {}
// 证书启用
type CertNew struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *CertNew) Reset() {
*x = CertNew{}
if protoimpl.UnsafeEnabled {
mi := &file_cert_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (m *CertNew) Reset() { *m = CertNew{} }
func (m *CertNew) String() string { return proto.CompactTextString(m) }
func (*CertNew) ProtoMessage() {}
func (*CertNew) Descriptor() ([]byte, []int) {
return fileDescriptor_a142e29cbef9b1cf, []int{1}
}
func (x *CertNew) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *CertNew) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertNew.Unmarshal(m, b)
}
func (*CertNew) ProtoMessage() {}
func (x *CertNew) ProtoReflect() protoreflect.Message {
mi := &file_cert_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
func (m *CertNew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertNew.Marshal(b, m, deterministic)
}
// Deprecated: Use CertNew.ProtoReflect.Descriptor instead.
func (*CertNew) Descriptor() ([]byte, []int) {
return file_cert_proto_rawDescGZIP(), []int{1}
func (m *CertNew) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertNew.Merge(m, src)
}
func (m *CertNew) XXX_Size() int {
return xxx_messageInfo_CertNew.Size(m)
}
func (m *CertNew) XXX_DiscardUnknown() {
xxx_messageInfo_CertNew.DiscardUnknown(m)
}
var xxx_messageInfo_CertNew proto.InternalMessageInfo
func (x *CertNew) GetKey() string {
if x != nil {
return x.Key
func (m *CertNew) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (x *CertNew) GetValue() []byte {
if x != nil {
return x.Value
func (m *CertNew) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
// 证书更新
type CertUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *CertUpdate) Reset() {
*x = CertUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_cert_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (m *CertUpdate) Reset() { *m = CertUpdate{} }
func (m *CertUpdate) String() string { return proto.CompactTextString(m) }
func (*CertUpdate) ProtoMessage() {}
func (*CertUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_a142e29cbef9b1cf, []int{2}
}
func (x *CertUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *CertUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertUpdate.Unmarshal(m, b)
}
func (*CertUpdate) ProtoMessage() {}
func (x *CertUpdate) ProtoReflect() protoreflect.Message {
mi := &file_cert_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
func (m *CertUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertUpdate.Marshal(b, m, deterministic)
}
// Deprecated: Use CertUpdate.ProtoReflect.Descriptor instead.
func (*CertUpdate) Descriptor() ([]byte, []int) {
return file_cert_proto_rawDescGZIP(), []int{2}
func (m *CertUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertUpdate.Merge(m, src)
}
func (m *CertUpdate) XXX_Size() int {
return xxx_messageInfo_CertUpdate.Size(m)
}
func (m *CertUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_CertUpdate.DiscardUnknown(m)
}
var xxx_messageInfo_CertUpdate proto.InternalMessageInfo
func (x *CertUpdate) GetKey() string {
if x != nil {
return x.Key
func (m *CertUpdate) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (x *CertUpdate) GetValue() []byte {
if x != nil {
return x.Value
func (m *CertUpdate) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
// 用户证书校验
type CertNormal struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *CertNormal) Reset() {
*x = CertNormal{}
if protoimpl.UnsafeEnabled {
mi := &file_cert_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (m *CertNormal) Reset() { *m = CertNormal{} }
func (m *CertNormal) String() string { return proto.CompactTextString(m) }
func (*CertNormal) ProtoMessage() {}
func (*CertNormal) Descriptor() ([]byte, []int) {
return fileDescriptor_a142e29cbef9b1cf, []int{3}
}
func (x *CertNormal) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *CertNormal) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertNormal.Unmarshal(m, b)
}
func (*CertNormal) ProtoMessage() {}
func (x *CertNormal) ProtoReflect() protoreflect.Message {
mi := &file_cert_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
func (m *CertNormal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertNormal.Marshal(b, m, deterministic)
}
// Deprecated: Use CertNormal.ProtoReflect.Descriptor instead.
func (*CertNormal) Descriptor() ([]byte, []int) {
return file_cert_proto_rawDescGZIP(), []int{3}
func (m *CertNormal) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertNormal.Merge(m, src)
}
func (m *CertNormal) XXX_Size() int {
return xxx_messageInfo_CertNormal.Size(m)
}
func (m *CertNormal) XXX_DiscardUnknown() {
xxx_messageInfo_CertNormal.DiscardUnknown(m)
}
var xxx_messageInfo_CertNormal proto.InternalMessageInfo
func (x *CertNormal) GetKey() string {
if x != nil {
return x.Key
func (m *CertNormal) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (x *CertNormal) GetValue() []byte {
if x != nil {
return x.Value
func (m *CertNormal) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
type CertSignature struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
Cert []byte `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert,omitempty"`
Uid []byte `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *CertSignature) Reset() {
*x = CertSignature{}
if protoimpl.UnsafeEnabled {
mi := &file_cert_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (m *CertSignature) Reset() { *m = CertSignature{} }
func (m *CertSignature) String() string { return proto.CompactTextString(m) }
func (*CertSignature) ProtoMessage() {}
func (*CertSignature) Descriptor() ([]byte, []int) {
return fileDescriptor_a142e29cbef9b1cf, []int{4}
}
func (x *CertSignature) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *CertSignature) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertSignature.Unmarshal(m, b)
}
func (*CertSignature) ProtoMessage() {}
func (x *CertSignature) ProtoReflect() protoreflect.Message {
mi := &file_cert_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
func (m *CertSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertSignature.Marshal(b, m, deterministic)
}
// Deprecated: Use CertSignature.ProtoReflect.Descriptor instead.
func (*CertSignature) Descriptor() ([]byte, []int) {
return file_cert_proto_rawDescGZIP(), []int{4}
func (m *CertSignature) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertSignature.Merge(m, src)
}
func (m *CertSignature) XXX_Size() int {
return xxx_messageInfo_CertSignature.Size(m)
}
func (m *CertSignature) XXX_DiscardUnknown() {
xxx_messageInfo_CertSignature.DiscardUnknown(m)
}
func (x *CertSignature) GetSignature() []byte {
if x != nil {
return x.Signature
var xxx_messageInfo_CertSignature proto.InternalMessageInfo
func (m *CertSignature) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (x *CertSignature) GetCert() []byte {
if x != nil {
return x.Cert
func (m *CertSignature) GetCert() []byte {
if m != nil {
return m.Cert
}
return nil
}
func (x *CertSignature) GetUid() []byte {
if x != nil {
return x.Uid
func (m *CertSignature) GetUid() []byte {
if m != nil {
return m.Uid
}
return nil
}
var File_cert_proto protoreflect.FileDescriptor
var file_cert_proto_rawDesc = []byte{
0x0a, 0x0a, 0x63, 0x65, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79,
0x70, 0x65, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x0a, 0x43, 0x65, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x03, 0x6e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x4e, 0x65, 0x77, 0x48,
0x00, 0x52, 0x03, 0x6e, 0x65, 0x77, 0x12, 0x2b, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43,
0x65, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74,
0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c,
0x12, 0x0e, 0x0a, 0x02, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x74, 0x79,
0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x31, 0x0a, 0x07, 0x43, 0x65, 0x72,
0x74, 0x4e, 0x65, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x34, 0x0a, 0x0a,
0x43, 0x65, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x43, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x43, 0x65, 0x72, 0x74,
0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x75, 0x69, 0x64, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_cert_proto_rawDescOnce sync.Once
file_cert_proto_rawDescData = file_cert_proto_rawDesc
)
func file_cert_proto_rawDescGZIP() []byte {
file_cert_proto_rawDescOnce.Do(func() {
file_cert_proto_rawDescData = protoimpl.X.CompressGZIP(file_cert_proto_rawDescData)
})
return file_cert_proto_rawDescData
}
var file_cert_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_cert_proto_goTypes = []interface{}{
(*CertAction)(nil), // 0: types.CertAction
(*CertNew)(nil), // 1: types.CertNew
(*CertUpdate)(nil), // 2: types.CertUpdate
(*CertNormal)(nil), // 3: types.CertNormal
(*CertSignature)(nil), // 4: types.CertSignature
}
var file_cert_proto_depIdxs = []int32{
1, // 0: types.CertAction.new:type_name -> types.CertNew
2, // 1: types.CertAction.update:type_name -> types.CertUpdate
3, // 2: types.CertAction.normal:type_name -> types.CertNormal
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_cert_proto_init() }
func file_cert_proto_init() {
if File_cert_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cert_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertAction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cert_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertNew); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cert_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cert_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertNormal); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cert_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertSignature); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cert_proto_msgTypes[0].OneofWrappers = []interface{}{
(*CertAction_New)(nil),
(*CertAction_Update)(nil),
(*CertAction_Normal)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cert_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_cert_proto_goTypes,
DependencyIndexes: file_cert_proto_depIdxs,
MessageInfos: file_cert_proto_msgTypes,
}.Build()
File_cert_proto = out.File
file_cert_proto_rawDesc = nil
file_cert_proto_goTypes = nil
file_cert_proto_depIdxs = nil
func init() {
proto.RegisterType((*CertAction)(nil), "types.CertAction")
proto.RegisterType((*CertNew)(nil), "types.CertNew")
proto.RegisterType((*CertUpdate)(nil), "types.CertUpdate")
proto.RegisterType((*CertNormal)(nil), "types.CertNormal")
proto.RegisterType((*CertSignature)(nil), "types.CertSignature")
}
func init() {
proto.RegisterFile("cert.proto", fileDescriptor_a142e29cbef9b1cf)
}
var fileDescriptor_a142e29cbef9b1cf = []byte{
// 250 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x4d, 0x4e, 0xc3, 0x30,
0x10, 0x85, 0x9b, 0xa4, 0x69, 0xd5, 0x21, 0x54, 0x30, 0x62, 0x91, 0x05, 0x8b, 0x2a, 0xab, 0x4a,
0x48, 0x91, 0xf8, 0xb9, 0x00, 0xb0, 0xe9, 0xaa, 0x0b, 0x57, 0x1c, 0x20, 0xb4, 0x23, 0x14, 0x51,
0x92, 0xc8, 0x1d, 0x53, 0xf9, 0x3c, 0x5c, 0x14, 0xcd, 0xd8, 0x08, 0x24, 0x36, 0xb0, 0x7b, 0xf6,
0xfb, 0x9e, 0xfd, 0xec, 0x01, 0xd8, 0x92, 0xe5, 0x7a, 0xb0, 0x3d, 0xf7, 0x98, 0xb3, 0x1f, 0xe8,
0x50, 0x7d, 0x24, 0x00, 0x8f, 0x64, 0xf9, 0x7e, 0xcb, 0x6d, 0xdf, 0x61, 0x05, 0x59, 0x47, 0xc7,
0x32, 0x59, 0x24, 0xcb, 0x93, 0x9b, 0x79, 0xad, 0x4c, 0x2d, 0xfe, 0x9a, 0x8e, 0xab, 0x91, 0x11,
0x13, 0xaf, 0x60, 0xe2, 0x86, 0x5d, 0xc3, 0x54, 0xa6, 0x8a, 0x9d, 0xff, 0xc0, 0x9e, 0xd4, 0x58,
0x8d, 0x4c, 0x44, 0x04, 0xee, 0x7a, 0xfb, 0xd6, 0xec, 0xcb, 0xec, 0x17, 0xbc, 0x56, 0x43, 0xe0,
0x80, 0xe0, 0x1c, 0x52, 0xf6, 0xe5, 0x78, 0x91, 0x2c, 0x73, 0x93, 0xb2, 0x7f, 0x98, 0x42, 0xfe,
0xde, 0xec, 0x1d, 0x55, 0xd7, 0x30, 0x8d, 0x25, 0xf0, 0x0c, 0xb2, 0x57, 0xf2, 0xda, 0x70, 0x66,
0x44, 0xe2, 0x45, 0xa4, 0xb4, 0x4e, 0x61, 0x62, 0xe4, 0x2e, 0xbc, 0x2b, 0x14, 0xfa, 0x6f, 0x2a,
0x34, 0xfb, 0x73, 0x6a, 0x03, 0xa7, 0x92, 0xda, 0xb4, 0x2f, 0x5d, 0xc3, 0xce, 0x12, 0x5e, 0xc2,
0xec, 0xf0, 0xb5, 0xd0, 0x78, 0x61, 0xbe, 0x37, 0x10, 0x61, 0x2c, 0x83, 0x88, 0x67, 0xa8, 0x96,
0xab, 0x5c, 0xbb, 0xd3, 0x4f, 0x2a, 0x8c, 0xc8, 0xe7, 0x89, 0xce, 0xe9, 0xf6, 0x33, 0x00, 0x00,
0xff, 0xff, 0x5d, 0x6d, 0x71, 0x1d, 0xb5, 0x01, 0x00, 0x00,
}
......@@ -6,10 +6,9 @@ package types
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
......
......@@ -456,7 +456,9 @@ func init() {
proto.RegisterType((*LocalDataLog)(nil), "types.localDataLog")
}
func init() { proto.RegisterFile("wasm.proto", fileDescriptor_7d78909ad64e3bbb) }
func init() {
proto.RegisterFile("wasm.proto", fileDescriptor_7d78909ad64e3bbb)
}
var fileDescriptor_7d78909ad64e3bbb = []byte{
// 337 bytes of a gzipped FileDescriptorProto
......
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