types

package
v1.68.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: BSD-3-Clause Imports: 12 Imported by: 16

Documentation

Index

Constants

View Source
const (
	RetrieveBackup = iota + 1
	RetrievePreapre
	RetrievePerform
	RetrieveCancel
)

retrieve

View Source
const (
	RetrieveActionPrepare = 1
	RetrieveActionPerform = 2
	RetrieveActionBackup  = 3
	RetrieveActionCancel  = 4
)

retrieve op

Variables

View Source
var (
	JRPCName  = "Retrieve"
	RetrieveX = "retrieve"

	ExecerRetrieve = []byte(RetrieveX)

	ForkRetriveAssetX = "ForkRetriveAsset"
	ForkRetriveX      = "ForkRetrive"
)

retrieve names

View Source
var (
	ErrRetrieveRepeatAddress   = errors.New("ErrRetrieveRepeatAddress")
	ErrRetrieveDefaultAddress  = errors.New("ErrRetrieveDefaultAddress")
	ErrRetrievePeriodLimit     = errors.New("ErrRetrievePeriodLimit")
	ErrRetrieveAmountLimit     = errors.New("ErrRetrieveAmountLimit")
	ErrRetrieveTimeweightLimit = errors.New("ErrRetrieveTimeweightLimit")
	ErrRetrievePrepareAddress  = errors.New("ErrRetrievePrepareAddress")
	ErrRetrievePerformAddress  = errors.New("ErrRetrievePerformAddress")
	ErrRetrieveCancelAddress   = errors.New("ErrRetrieveCancelAddress")
	ErrRetrieveStatus          = errors.New("ErrRetrieveStatus")
	ErrRetrieveRelateLimit     = errors.New("ErrRetrieveRelateLimit")
	ErrRetrieveRelation        = errors.New("ErrRetrieveRelation")
	ErrRetrieveNoBalance       = errors.New("ErrRetrieveNoBalance")
)

retrieve errors

View Source
var File_retrieve_proto protoreflect.FileDescriptor

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

func RegisterRetrieveServer

func RegisterRetrieveServer(s *grpc.Server, srv RetrieveServer)

Types

type AssetSymbol

type AssetSymbol struct {
	Exec   string `protobuf:"bytes,1,opt,name=exec,proto3" json:"exec,omitempty"`
	Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*AssetSymbol) Descriptor deprecated

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

Deprecated: Use AssetSymbol.ProtoReflect.Descriptor instead.

func (*AssetSymbol) GetExec

func (x *AssetSymbol) GetExec() string

func (*AssetSymbol) GetSymbol

func (x *AssetSymbol) GetSymbol() string

func (*AssetSymbol) ProtoMessage

func (*AssetSymbol) ProtoMessage()

func (*AssetSymbol) ProtoReflect added in v1.65.3

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

func (*AssetSymbol) Reset

func (x *AssetSymbol) Reset()

func (*AssetSymbol) String

func (x *AssetSymbol) String() string

type BackupRetrieve

type BackupRetrieve struct {
	BackupAddress  string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	DelayPeriod    int64  `protobuf:"varint,3,opt,name=delayPeriod,proto3" json:"delayPeriod,omitempty"`
	// contains filtered or unexported fields
}

func (*BackupRetrieve) Descriptor deprecated

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

Deprecated: Use BackupRetrieve.ProtoReflect.Descriptor instead.

func (*BackupRetrieve) GetBackupAddress

func (x *BackupRetrieve) GetBackupAddress() string

func (*BackupRetrieve) GetDefaultAddress

func (x *BackupRetrieve) GetDefaultAddress() string

func (*BackupRetrieve) GetDelayPeriod

func (x *BackupRetrieve) GetDelayPeriod() int64

func (*BackupRetrieve) ProtoMessage

func (*BackupRetrieve) ProtoMessage()

func (*BackupRetrieve) ProtoReflect added in v1.65.3

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

func (*BackupRetrieve) Reset

func (x *BackupRetrieve) Reset()

func (*BackupRetrieve) String

func (x *BackupRetrieve) String() string

type CancelRetrieve

type CancelRetrieve struct {
	BackupAddress  string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelRetrieve) Descriptor deprecated

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

