Documentation ¶
Index ¶
- func UpdateSlice[T any](a T, target []T)
- type Account
- type BaseTestOperationProcessorNoItem
- func (t *BaseTestOperationProcessorNoItem[To]) IsValid()
- func (t *BaseTestOperationProcessorNoItem[To]) LoadOperation(fileName string) *BaseTestOperationProcessorNoItem[To]
- func (t *BaseTestOperationProcessorNoItem[To]) Print(fileName string) *BaseTestOperationProcessorNoItem[To]
- func (t *BaseTestOperationProcessorNoItem[To]) RunPreProcess()
- func (t *BaseTestOperationProcessorNoItem[To]) RunProcess()
- func (t *BaseTestOperationProcessorNoItem[To]) SetAccount(priv string, amount int64, cid types.CurrencyID, target []Account, ...) *BaseTestOperationProcessorNoItem[To]
- func (t *BaseTestOperationProcessorNoItem[To]) SetAmount(am int64, cid types.CurrencyID, target []types.Amount) *BaseTestOperationProcessorNoItem[To]
- func (t *BaseTestOperationProcessorNoItem[To]) SetContractAccount(owner base.Address, priv string, amount int64, cid types.CurrencyID, ...) *BaseTestOperationProcessorNoItem[To]
- func (t *BaseTestOperationProcessorNoItem[To]) SetCurrency(cid string, am int64, addr base.Address, target []types.CurrencyID, ...) *BaseTestOperationProcessorNoItem[To]
- type BaseTestOperationProcessorWithItem
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) IsValid()
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) Items() []Tim
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) LoadOperation(fileName string) *BaseTestOperationProcessorWithItem[To, Tim]
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) Print(fileName string) *BaseTestOperationProcessorWithItem[To, Tim]
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) RunPreProcess()
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) RunProcess()
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetAccount(priv string, amount int64, cid types.CurrencyID, target []Account, ...) *BaseTestOperationProcessorWithItem[To, Tim]
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetAmount(am int64, cid types.CurrencyID, target []types.Amount) *BaseTestOperationProcessorWithItem[To, Tim]
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetContractAccount(owner base.Address, priv string, amount int64, cid types.CurrencyID, ...) *BaseTestOperationProcessorWithItem[To, Tim]
- func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetCurrency(cid string, am int64, addr base.Address, target []types.CurrencyID, ...) *BaseTestOperationProcessorWithItem[To, Tim]
- type MockStateGetter
- type TestOperationProcessorNoItem
- type TestOperationProcessorWithItem
- type TestProcessor
- func (t *TestProcessor) Decode(fileName string)
- func (t *TestProcessor) Error() error
- func (t *TestProcessor) LoadOperation(fileName string) base.Operation
- func (t *TestProcessor) NewPrivateKey(seed string) string
- func (t *TestProcessor) NewTestAccount(priv string) (types.Account, base.Address, types.AccountKeys, base.Privatekey)
- func (t *TestProcessor) NewTestAccountState(priv string, inState bool) (base.Address, types.AccountKeys, base.Privatekey)
- func (t *TestProcessor) NewTestBalanceState(addr base.Address, cid types.CurrencyID, am int64, inState bool)
- func (t *TestProcessor) NewTestContractAccountState(owner base.Address, priv string, inState bool) (base.Address, base.Privatekey)
- func (t *TestProcessor) NewTestCurrencyState(cid string, addr base.Address, inState bool) types.CurrencyID
- func (t *TestProcessor) NewTestSuffrageState(priv, node string, inState bool) (base.Address, base.Privatekey)
- func (t *TestProcessor) Print(fileName string, i interface{})
- func (t *TestProcessor) SetAccount(priv string, amount int64, cid types.CurrencyID, target []Account, ...)
- func (t *TestProcessor) SetAmount(am int64, cid types.CurrencyID, target []types.Amount)
- func (t *TestProcessor) SetContractAccount(owner base.Address, priv string, amount int64, cid types.CurrencyID, ...)
- func (t *TestProcessor) SetCurrency(cid string, am int64, receiverPriv string, target *types.CurrencyID, ...)
- func (t *TestProcessor) SetCurrency2(cid string, am int64, addr base.Address, target []types.CurrencyID, ...)
- func (t *TestProcessor) SetState(state base.State, inState bool)
- func (t *TestProcessor) Setup(getter *MockStateGetter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateSlice ¶
func UpdateSlice[T any](a T, target []T)
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) Keys ¶
func (a *Account) Keys() types.AccountKeys
func (*Account) Priv ¶
func (a *Account) Priv() base.Privatekey
func (*Account) SetAddress ¶
func (*Account) SetKeys ¶
func (a *Account) SetKeys(keys types.AccountKeys)
func (*Account) SetPriv ¶
func (a *Account) SetPriv(priv base.Privatekey)
type BaseTestOperationProcessorNoItem ¶
type BaseTestOperationProcessorNoItem[To any] struct { *TestProcessor Op To }
func NewBaseTestOperationProcessorNoItem ¶
func NewBaseTestOperationProcessorNoItem[To any](tp *TestProcessor) BaseTestOperationProcessorNoItem[To]
func (*BaseTestOperationProcessorNoItem[To]) IsValid ¶
func (t *BaseTestOperationProcessorNoItem[To]) IsValid()
func (*BaseTestOperationProcessorNoItem[To]) LoadOperation ¶
func (t *BaseTestOperationProcessorNoItem[To]) LoadOperation(fileName string) *BaseTestOperationProcessorNoItem[To]
func (*BaseTestOperationProcessorNoItem[To]) Print ¶
func (t *BaseTestOperationProcessorNoItem[To]) Print(fileName string) *BaseTestOperationProcessorNoItem[To]
func (*BaseTestOperationProcessorNoItem[To]) RunPreProcess ¶
func (t *BaseTestOperationProcessorNoItem[To]) RunPreProcess()
func (*BaseTestOperationProcessorNoItem[To]) RunProcess ¶
func (t *BaseTestOperationProcessorNoItem[To]) RunProcess()
func (*BaseTestOperationProcessorNoItem[To]) SetAccount ¶
func (t *BaseTestOperationProcessorNoItem[To]) SetAccount( priv string, amount int64, cid types.CurrencyID, target []Account, inState bool) *BaseTestOperationProcessorNoItem[To]
func (*BaseTestOperationProcessorNoItem[To]) SetAmount ¶
func (t *BaseTestOperationProcessorNoItem[To]) SetAmount(am int64, cid types.CurrencyID, target []types.Amount) *BaseTestOperationProcessorNoItem[To]
func (*BaseTestOperationProcessorNoItem[To]) SetContractAccount ¶
func (t *BaseTestOperationProcessorNoItem[To]) SetContractAccount( owner base.Address, priv string, amount int64, cid types.CurrencyID, target []Account, inState bool, ) *BaseTestOperationProcessorNoItem[To]
func (*BaseTestOperationProcessorNoItem[To]) SetCurrency ¶
func (t *BaseTestOperationProcessorNoItem[To]) SetCurrency( cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool) *BaseTestOperationProcessorNoItem[To]
type BaseTestOperationProcessorWithItem ¶
type BaseTestOperationProcessorWithItem[To any, Tim any] struct { *TestProcessor Op To // contains filtered or unexported fields }
func NewBaseTestOperationProcessorWithItem ¶
func NewBaseTestOperationProcessorWithItem[To any, Tim any](tp *TestProcessor) BaseTestOperationProcessorWithItem[To, Tim]
func (*BaseTestOperationProcessorWithItem[To, Tim]) IsValid ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) IsValid()
func (*BaseTestOperationProcessorWithItem[To, Tim]) Items ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) Items() []Tim
func (*BaseTestOperationProcessorWithItem[To, Tim]) LoadOperation ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) LoadOperation(fileName string) *BaseTestOperationProcessorWithItem[To, Tim]
func (*BaseTestOperationProcessorWithItem[To, Tim]) Print ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) Print(fileName string) *BaseTestOperationProcessorWithItem[To, Tim]
func (*BaseTestOperationProcessorWithItem[To, Tim]) RunPreProcess ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) RunPreProcess()
func (*BaseTestOperationProcessorWithItem[To, Tim]) RunProcess ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) RunProcess()
func (*BaseTestOperationProcessorWithItem[To, Tim]) SetAccount ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetAccount( priv string, amount int64, cid types.CurrencyID, target []Account, inState bool) *BaseTestOperationProcessorWithItem[To, Tim]
func (*BaseTestOperationProcessorWithItem[To, Tim]) SetAmount ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetAmount(am int64, cid types.CurrencyID, target []types.Amount) *BaseTestOperationProcessorWithItem[To, Tim]
func (*BaseTestOperationProcessorWithItem[To, Tim]) SetContractAccount ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetContractAccount( owner base.Address, priv string, amount int64, cid types.CurrencyID, target []Account, inState bool, ) *BaseTestOperationProcessorWithItem[To, Tim]
func (*BaseTestOperationProcessorWithItem[To, Tim]) SetCurrency ¶
func (t *BaseTestOperationProcessorWithItem[To, Tim]) SetCurrency( cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool) *BaseTestOperationProcessorWithItem[To, Tim]
type MockStateGetter ¶
type MockStateGetter struct {
// contains filtered or unexported fields
}
func NewMockStateGetter ¶
func NewMockStateGetter() *MockStateGetter
type TestOperationProcessorNoItem ¶
type TestOperationProcessorNoItem interface { SetCurrency(string, int64, base.Address, []types.CurrencyID, bool) *TestOperationProcessorNoItem SetAmount(int64, types.CurrencyID, []types.Amount) *TestOperationProcessorNoItem SetContractAccount(base.Address, string, int64, types.CurrencyID, []Account, bool) *TestOperationProcessorNoItem SetAccount(string, int64, types.CurrencyID, []Account, bool) *TestOperationProcessorNoItem Print(string) *TestOperationProcessorNoItem RunPreProcess() RunProcess() IsValid() }
type TestOperationProcessorWithItem ¶
type TestOperationProcessorWithItem[Tim any] interface { Items() []Tim SetCurrency(string, int64, base.Address, []types.CurrencyID, bool) *TestOperationProcessorWithItem[Tim] SetAmount(int64, types.CurrencyID, []types.Amount) *TestOperationProcessorWithItem[Tim] SetContractAccount(base.Address, string, int64, types.CurrencyID, []Account, bool) *TestOperationProcessorWithItem[Tim] SetAccount(string, int64, types.CurrencyID, []Account, bool) *TestOperationProcessorWithItem[Tim] Print(string) *TestOperationProcessorWithItem[Tim] RunPreProcess() RunProcess() IsValid() }
type TestProcessor ¶
type TestProcessor struct { NetworkID base.NetworkID GenesisPriv base.Privatekey GenesisAddr base.Address GenesisCurrency types.CurrencyID NodeAddr base.Address NodePriv base.Privatekey Opr base.OperationProcessor GetStateFunc func(string) (base.State, bool, error) MockGetter *MockStateGetter Encoders *encoder.Encoders // contains filtered or unexported fields }
func (*TestProcessor) Decode ¶
func (t *TestProcessor) Decode(fileName string)
func (*TestProcessor) Error ¶
func (t *TestProcessor) Error() error
func (*TestProcessor) LoadOperation ¶
func (t *TestProcessor) LoadOperation(fileName string) base.Operation
func (*TestProcessor) NewPrivateKey ¶
func (t *TestProcessor) NewPrivateKey(seed string) string
func (*TestProcessor) NewTestAccount ¶
func (t *TestProcessor) NewTestAccount(priv string) (types.Account, base.Address, types.AccountKeys, base.Privatekey)
func (*TestProcessor) NewTestAccountState ¶
func (t *TestProcessor) NewTestAccountState(priv string, inState bool) (base.Address, types.AccountKeys, base.Privatekey)
NewTestAccountState returns address, keys, private key, account state
func (*TestProcessor) NewTestBalanceState ¶
func (t *TestProcessor) NewTestBalanceState(addr base.Address, cid types.CurrencyID, am int64, inState bool)
func (*TestProcessor) NewTestContractAccountState ¶
func (t *TestProcessor) NewTestContractAccountState(owner base.Address, priv string, inState bool) (base.Address, base.Privatekey)
func (*TestProcessor) NewTestCurrencyState ¶
func (t *TestProcessor) NewTestCurrencyState(cid string, addr base.Address, inState bool) types.CurrencyID
NewTestCurrencyState returns currency id, currency state
func (*TestProcessor) NewTestSuffrageState ¶
func (t *TestProcessor) NewTestSuffrageState(priv, node string, inState bool) (base.Address, base.Privatekey)
func (*TestProcessor) Print ¶
func (t *TestProcessor) Print(fileName string, i interface{})
func (*TestProcessor) SetAccount ¶
func (t *TestProcessor) SetAccount(priv string, amount int64, cid types.CurrencyID, target []Account, inState bool)
func (*TestProcessor) SetAmount ¶
func (t *TestProcessor) SetAmount(am int64, cid types.CurrencyID, target []types.Amount)
func (*TestProcessor) SetContractAccount ¶
func (t *TestProcessor) SetContractAccount(owner base.Address, priv string, amount int64, cid types.CurrencyID, target []Account, inState bool)
func (*TestProcessor) SetCurrency ¶
func (t *TestProcessor) SetCurrency(cid string, am int64, receiverPriv string, target *types.CurrencyID, instate bool)
func (*TestProcessor) SetCurrency2 ¶
func (t *TestProcessor) SetCurrency2( cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool)
func (*TestProcessor) Setup ¶
func (t *TestProcessor) Setup(getter *MockStateGetter)
Click to show internal directories.
Click to hide internal directories.