Documentation ¶
Overview ¶
Package abi defines the abi of the smartcontract
The db.go contains the database related functions of the ABI ¶
Package abi The new.go keeps the functions that creates a new Abi from given parameters
Index ¶
- type Abi
- func (a *Abi) Exist(_ interface{}) bool
- func (a *Abi) GenerateId() error
- func (a *Abi) Insert(dbInterface interface{}) error
- func (a *Abi) Interface(body interface{}) error
- func (a *Abi) Select(dbInterface interface{}) error
- func (a *Abi) SelectAll(dbInterface interface{}, returnValues interface{}) error
- func (a *Abi) SelectAllByCondition(_ interface{}, _ key_value.KeyValue, _ interface{}) error
- func (a *Abi) ToString() string
- func (a *Abi) Update(_ interface{}, _ uint8) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Abi ¶
func NewFromBytes ¶
NewFromBytes creates the Abi data based on the JSON string. This function calculates the abi hash but won't set it in the database.
func NewFromInterface ¶
NewFromInterface The bytes data are given as a JSON It will generate ID.
func (*Abi) GenerateId ¶
GenerateId Creates the abi hash from the abi body The Abi ID is the unique identifier of the abi
ID is the first 8 characters of the
sha256 checksum representation of the abi.
If the bytes field is invalid, then the id will be empty
func (*Abi) Interface ¶
Interface Get the interface from the bytes It converts the bytes into the JSON value
func (*Abi) Select ¶
Select Not implemented common/data_type/database.Crud interface
Returns an error
func (*Abi) SelectAll ¶
SelectAll abi from database
Implements common/data_type/database.Crud interface
func (*Abi) SelectAllByCondition ¶
SelectAllByCondition Not implemented common/data_type/database.Crud interface
Returns an error