Deprecated: Use CancelRetrieve.ProtoReflect.Descriptor instead.

func (*CancelRetrieve) GetBackupAddress

func (x *CancelRetrieve) GetBackupAddress() string

func (*CancelRetrieve) GetDefaultAddress

func (x *CancelRetrieve) GetDefaultAddress() string

func (*CancelRetrieve) ProtoMessage

func (*CancelRetrieve) ProtoMessage()

func (*CancelRetrieve) ProtoReflect added in v1.65.3

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

func (*CancelRetrieve) Reset

func (x *CancelRetrieve) Reset()

func (*CancelRetrieve) String

func (x *CancelRetrieve) String() string

type PerformRetrieve

type PerformRetrieve struct {
	BackupAddress  string         `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	DefaultAddress string         `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	Assets         []*AssetSymbol `protobuf:"bytes,3,rep,name=assets,proto3" json:"assets,omitempty"`
	// contains filtered or unexported fields
}

func (*PerformRetrieve) Descriptor deprecated

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

Deprecated: Use PerformRetrieve.ProtoReflect.Descriptor instead.

func (*PerformRetrieve) GetAssets

func (x *PerformRetrieve) GetAssets() []*AssetSymbol

func (*PerformRetrieve) GetBackupAddress

func (x *PerformRetrieve) GetBackupAddress() string

func (*PerformRetrieve) GetDefaultAddress

func (x *PerformRetrieve) GetDefaultAddress() string

func (*PerformRetrieve) ProtoMessage

func (*PerformRetrieve) ProtoMessage()

func (*PerformRetrieve) ProtoReflect added in v1.65.3

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

func (*PerformRetrieve) Reset

func (x *PerformRetrieve) Reset()

func (*PerformRetrieve) String

func (x *PerformRetrieve) String() string

type PrepareRetrieve

type PrepareRetrieve struct {
	BackupAddress  string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*PrepareRetrieve) Descriptor deprecated

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

Deprecated: Use PrepareRetrieve.ProtoReflect.Descriptor instead.

func (*PrepareRetrieve) GetBackupAddress

func (x *PrepareRetrieve) GetBackupAddress() string

func (*PrepareRetrieve) GetDefaultAddress

func (x *PrepareRetrieve) GetDefaultAddress() string

func (*PrepareRetrieve) ProtoMessage

func (*PrepareRetrieve) ProtoMessage()

func (*PrepareRetrieve) ProtoReflect added in v1.65.3

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

func (*PrepareRetrieve) Reset

func (x *PrepareRetrieve) Reset()

func (*PrepareRetrieve) String

func (x *PrepareRetrieve) String() string

type ReqRetrieveInfo

