chain

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConsensusTyp_name = map[int32]string{
		0: "CSTransaction",
		1: "CSNotifier",
		2: "CSBlockMined",
		3: "CSBlockSyncRequest",
		4: "CSBlockSyncResponse",
	}
	ConsensusTyp_value = map[string]int32{
		"CSTransaction":       0,
		"CSNotifier":          1,
		"CSBlockMined":        2,
		"CSBlockSyncRequest":  3,
		"CSBlockSyncResponse": 4,
	}
)

Enum value maps for ConsensusTyp.

View Source
var (
	GrpOpType_name = map[int32]string{
		0: "GOTypeCreate",
		1: "GOTypeUpdate",
		2: "GOTypeDestroy",
		3: "GOTypeMemAdd",
		4: "GOTypeMemDel",
		5: "GOTypeMemQuit",
	}
	GrpOpType_value = map[string]int32{
		"GOTypeCreate":  0,
		"GOTypeUpdate":  1,
		"GOTypeDestroy": 2,
		"GOTypeMemAdd":  3,
		"GOTypeMemDel":  4,
		"GOTypeMemQuit": 5,
	}
)

Enum value maps for GrpOpType.

View Source
var File_chainApi_proto protoreflect.FileDescriptor
View Source
var File_consensus_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AccountMeta

