Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface {
// Can query database all tables data
// Query ** no prefix ** table default, option PluginPrefix can specify other plugin model
FindBy(record interface{}, query interface{}, option *Option) (int, bool)
// Allow to find the total numbers of elements
CountBy(record interface{}, query interface{}) int
// Only can exec plugin relate tables
// Migration
AutoMigration(model interface{}) error
// Add column Index
AddIndex(model interface{}, indexName string, columns ...string) error
// Add column unique index
AddUniqueIndex(model interface{}, indexName string, columns ...string) error
// Create one record
Create(record interface{}) error
// Update one or more column
Update(model interface{}, query interface{}, attr map[string]interface{}) error
// Delete one or more record
Delete(model interface{}, query interface{}) error
}
DB interface Every query can be found here https://gorm.io/docs/
type EventParam ¶
type EventParam struct {
Type string `json:"type"`
Value interface{} `json:"value"`
}
type Extrinsic ¶
type Extrinsic struct {
ExtrinsicIndex string `json:"extrinsic_index" `
CallCode string `json:"call_code"`
CallModuleFunction string `json:"call_module_function" `
CallModule string `json:"call_module"`
Params []byte `json:"params"`
AccountId string `json:"account_id"`
Signature string `json:"signature"`
Nonce int `json:"nonce"`
Era string `json:"era"`
ExtrinsicHash string `json:"extrinsic_hash"`
Success bool `json:"success"`
Fee decimal.Decimal `json:"fee"`
}
type ExtrinsicParam ¶
Click to show internal directories.
Click to hide internal directories.