type ReqRetrieveInfo struct {
	BackupAddress  string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	AssetExec      string `protobuf:"bytes,3,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
	AssetSymbol    string `protobuf:"bytes,4,opt,name=assetSymbol,proto3" json:"assetSymbol,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqRetrieveInfo) Descriptor deprecated

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

Deprecated: Use ReqRetrieveInfo.ProtoReflect.Descriptor instead.

func (*ReqRetrieveInfo) GetAssetExec

func (x *ReqRetrieveInfo) GetAssetExec() string

func (*ReqRetrieveInfo) GetAssetSymbol

func (x *ReqRetrieveInfo) GetAssetSymbol() string

func (*ReqRetrieveInfo) GetBackupAddress

func (x *ReqRetrieveInfo) GetBackupAddress() string

func (*ReqRetrieveInfo) GetDefaultAddress

func (x *ReqRetrieveInfo) GetDefaultAddress() string

func (*ReqRetrieveInfo) ProtoMessage

func (*ReqRetrieveInfo) ProtoMessage()

func (*ReqRetrieveInfo) ProtoReflect added in v1.65.3

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

func (*ReqRetrieveInfo) Reset

func (x *ReqRetrieveInfo) Reset()

func (*ReqRetrieveInfo) String

func (x *ReqRetrieveInfo) String() string

type Retrieve

type Retrieve struct {

	// used as key
	BackupAddress string          `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	RetPara       []*RetrievePara `protobuf:"bytes,2,rep,name=retPara,proto3" json:"retPara,omitempty"`
	// contains filtered or unexported fields
}

func (*Retrieve) Descriptor deprecated

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

Deprecated: Use Retrieve.ProtoReflect.Descriptor instead.

func (*Retrieve) GetBackupAddress

func (x *Retrieve) GetBackupAddress() string

func (*Retrieve) GetRetPara

func (x *Retrieve) GetRetPara() []*RetrievePara

func (*Retrieve) ProtoMessage

func (*Retrieve) ProtoMessage()

func (*Retrieve) ProtoReflect added in v1.65.3

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

func (*Retrieve) Reset

func (x *Retrieve) Reset()

func (*Retrieve) String

func (x *Retrieve) String() string

type RetrieveAction

type RetrieveAction struct {

	// Types that are assignable to Value:
	//	*RetrieveAction_Prepare
	//	*RetrieveAction_Perform
	//	*RetrieveAction_Backup
	//	*RetrieveAction_Cancel
	Value isRetrieveAction_Value `protobuf_oneof:"value"`
	Ty    int32                  `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrieveAction) Descriptor deprecated

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

Deprecated: Use RetrieveAction.ProtoReflect.Descriptor instead.

func (*RetrieveAction) GetBackup

func (x *RetrieveAction) GetBackup() *BackupRetrieve

func (*RetrieveAction) GetCancel

func (x *RetrieveAction) GetCancel() *CancelRetrieve

func (*RetrieveAction) GetPerform

func (x *RetrieveAction) GetPerform() *PerformRetrieve

func (*RetrieveAction) GetPrepare

func (x *RetrieveAction) GetPrepare() *PrepareRetrieve

func (*RetrieveAction) GetTy

func (x *RetrieveAction) GetTy() int32

func (*RetrieveAction) GetValue

func (m *RetrieveAction) GetValue() isRetrieveAction_Value

func (*RetrieveAction) ProtoMessage

func (*RetrieveAction) ProtoMessage()

func (*RetrieveAction) ProtoReflect added in v1.65.3

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

func (*RetrieveAction) Reset

func (x *RetrieveAction) Reset()

func (*RetrieveAction) String

func (x *RetrieveAction) String() string

type RetrieveAction_Backup

type RetrieveAction_Backup struct {
	Backup *BackupRetrieve `protobuf:"bytes,3,opt,name=backup,proto3,oneof"`
}

type RetrieveAction_Cancel

type RetrieveAction_Cancel struct {
	Cancel *CancelRetrieve `protobuf:"bytes,4,opt,name=cancel,proto3,oneof"`
}

type RetrieveAction_Perform

type RetrieveAction_Perform struct {
	Perform *PerformRetrieve `protobuf:"bytes,2,opt,name=perform,proto3,oneof"`
}

type RetrieveAction_Prepare

type RetrieveAction_Prepare struct {
	Prepare *PrepareRetrieve `protobuf:"bytes,1,opt,name=prepare,proto3,oneof"`
}

type RetrieveClient

type RetrieveClient interface {
	Prepare(ctx context.Context, in *PrepareRetrieve, opts ...grpc.CallOption) (*types.UnsignTx, error)
	Perform(ctx context.Context, in *PerformRetrieve, opts ...grpc.CallOption) (*types.UnsignTx, error)
	Backup(ctx context.Context, in *BackupRetrieve, opts ...grpc.CallOption) (*types.UnsignTx, error)
	Cancel(ctx context.Context, in *CancelRetrieve, opts ...grpc.CallOption) (*types.UnsignTx, error)
}

RetrieveClient is the client API for Retrieve service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRetrieveClient

func NewRetrieveClient(cc grpc.ClientConnInterface) RetrieveClient

type RetrievePara

type RetrievePara struct {
	DefaultAddress string `protobuf:"bytes,1,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	Status         int32  `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	CreateTime     int64  `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime,omitempty"`
	PrepareTime    int64  `protobuf:"varint,4,opt,name=prepareTime,proto3" json:"prepareTime,omitempty"`
	DelayPeriod    int64  `protobuf:"varint,5,opt,name=delayPeriod,proto3" json:"delayPeriod,omitempty"`
	// contains filtered or unexported fields
}

message for retrieve start

func (*RetrievePara) Descriptor deprecated

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

Deprecated: Use RetrievePara.ProtoReflect.Descriptor instead.

func (*RetrievePara) GetCreateTime

func (x *RetrievePara) GetCreateTime() int64

func (*RetrievePara) GetDefaultAddress

func (x *RetrievePara) GetDefaultAddress() string

func (*RetrievePara) GetDelayPeriod

func (x *RetrievePara) GetDelayPeriod() int64

func (*RetrievePara) GetPrepareTime

func (x *RetrievePara) GetPrepareTime() int64

func (*RetrievePara) GetStatus

func (x *RetrievePara) GetStatus() int32

func (*RetrievePara) ProtoMessage

func (*RetrievePara) ProtoMessage()

func (*RetrievePara) ProtoReflect added in v1.65.3

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

func (*RetrievePara) Reset

func (x *RetrievePara) Reset()

func (*RetrievePara) String

func (x *RetrievePara) String() string

type RetrieveQuery

type RetrieveQuery struct {
	BackupAddress  string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
	DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
	DelayPeriod    int64  `protobuf:"varint,3,opt,name=delayPeriod,proto3" json:"delayPeriod,omitempty"`
	PrepareTime    int64  `protobuf:"varint,4,opt,name=prepareTime,proto3" json:"prepareTime,omitempty"`
	RemainTime     int64  `protobuf:"varint,5,opt,name=remainTime,proto3" json:"remainTime,omitempty"`
	Status         int32  `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrieveQuery) Descriptor deprecated

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

Deprecated: Use RetrieveQuery.ProtoReflect.Descriptor instead.

func (*RetrieveQuery) GetBackupAddress

func (x *RetrieveQuery) GetBackupAddress() string

func (*RetrieveQuery) GetDefaultAddress

func (x *RetrieveQuery) GetDefaultAddress() string

func (*RetrieveQuery) GetDelayPeriod

func (x *RetrieveQuery) GetDelayPeriod() int64

func (*RetrieveQuery) GetPrepareTime

func (x *RetrieveQuery) GetPrepareTime() int64

func (*RetrieveQuery) GetRemainTime

func (x *RetrieveQuery) GetRemainTime() int64

func (*RetrieveQuery) GetStatus

func (x *RetrieveQuery) GetStatus() int32

func (*RetrieveQuery) ProtoMessage

func (*RetrieveQuery) ProtoMessage()

func (*RetrieveQuery) ProtoReflect added in v1.65.3

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

func (*RetrieveQuery) Reset

func (x *RetrieveQuery) Reset()

func (*RetrieveQuery) String

func (x *RetrieveQuery) String() string

type RetrieveServer

RetrieveServer is the server API for Retrieve service.

type RetrieveType

type RetrieveType struct {
	types.ExecTypeBase
}

RetrieveType def

func NewType

func NewType(cfg *types.Chain33Config) *RetrieveType

NewType for retrieve

func (RetrieveType) ActionName

func (r RetrieveType) ActionName(tx *types.Transaction) string

ActionName method

func (RetrieveType) Amount

func (r RetrieveType) Amount(tx *types.Transaction) (int64, error)

Amount method

func (RetrieveType) CreateTx

func (r RetrieveType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)

CreateTx method

func (*RetrieveType) GetLogMap

func (r *RetrieveType) GetLogMap() map[int64]*types.LogInfo

GetLogMap method

func (*RetrieveType) GetName

func (r *RetrieveType) GetName() string

GetName method

func (*RetrieveType) GetPayload

func (r *RetrieveType) GetPayload() types.Message

GetPayload method

func (RetrieveType) GetRealToAddr

func (r RetrieveType) GetRealToAddr(tx *types.Transaction) string

GetRealToAddr 避免老的,没有To字段的交易分叉

func (*RetrieveType) GetTypeMap

func (r *RetrieveType) GetTypeMap() map[string]int32

GetTypeMap method

type UnimplementedRetrieveServer

type UnimplementedRetrieveServer struct {
}

UnimplementedRetrieveServer can be embedded to have forward compatible implementations.

func (*UnimplementedRetrieveServer) Backup

func (*UnimplementedRetrieveServer) Cancel

func (*UnimplementedRetrieveServer) Perform

func (*UnimplementedRetrieveServer) Prepare

Jump to

Keyboard shortcuts

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