types

package
v0.0.0-...-9308201 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

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)
)

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

Functions

func RegisterRetrieveServer

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

Types

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BackupRetrieve) Descriptor

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

func (*BackupRetrieve) GetBackupAddress

func (m *BackupRetrieve) GetBackupAddress() string

func (*BackupRetrieve) GetDefaultAddress

func (m *BackupRetrieve) GetDefaultAddress() string

func (*BackupRetrieve) GetDelayPeriod

func (m *BackupRetrieve) GetDelayPeriod() int64

func (*BackupRetrieve) ProtoMessage

func (*BackupRetrieve) ProtoMessage()

func (*BackupRetrieve) Reset

func (m *BackupRetrieve) Reset()

func (*BackupRetrieve) String

func (m *BackupRetrieve) String() string

func (*BackupRetrieve) XXX_DiscardUnknown

func (m *BackupRetrieve) XXX_DiscardUnknown()

func (*BackupRetrieve) XXX_Marshal

func (m *BackupRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupRetrieve) XXX_Merge

func (m *BackupRetrieve) XXX_Merge(src proto.Message)

func (*BackupRetrieve) XXX_Size

func (m *BackupRetrieve) XXX_Size() int

func (*BackupRetrieve) XXX_Unmarshal

func (m *BackupRetrieve) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CancelRetrieve) Descriptor

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

func (*CancelRetrieve) GetBackupAddress

func (m *CancelRetrieve) GetBackupAddress() string

func (*CancelRetrieve) GetDefaultAddress

func (m *CancelRetrieve) GetDefaultAddress() string

func (*CancelRetrieve) ProtoMessage

func (*CancelRetrieve) ProtoMessage()

func (*CancelRetrieve) Reset

func (m *CancelRetrieve) Reset()

func (*CancelRetrieve) String

func (m *CancelRetrieve) String() string

func (*CancelRetrieve) XXX_DiscardUnknown

func (m *CancelRetrieve) XXX_DiscardUnknown()

func (*CancelRetrieve) XXX_Marshal

func (m *CancelRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelRetrieve) XXX_Merge

func (m *CancelRetrieve) XXX_Merge(src proto.Message)

func (*CancelRetrieve) XXX_Size

func (m *CancelRetrieve) XXX_Size() int

func (*CancelRetrieve) XXX_Unmarshal

func (m *CancelRetrieve) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PerformRetrieve) Descriptor

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

func (*PerformRetrieve) GetBackupAddress

func (m *PerformRetrieve) GetBackupAddress() string

func (*PerformRetrieve) GetDefaultAddress

func (m *PerformRetrieve) GetDefaultAddress() string

func (*PerformRetrieve) ProtoMessage

func (*PerformRetrieve) ProtoMessage()

func (*PerformRetrieve) Reset

func (m *PerformRetrieve) Reset()

func (*PerformRetrieve) String

func (m *PerformRetrieve) String() string

func (*PerformRetrieve) XXX_DiscardUnknown

func (m *PerformRetrieve) XXX_DiscardUnknown()

func (*PerformRetrieve) XXX_Marshal

func (m *PerformRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PerformRetrieve) XXX_Merge

func (m *PerformRetrieve) XXX_Merge(src proto.Message)

func (*PerformRetrieve) XXX_Size

func (m *PerformRetrieve) XXX_Size() int

func (*PerformRetrieve) XXX_Unmarshal

func (m *PerformRetrieve) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PrepareRetrieve) Descriptor

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

func (*PrepareRetrieve) GetBackupAddress

func (m *PrepareRetrieve) GetBackupAddress() string

func (*PrepareRetrieve) GetDefaultAddress

func (m *PrepareRetrieve) GetDefaultAddress() string

func (*PrepareRetrieve) ProtoMessage

func (*PrepareRetrieve) ProtoMessage()

func (*PrepareRetrieve) Reset

func (m *PrepareRetrieve) Reset()

func (*PrepareRetrieve) String

func (m *PrepareRetrieve) String() string

func (*PrepareRetrieve) XXX_DiscardUnknown

func (m *PrepareRetrieve) XXX_DiscardUnknown()

func (*PrepareRetrieve) XXX_Marshal

func (m *PrepareRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrepareRetrieve) XXX_Merge

func (m *PrepareRetrieve) XXX_Merge(src proto.Message)

func (*PrepareRetrieve) XXX_Size

func (m *PrepareRetrieve) XXX_Size() int

func (*PrepareRetrieve) XXX_Unmarshal

func (m *PrepareRetrieve) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReqRetrieveInfo) Descriptor

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

func (*ReqRetrieveInfo) GetBackupAddress

func (m *ReqRetrieveInfo) GetBackupAddress() string

func (*ReqRetrieveInfo) GetDefaultAddress

func (m *ReqRetrieveInfo) GetDefaultAddress() string

func (*ReqRetrieveInfo) ProtoMessage

func (*ReqRetrieveInfo) ProtoMessage()

func (*ReqRetrieveInfo) Reset

func (m *ReqRetrieveInfo) Reset()

func (*ReqRetrieveInfo) String

func (m *ReqRetrieveInfo) String() string

func (*ReqRetrieveInfo) XXX_DiscardUnknown

func (m *ReqRetrieveInfo) XXX_DiscardUnknown()

func (*ReqRetrieveInfo) XXX_Marshal

func (m *ReqRetrieveInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqRetrieveInfo) XXX_Merge

func (m *ReqRetrieveInfo) XXX_Merge(src proto.Message)

func (*ReqRetrieveInfo) XXX_Size

func (m *ReqRetrieveInfo) XXX_Size() int

func (*ReqRetrieveInfo) XXX_Unmarshal

func (m *ReqRetrieveInfo) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Retrieve) Descriptor

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

func (*Retrieve) GetBackupAddress

func (m *Retrieve) GetBackupAddress() string

func (*Retrieve) GetRetPara

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

func (*Retrieve) ProtoMessage

func (*Retrieve) ProtoMessage()

func (*Retrieve) Reset

func (m *Retrieve) Reset()

func (*Retrieve) String

func (m *Retrieve) String() string

func (*Retrieve) XXX_DiscardUnknown

func (m *Retrieve) XXX_DiscardUnknown()

func (*Retrieve) XXX_Marshal

func (m *Retrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Retrieve) XXX_Merge

func (m *Retrieve) XXX_Merge(src proto.Message)

func (*Retrieve) XXX_Size

func (m *Retrieve) XXX_Size() int

func (*Retrieve) XXX_Unmarshal

func (m *Retrieve) XXX_Unmarshal(b []byte) error

type RetrieveAction

type RetrieveAction struct {
	// Types that are valid to be assigned 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"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*RetrieveAction) Descriptor

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

func (*RetrieveAction) GetBackup

func (m *RetrieveAction) GetBackup() *BackupRetrieve

func (*RetrieveAction) GetCancel

func (m *RetrieveAction) GetCancel() *CancelRetrieve

func (*RetrieveAction) GetPerform

func (m *RetrieveAction) GetPerform() *PerformRetrieve

func (*RetrieveAction) GetPrepare

func (m *RetrieveAction) GetPrepare() *PrepareRetrieve

func (*RetrieveAction) GetTy

func (m *RetrieveAction) GetTy() int32

func (*RetrieveAction) GetValue

func (m *RetrieveAction) GetValue() isRetrieveAction_Value

func (*RetrieveAction) ProtoMessage

func (*RetrieveAction) ProtoMessage()

func (*RetrieveAction) Reset

func (m *RetrieveAction) Reset()

func (*RetrieveAction) String

func (m *RetrieveAction) String() string

func (*RetrieveAction) XXX_DiscardUnknown

func (m *RetrieveAction) XXX_DiscardUnknown()

func (*RetrieveAction) XXX_Marshal

func (m *RetrieveAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RetrieveAction) XXX_Merge

func (m *RetrieveAction) XXX_Merge(src proto.Message)

func (*RetrieveAction) XXX_OneofFuncs

func (*RetrieveAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*RetrieveAction) XXX_Size

func (m *RetrieveAction) XXX_Size() int

func (*RetrieveAction) XXX_Unmarshal

func (m *RetrieveAction) XXX_Unmarshal(b []byte) error

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.ClientConn) 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

message for retrieve start

func (*RetrievePara) Descriptor

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

func (*RetrievePara) GetCreateTime

func (m *RetrievePara) GetCreateTime() int64

func (*RetrievePara) GetDefaultAddress

func (m *RetrievePara) GetDefaultAddress() string

func (*RetrievePara) GetDelayPeriod

func (m *RetrievePara) GetDelayPeriod() int64

func (*RetrievePara) GetPrepareTime

func (m *RetrievePara) GetPrepareTime() int64

func (*RetrievePara) GetStatus

func (m *RetrievePara) GetStatus() int32

func (*RetrievePara) ProtoMessage

func (*RetrievePara) ProtoMessage()

func (*RetrievePara) Reset

func (m *RetrievePara) Reset()

func (*RetrievePara) String

func (m *RetrievePara) String() string

func (*RetrievePara) XXX_DiscardUnknown

func (m *RetrievePara) XXX_DiscardUnknown()

func (*RetrievePara) XXX_Marshal

func (m *RetrievePara) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RetrievePara) XXX_Merge

func (m *RetrievePara) XXX_Merge(src proto.Message)

func (*RetrievePara) XXX_Size

func (m *RetrievePara) XXX_Size() int

func (*RetrievePara) XXX_Unmarshal

func (m *RetrievePara) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RetrieveQuery) Descriptor

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

func (*RetrieveQuery) GetBackupAddress

func (m *RetrieveQuery) GetBackupAddress() string

func (*RetrieveQuery) GetDefaultAddress

func (m *RetrieveQuery) GetDefaultAddress() string

func (*RetrieveQuery) GetDelayPeriod

func (m *RetrieveQuery) GetDelayPeriod() int64

func (*RetrieveQuery) GetPrepareTime

func (m *RetrieveQuery) GetPrepareTime() int64

func (*RetrieveQuery) GetRemainTime

func (m *RetrieveQuery) GetRemainTime() int64

func (*RetrieveQuery) GetStatus

func (m *RetrieveQuery) GetStatus() int32

func (*RetrieveQuery) ProtoMessage

func (*RetrieveQuery) ProtoMessage()

func (*RetrieveQuery) Reset

func (m *RetrieveQuery) Reset()

func (*RetrieveQuery) String

func (m *RetrieveQuery) String() string

func (*RetrieveQuery) XXX_DiscardUnknown

func (m *RetrieveQuery) XXX_DiscardUnknown()

func (*RetrieveQuery) XXX_Marshal

func (m *RetrieveQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RetrieveQuery) XXX_Merge

func (m *RetrieveQuery) XXX_Merge(src proto.Message)

func (*RetrieveQuery) XXX_Size

func (m *RetrieveQuery) XXX_Size() int

func (*RetrieveQuery) XXX_Unmarshal

func (m *RetrieveQuery) XXX_Unmarshal(b []byte) error

type RetrieveServer

RetrieveServer is the server API for Retrieve service.

type RetrieveType

type RetrieveType struct {
	types.ExecTypeBase
}

RetrieveType def

func NewType

func NewType() *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

Jump to

Keyboard shortcuts

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