type AccountMeta struct {
	Addr   string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Nick   string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"`
	Avatar []byte `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountMeta) Descriptor deprecated

func (*AccountMeta) Descriptor() ([]byte, []int)

Deprecated: Use AccountMeta.ProtoReflect.Descriptor instead.

func (*AccountMeta) GetAddr

func (x *AccountMeta) GetAddr() string

func (*AccountMeta) GetAvatar

func (x *AccountMeta) GetAvatar() []byte

func (*AccountMeta) GetNick

func (x *AccountMeta) GetNick() string

func (*AccountMeta) ProtoMessage

func (*AccountMeta) ProtoMessage()

func (*AccountMeta) ProtoReflect

func (x *AccountMeta) ProtoReflect() protoreflect.Message

func (*AccountMeta) Reset

func (x *AccountMeta) Reset()

func (*AccountMeta) String

func (x *AccountMeta) String() string

type ApiRequest

type ApiRequest struct {
	Sig     []byte `protobuf:"bytes,3,opt,name=Sig,proto3" json:"Sig,omitempty"`
	RawData []byte `protobuf:"bytes,2,opt,name=rawData,proto3" json:"rawData,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiRequest) Descriptor deprecated

func (*ApiRequest) Descriptor() ([]byte, []int)

Deprecated: Use ApiRequest.ProtoReflect.Descriptor instead.

func (*ApiRequest) GetRawData

func (x *ApiRequest) GetRawData() []byte

func (*ApiRequest) GetSig

func (x *ApiRequest) GetSig() []byte

func (*ApiRequest) ProtoMessage

func (*ApiRequest) ProtoMessage()

func (*ApiRequest) ProtoReflect

func (x *ApiRequest) ProtoReflect() protoreflect.Message

func (*ApiRequest) Reset

func (x *ApiRequest) Reset()

func (*ApiRequest) String

func (x *ApiRequest) String() string

type ApiResponse

type ApiResponse struct {

	// Types that are assignable to Payload:
	//	*ApiResponse_TxHash
	//	*ApiResponse_ChainData
	Payload isApiResponse_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*ApiResponse) Descriptor deprecated

func (*ApiResponse) Descriptor() ([]byte, []int)

Deprecated: Use ApiResponse.ProtoReflect.Descriptor instead.

func (*ApiResponse) GetChainData

func (x *ApiResponse) GetChainData() []byte

func (*ApiResponse) GetPayload

func (m *ApiResponse) GetPayload() isApiResponse_Payload

func (*ApiResponse) GetTxHash

func (x *ApiResponse) GetTxHash() string

func (*ApiResponse) PackChainData

func (x *ApiResponse) PackChainData(cData []byte) []byte

func (*ApiResponse) PackCommonHash

func (x *ApiResponse) PackCommonHash(hash string) []byte

func (*ApiResponse) ProtoMessage

func (*ApiResponse) ProtoMessage()

func (*ApiResponse) ProtoReflect

func (x *ApiResponse) ProtoReflect() protoreflect.Message

func (*ApiResponse) Reset

func (x *ApiResponse) Reset()

func (*ApiResponse) String

func (x *ApiResponse) String() string

type ApiResponse_ChainData

type ApiResponse_ChainData struct {
	ChainData []byte `protobuf:"bytes,2,opt,name=chainData,proto3,oneof"`
}

type ApiResponse_TxHash

type ApiResponse_TxHash struct {
	TxHash string `protobuf:"bytes,1,opt,name=txHash,proto3,oneof"`
}

type BlockMined

type BlockMined struct {
	Nonce      int64                `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	NewBlkTime int64                `protobuf:"varint,2,opt,name=newBlkTime,proto3" json:"newBlkTime,omitempty"`
	Notifiers  map[string]*Notifier `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BlockMined) Descriptor deprecated

func (*BlockMined) Descriptor() ([]byte, []int)

Deprecated: Use BlockMined.ProtoReflect.Descriptor instead.

func (*BlockMined) GetNewBlkTime

func (x *BlockMined) GetNewBlkTime() int64

func (*BlockMined) GetNonce

func (x *BlockMined) GetNonce() int64

func (*BlockMined) GetNotifiers

func (x *BlockMined) GetNotifiers() map[string]*Notifier

func (*BlockMined) ProtoMessage

func (*BlockMined) ProtoMessage()

func (*BlockMined) ProtoReflect

func (x *BlockMined) ProtoReflect() protoreflect.Message

func (*BlockMined) Reset

func (x *BlockMined) Reset()

func (*BlockMined) String

func (x *BlockMined) String() string

type BlockSyncReq

type BlockSyncReq struct {
	StartNO int64 `protobuf:"varint,1,opt,name=startNO,proto3" json:"startNO,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockSyncReq) Descriptor deprecated

func (*BlockSyncReq) Descriptor() ([]byte, []int)

Deprecated: Use BlockSyncReq.ProtoReflect.Descriptor instead.

func (*BlockSyncReq) GetStartNO

func (x *BlockSyncReq) GetStartNO() int64

func (*BlockSyncReq) ProtoMessage

func (*BlockSyncReq) ProtoMessage()

func (*BlockSyncReq) ProtoReflect

func (x *BlockSyncReq) ProtoReflect() protoreflect.Message

func (*BlockSyncReq) Reset

func (x *BlockSyncReq) Reset()

func (*BlockSyncReq) String

func (x *BlockSyncReq) String() string

type BlockSyncRes

type BlockSyncRes struct {
	HasMore bool             `protobuf:"varint,1,opt,name=hasMore,proto3" json:"hasMore,omitempty"`
	Blocks  map[int64][]byte `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BlockSyncRes) Descriptor deprecated

func (*BlockSyncRes) Descriptor() ([]byte, []int)

Deprecated: Use BlockSyncRes.ProtoReflect.Descriptor instead.

func (*BlockSyncRes) GetBlocks

func (x *BlockSyncRes) GetBlocks() map[int64][]byte

func (*BlockSyncRes) GetHasMore

func (x *BlockSyncRes) GetHasMore() bool

func (*BlockSyncRes) ProtoMessage

func (*BlockSyncRes) ProtoMessage()

func (*BlockSyncRes) ProtoReflect

func (x *BlockSyncRes) ProtoReflect() protoreflect.Message

func (*BlockSyncRes) Reset

func (x *BlockSyncRes) Reset()

func (*BlockSyncRes) String

func (x *BlockSyncRes) String() string

type ConsensusData

type ConsensusData struct {
	Typ ConsensusTyp `protobuf:"varint,1,opt,name=typ,proto3,enum=ConsensusTyp" json:"typ,omitempty"`
	// Types that are assignable to Payload:
	//	*ConsensusData_NotData
	//	*ConsensusData_NewBlock
	//	*ConsensusData_BlkReq
	//	*ConsensusData_BlkRes
	Payload isConsensusData_Payload `protobuf_oneof:"Payload"`
	// contains filtered or unexported fields
}

func (*ConsensusData) Descriptor deprecated

func (*ConsensusData) Descriptor() ([]byte, []int)

Deprecated: Use ConsensusData.ProtoReflect.Descriptor instead.

func (*ConsensusData) GetBlkReq

func (x *ConsensusData) GetBlkReq() *BlockSyncReq

func (*ConsensusData) GetBlkRes

func (x *ConsensusData) GetBlkRes() *BlockSyncRes

func (*ConsensusData) GetNewBlock

func (x *ConsensusData) GetNewBlock() *BlockMined

func (*ConsensusData) GetNotData

func (x *ConsensusData) GetNotData() *Notifier

func (*ConsensusData) GetPayload

func (m *ConsensusData) GetPayload() isConsensusData_Payload

func (*ConsensusData) GetTyp

func (x *ConsensusData) GetTyp() ConsensusTyp

func (*ConsensusData) PackSyncReq

func (x *ConsensusData) PackSyncReq(startNO int64) []byte

func (*ConsensusData) PackSyncRes

func (x *ConsensusData) PackSyncRes(cache map[int64][]byte, hasMore bool) []byte

func (*ConsensusData) ProtoMessage

func (*ConsensusData) ProtoMessage()

func (*ConsensusData) ProtoReflect

func (x *ConsensusData) ProtoReflect() protoreflect.Message

func (*ConsensusData) Reset

func (x *ConsensusData) Reset()

func (*ConsensusData) String

func (x *ConsensusData) String() string

func (*ConsensusData) UnPackSyncReq

func (x *ConsensusData) UnPackSyncReq(data []byte) (*BlockSyncReq, error)

func (*ConsensusData) UnpackSyncRes

func (x *ConsensusData) UnpackSyncRes(data []byte) (*BlockSyncRes, error)

type ConsensusData_BlkReq

type ConsensusData_BlkReq struct {
	BlkReq *BlockSyncReq `protobuf:"bytes,4,opt,name=blkReq,proto3,oneof"`
}

type ConsensusData_BlkRes

type ConsensusData_BlkRes struct {
	BlkRes *BlockSyncRes `protobuf:"bytes,5,opt,name=blkRes,proto3,oneof"`
}

type ConsensusData_NewBlock

type ConsensusData_NewBlock struct {
	NewBlock *BlockMined `protobuf:"bytes,3,opt,name=newBlock,proto3,oneof"`
}

type ConsensusData_NotData

type ConsensusData_NotData struct {
	NotData *Notifier `protobuf:"bytes,2,opt,name=notData,proto3,oneof"`
}

type ConsensusTyp

type ConsensusTyp int32
const (
	ConsensusTyp_CSTransaction       ConsensusTyp = 0
	ConsensusTyp_CSNotifier          ConsensusTyp = 1
	ConsensusTyp_CSBlockMined        ConsensusTyp = 2
	ConsensusTyp_CSBlockSyncRequest  ConsensusTyp = 3
	ConsensusTyp_CSBlockSyncResponse ConsensusTyp = 4
)

func (ConsensusTyp) Descriptor

func (ConsensusTyp) Enum

func (x ConsensusTyp) Enum() *ConsensusTyp

func (ConsensusTyp) EnumDescriptor deprecated

func (ConsensusTyp) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConsensusTyp.Descriptor instead.

func (ConsensusTyp) Number

func (ConsensusTyp) String

func (x ConsensusTyp) String() string

func (ConsensusTyp) Type

type FriendMeta

type FriendMeta struct {
	Addr    string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	FriAddr string `protobuf:"bytes,2,opt,name=friAddr,proto3" json:"friAddr,omitempty"`
	Remarks string `protobuf:"bytes,3,opt,name=remarks,proto3" json:"remarks,omitempty"`
	Alias   string `protobuf:"bytes,5,opt,name=alias,proto3" json:"alias,omitempty"`
	Delete  bool   `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"`
	// contains filtered or unexported fields
}

func (*FriendMeta) Descriptor deprecated

func (*FriendMeta) Descriptor() ([]byte, []int)

Deprecated: Use FriendMeta.ProtoReflect.Descriptor instead.

func (*FriendMeta) GetAddr

func (x *FriendMeta) GetAddr() string

func (*FriendMeta) GetAlias

func (x *FriendMeta) GetAlias() string

func (*FriendMeta) GetDelete

func (x *FriendMeta) GetDelete() bool

func (*FriendMeta) GetFriAddr

func (x *FriendMeta) GetFriAddr() string

func (*FriendMeta) GetRemarks

func (x *FriendMeta) GetRemarks() string

func (*FriendMeta) ProtoMessage

func (*FriendMeta) ProtoMessage()

func (*FriendMeta) ProtoReflect

func (x *FriendMeta) ProtoReflect() protoreflect.Message

func (*FriendMeta) Reset

func (x *FriendMeta) Reset()

func (*FriendMeta) String

func (x *FriendMeta) String() string

type GroupMeta

type GroupMeta struct {
	GrpID    string    `protobuf:"bytes,1,opt,name=grpID,proto3" json:"grpID,omitempty"`
	Operator string    `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
	Name     string    `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	OpTyp    GrpOpType `protobuf:"varint,4,opt,name=opTyp,proto3,enum=GrpOpType" json:"opTyp,omitempty"`
	Members  []string  `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"`
	// contains filtered or unexported fields
}

func (*GroupMeta) Descriptor deprecated

func (*GroupMeta) Descriptor() ([]byte, []int)

Deprecated: Use GroupMeta.ProtoReflect.Descriptor instead.

func (*GroupMeta) GetGrpID

func (x *GroupMeta) GetGrpID() string

func (*GroupMeta) GetMembers

func (x *GroupMeta) GetMembers() []string

func (*GroupMeta) GetName

func (x *GroupMeta) GetName() string

func (*GroupMeta) GetOpTyp

func (x *GroupMeta) GetOpTyp() GrpOpType

func (*GroupMeta) GetOperator

func (x *GroupMeta) GetOperator() string

func (*GroupMeta) HasMember

func (x *GroupMeta) HasMember(uid string) bool

func (*GroupMeta) ProtoMessage

func (*GroupMeta) ProtoMessage()

func (*GroupMeta) ProtoReflect

func (x *GroupMeta) ProtoReflect() protoreflect.Message

func (*GroupMeta) Reset

func (x *GroupMeta) Reset()

func (*GroupMeta) String

func (x *GroupMeta) String() string

type GrpOpType

type GrpOpType int32
const (
	GrpOpType_GOTypeCreate  GrpOpType = 0
	GrpOpType_GOTypeUpdate  GrpOpType = 1
	GrpOpType_GOTypeDestroy GrpOpType = 2
	GrpOpType_GOTypeMemAdd  GrpOpType = 3
	GrpOpType_GOTypeMemDel  GrpOpType = 4
	GrpOpType_GOTypeMemQuit GrpOpType = 5
)

func (GrpOpType) Descriptor

func (GrpOpType) Descriptor() protoreflect.EnumDescriptor

func (GrpOpType) Enum

func (x GrpOpType) Enum() *GrpOpType

func (GrpOpType) EnumDescriptor deprecated

func (GrpOpType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrpOpType.Descriptor instead.

func (GrpOpType) Number

func (x GrpOpType) Number() protoreflect.EnumNumber

func (GrpOpType) String

func (x GrpOpType) String() string

func (GrpOpType) Type

type Notifier

type Notifier struct {
	NTyp int32  `protobuf:"varint,1,opt,name=nTyp,proto3" json:"nTyp,omitempty"`
	Key  string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Types that are assignable to Payload:
	//	*Notifier_AccMeta
	//	*Notifier_GrpMeta
	//	*Notifier_FriMeta
	Payload isNotifier_Payload `protobuf_oneof:"Payload"`
	// contains filtered or unexported fields
}

func (*Notifier) Descriptor deprecated

func (*Notifier) Descriptor() ([]byte, []int)

Deprecated: Use Notifier.ProtoReflect.Descriptor instead.

func (*Notifier) GetAccMeta

func (x *Notifier) GetAccMeta() *AccountMeta

func (*Notifier) GetFriMeta

func (x *Notifier) GetFriMeta() *FriendMeta

func (*Notifier) GetGrpMeta

func (x *Notifier) GetGrpMeta() *GroupMeta

func (*Notifier) GetKey

func (x *Notifier) GetKey() string

func (*Notifier) GetNTyp

func (x *Notifier) GetNTyp() int32

func (*Notifier) GetPayload

func (m *Notifier) GetPayload() isNotifier_Payload

func (*Notifier) ProtoMessage

func (*Notifier) ProtoMessage()

func (*Notifier) ProtoReflect

func (x *Notifier) ProtoReflect() protoreflect.Message

func (*Notifier) Reset

func (x *Notifier) Reset()

func (*Notifier) String

func (x *Notifier) String() string

type Notifier_AccMeta

type Notifier_AccMeta struct {
	AccMeta *AccountMeta `protobuf:"bytes,3,opt,name=accMeta,proto3,oneof"`
}

type Notifier_FriMeta

type Notifier_FriMeta struct {
	FriMeta *FriendMeta `protobuf:"bytes,5,opt,name=friMeta,proto3,oneof"`
}

type Notifier_GrpMeta

type Notifier_GrpMeta struct {
	GrpMeta *GroupMeta `protobuf:"bytes,4,opt,name=grpMeta,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL