unfreeze

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SeqMapping unfreeze_seq/seq/
	SeqMapping = `` /* 128-byte string literal not displayed */

	// TxRecordMapping unfreeze_tx/unfreeze/
	TxRecordMapping = `` /* 2849-byte string literal not displayed */

)

db

View Source
const (
	UnfreezeTxDBX     = "unfreeze_tx"
	UnfreezeTxTableX  = "unfreeze"
	DefaultTable      = "_doc"
	UnfreezeSeqDBX    = "unfreeze_seq"
	UnfreezeSeqTableX = "seq"
	UnfreezeLastSeqX  = "last_seq"
)

unfreeze db

View Source
const (
	ActionTypeCreate    = "create"
	ActionTypeWithdraw  = "withdraw"
	ActionTypeTerminate = "terminate"
)

unfreeze ActionType

Variables

This section is empty.

Functions

func NewConvert

func NewConvert(paraTitle, symbol string, supports []string) db.ExecConvert

NewConvert NewConvert

Types

type ActionCreate

type ActionCreate struct {
	StartTime             int64           `json:"start_time"`
	AssetExec             string          `json:"asset_exec"`
	AssetSymbol           string          `json:"asset_symbol"`
	TotalCount            int64           `json:"total_count"`
	Means                 string          `json:"means"`
	FixAmountOption       *FixAmount      `json:"fix_amount,omitempty"`
	LeftProportionOptioin *LeftProportion `json:"left_proportion,omitempty"`
}

ActionCreate impl

type ActionTerminate

type ActionTerminate struct {
	AmountBack int64 `json:"amount_back"`
	AmountLeft int64 `json:"amount_left"`
}

ActionTerminate impl

type ActionWithdraw

type ActionWithdraw struct {
	Amount int64 `json:"amount"`
}

ActionWithdraw impl

type Convert

type Convert struct {
	// contains filtered or unexported fields
}

Convert tx

func (*Convert) ConvertTx

func (e *Convert) ConvertTx(env *db.TxEnv, op int) ([]db.Record, error)

ConvertTx impl

func (*Convert) InitDB

func (e *Convert) InitDB(cli db.DBCreator) error

InitDB init db

type FixAmount

type FixAmount struct {
	Period int64 `json:"period"`
	Amount int64 ` json:"amount"`
}

FixAmount option

type LeftProportion

type LeftProportion struct {
	Period        int64 `json:"period"`
	TenThousandth int64 `json:"tenThousandth"`
}

LeftProportion option

type Tx

type Tx struct {
	BlockInfo *db.Block `json:"block"`

	// tx info
	Creator     string `json:"creator"`
	Beneficiary string `json:"beneficiary"`
	UnfreezeID  string `json:"unfreeze_id"`
	Success     bool   `json:"success"`
	// tx action
	ActionType string `json:"action_type"`

	// action detail
	Create    *ActionCreate    `json:"create,omitempty"`
	Withdraw  *ActionWithdraw  `json:"withdraw,omitempty"`
	Terminate *ActionTerminate `json:"terminate,omitempty"`
}

Tx tx

type TxRecord

type TxRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

TxRecord 用于db 记录

func (*TxRecord) Value

func (r *TxRecord) Value() []byte

Value impl

Jump to

Keyboard shortcuts

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