Documentation ¶
Index ¶
- Constants
- Variables
- type CRUDService
- func (service *CRUDService) CreateTable(table *Table) (int, error)
- func (service *CRUDService) Desc(tableName string) (*Table, error)
- func (service *CRUDService) Insert(table *Table, entry *Entry) (int, error)
- func (service *CRUDService) Remove(table *Table, condition *Condition) (int, error)
- func (service *CRUDService) Select(table *Table, condition *Condition) ([]map[string]string, error)
- func (service *CRUDService) Update(table *Table, entry *Entry, condition *Condition) (int, error)
- type Condition
- func (c *Condition) EQ(key string, value string)
- func (c *Condition) GE(key string, value string)
- func (c *Condition) GT(key string, value string)
- func (c *Condition) GetConditions() map[string]map[EnumOP]string
- func (c *Condition) LE(key string, value string)
- func (c *Condition) LT(key string, value string)
- func (c *Condition) Limit(count int)
- func (c *Condition) NE(key string, value string)
- func (c *Condition) SetConditions(newMap map[string]map[EnumOP]string)
- type Crud
- type CrudCaller
- type CrudCallerRaw
- type CrudCallerSession
- type CrudFilterer
- type CrudRaw
- func (_Crud *CrudRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_Crud *CrudRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.RawTransaction, error)
- func (_Crud *CrudRaw) Transfer(opts *bind.TransactOpts) (*types.RawTransaction, error)
- type CrudSession
- func (_Crud *CrudSession) Insert(tableName string, key string, entry string, optional string) (*types.RawTransaction, error)
- func (_Crud *CrudSession) Remove(tableName string, key string, condition string, optional string) (*types.RawTransaction, error)
- func (_Crud *CrudSession) Select(tableName string, key string, condition string, optional string) (string, error)
- func (_Crud *CrudSession) Update(tableName string, key string, entry string, condition string, optional string) (*types.RawTransaction, error)
- type CrudTransactor
- func (_Crud *CrudTransactor) Insert(opts *bind.TransactOpts, tableName string, key string, entry string, ...) (*types.RawTransaction, error)
- func (_Crud *CrudTransactor) Remove(opts *bind.TransactOpts, tableName string, key string, condition string, ...) (*types.RawTransaction, error)
- func (_Crud *CrudTransactor) Update(opts *bind.TransactOpts, tableName string, key string, entry string, ...) (*types.RawTransaction, error)
- type CrudTransactorRaw
- type CrudTransactorSession
- func (_Crud *CrudTransactorSession) Insert(tableName string, key string, entry string, optional string) (*types.RawTransaction, error)
- func (_Crud *CrudTransactorSession) Remove(tableName string, key string, condition string, optional string) (*types.RawTransaction, error)
- func (_Crud *CrudTransactorSession) Update(tableName string, key string, entry string, condition string, optional string) (*types.RawTransaction, error)
- type Entry
- type EnumOP
- type Table
- func (t *Table) GetCondition() *Condition
- func (t *Table) GetEntry() *Entry
- func (t *Table) GetKey() string
- func (t *Table) GetOptional() string
- func (t *Table) GetTableName() string
- func (t *Table) GetValueFields() string
- func (t *Table) SetKey(key string)
- func (t *Table) SetOptional(optional string)
- func (t *Table) SetTableName(name string)
- func (t *Table) SetValueFields(value string)
- type TableFactory
- type TableFactoryCaller
- type TableFactoryCallerRaw
- type TableFactoryCallerSession
- type TableFactoryFilterer
- type TableFactoryRaw
- func (_TableFactory *TableFactoryRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_TableFactory *TableFactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.RawTransaction, error)
- func (_TableFactory *TableFactoryRaw) Transfer(opts *bind.TransactOpts) (*types.RawTransaction, error)
- type TableFactorySession
- type TableFactoryTransactor
- type TableFactoryTransactorRaw
- type TableFactoryTransactorSession
Constants ¶
const ( TableKeyMaxLength int = 255 SysTable string = "_sys_tables_" UserTablePrefix string = "_user_" )
const CrudABI = "" /* 1439-byte string literal not displayed */
CrudABI is the input ABI used to generate the binding from.
const TableFactoryABI = "" /* 315-byte string literal not displayed */
TableFactoryABI is the input ABI used to generate the binding from.
Variables ¶
var CRUDPrecompileAddress common.Address = common.HexToAddress("0x0000000000000000000000000000000000001002")
CRUDPrecompileAddress is the contract address of CRUD
var TableFactoryPrecompileAddress common.Address = common.HexToAddress("0x0000000000000000000000000000000000001001")
TableFactoryPrecompileAddress is the contract address of TableFactory
Functions ¶
This section is empty.
Types ¶
type CRUDService ¶
type CRUDService struct {
// contains filtered or unexported fields
}
CRUDService is a precompile contract service.
func NewCRUDService ¶
func NewCRUDService(client *client.Client, privateKey *ecdsa.PrivateKey) (*CRUDService, error)
NewCRUDService returns ptr of CRUDService
func (*CRUDService) CreateTable ¶
func (service *CRUDService) CreateTable(table *Table) (int, error)
CreateTable returns the status of the creating that 0 represents succeed
func (*CRUDService) Desc ¶
func (service *CRUDService) Desc(tableName string) (*Table, error)
Desc is used for Table
func (*CRUDService) Insert ¶
func (service *CRUDService) Insert(table *Table, entry *Entry) (int, error)
Insert entry
func (*CRUDService) Remove ¶
func (service *CRUDService) Remove(table *Table, condition *Condition) (int, error)
Remove entry
type Crud ¶
type Crud struct { CrudCaller // Read-only binding to the contract CrudTransactor // Write-only binding to the contract CrudFilterer // Log filterer for contract events }
Crud is an auto generated Go binding around an Ethereum contract.
type CrudCaller ¶
type CrudCaller struct {
// contains filtered or unexported fields
}
CrudCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewCrudCaller ¶
func NewCrudCaller(address common.Address, caller bind.ContractCaller) (*CrudCaller, error)
NewCrudCaller creates a new read-only instance of Crud, bound to a specific deployed contract.
func (*CrudCaller) Select ¶
func (_Crud *CrudCaller) Select(opts *bind.CallOpts, tableName string, key string, condition string, optional string) (string, error)
Select is a free data retrieval call binding the contract method 0x983c6c4f.
Solidity: function select(string tableName, string key, string condition, string optional) constant returns(string)
type CrudCallerRaw ¶
type CrudCallerRaw struct {
Contract *CrudCaller // Generic read-only contract binding to access the raw methods on
}
CrudCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*CrudCallerRaw) Call ¶
func (_Crud *CrudCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type CrudCallerSession ¶
type CrudCallerSession struct { Contract *CrudCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
CrudCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*CrudCallerSession) Select ¶
func (_Crud *CrudCallerSession) Select(tableName string, key string, condition string, optional string) (string, error)
Select is a free data retrieval call binding the contract method 0x983c6c4f.
Solidity: function select(string tableName, string key, string condition, string optional) constant returns(string)
type CrudFilterer ¶
type CrudFilterer struct {
// contains filtered or unexported fields
}
CrudFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewCrudFilterer ¶
func NewCrudFilterer(address common.Address, filterer bind.ContractFilterer) (*CrudFilterer, error)
NewCrudFilterer creates a new log filterer instance of Crud, bound to a specific deployed contract.
type CrudRaw ¶
type CrudRaw struct {
Contract *Crud // Generic contract binding to access the raw methods on
}
CrudRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*CrudRaw) Call ¶
func (_Crud *CrudRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*CrudRaw) Transact ¶
func (_Crud *CrudRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.RawTransaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*CrudRaw) Transfer ¶
func (_Crud *CrudRaw) Transfer(opts *bind.TransactOpts) (*types.RawTransaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type CrudSession ¶
type CrudSession struct { Contract *Crud // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
CrudSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*CrudSession) Insert ¶
func (_Crud *CrudSession) Insert(tableName string, key string, entry string, optional string) (*types.RawTransaction, error)
Insert is a paid mutator transaction binding the contract method 0xa216464b.
Solidity: function insert(string tableName, string key, string entry, string optional) returns(int256)
func (*CrudSession) Remove ¶
func (_Crud *CrudSession) Remove(tableName string, key string, condition string, optional string) (*types.RawTransaction, error)
Remove is a paid mutator transaction binding the contract method 0xa72a1e65.
Solidity: function remove(string tableName, string key, string condition, string optional) returns(int256)
func (*CrudSession) Select ¶
func (_Crud *CrudSession) Select(tableName string, key string, condition string, optional string) (string, error)
Select is a free data retrieval call binding the contract method 0x983c6c4f.
Solidity: function select(string tableName, string key, string condition, string optional) constant returns(string)
func (*CrudSession) Update ¶
func (_Crud *CrudSession) Update(tableName string, key string, entry string, condition string, optional string) (*types.RawTransaction, error)
Update is a paid mutator transaction binding the contract method 0x2dca76c1.
Solidity: function update(string tableName, string key, string entry, string condition, string optional) returns(int256)
type CrudTransactor ¶
type CrudTransactor struct {
// contains filtered or unexported fields
}
CrudTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewCrudTransactor ¶
func NewCrudTransactor(address common.Address, transactor bind.ContractTransactor) (*CrudTransactor, error)
NewCrudTransactor creates a new write-only instance of Crud, bound to a specific deployed contract.
func (*CrudTransactor) Insert ¶
func (_Crud *CrudTransactor) Insert(opts *bind.TransactOpts, tableName string, key string, entry string, optional string) (*types.RawTransaction, error)
Insert is a paid mutator transaction binding the contract method 0xa216464b.
Solidity: function insert(string tableName, string key, string entry, string optional) returns(int256)
func (*CrudTransactor) Remove ¶
func (_Crud *CrudTransactor) Remove(opts *bind.TransactOpts, tableName string, key string, condition string, optional string) (*types.RawTransaction, error)
Remove is a paid mutator transaction binding the contract method 0xa72a1e65.
Solidity: function remove(string tableName, string key, string condition, string optional) returns(int256)
func (*CrudTransactor) Update ¶
func (_Crud *CrudTransactor) Update(opts *bind.TransactOpts, tableName string, key string, entry string, condition string, optional string) (*types.RawTransaction, error)
Update is a paid mutator transaction binding the contract method 0x2dca76c1.
Solidity: function update(string tableName, string key, string entry, string condition, string optional) returns(int256)
type CrudTransactorRaw ¶
type CrudTransactorRaw struct {
Contract *CrudTransactor // Generic write-only contract binding to access the raw methods on
}
CrudTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*CrudTransactorRaw) Transact ¶
func (_Crud *CrudTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.RawTransaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*CrudTransactorRaw) Transfer ¶
func (_Crud *CrudTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.RawTransaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type CrudTransactorSession ¶
type CrudTransactorSession struct { Contract *CrudTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
CrudTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*CrudTransactorSession) Insert ¶
func (_Crud *CrudTransactorSession) Insert(tableName string, key string, entry string, optional string) (*types.RawTransaction, error)
Insert is a paid mutator transaction binding the contract method 0xa216464b.
Solidity: function insert(string tableName, string key, string entry, string optional) returns(int256)
func (*CrudTransactorSession) Remove ¶
func (_Crud *CrudTransactorSession) Remove(tableName string, key string, condition string, optional string) (*types.RawTransaction, error)
Remove is a paid mutator transaction binding the contract method 0xa72a1e65.
Solidity: function remove(string tableName, string key, string condition, string optional) returns(int256)
func (*CrudTransactorSession) Update ¶
func (_Crud *CrudTransactorSession) Update(tableName string, key string, entry string, condition string, optional string) (*types.RawTransaction, error)
Update is a paid mutator transaction binding the contract method 0x2dca76c1.
Solidity: function update(string tableName, string key, string entry, string condition, string optional) returns(int256)
type Table ¶
func (*Table) GetCondition ¶
func (*Table) GetOptional ¶
func (*Table) GetTableName ¶
func (*Table) GetValueFields ¶
func (*Table) SetOptional ¶
func (*Table) SetTableName ¶
func (*Table) SetValueFields ¶
type TableFactory ¶
type TableFactory struct { TableFactoryCaller // Read-only binding to the contract TableFactoryTransactor // Write-only binding to the contract TableFactoryFilterer // Log filterer for contract events }
TableFactory is an auto generated Go binding around an Ethereum contract.
func NewTableFactory ¶
func NewTableFactory(address common.Address, backend bind.ContractBackend) (*TableFactory, error)
NewTableFactory creates a new instance of TableFactory, bound to a specific deployed contract.
type TableFactoryCaller ¶
type TableFactoryCaller struct {
// contains filtered or unexported fields
}
TableFactoryCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewTableFactoryCaller ¶
func NewTableFactoryCaller(address common.Address, caller bind.ContractCaller) (*TableFactoryCaller, error)
NewTableFactoryCaller creates a new read-only instance of TableFactory, bound to a specific deployed contract.
type TableFactoryCallerRaw ¶
type TableFactoryCallerRaw struct {
Contract *TableFactoryCaller // Generic read-only contract binding to access the raw methods on
}
TableFactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*TableFactoryCallerRaw) Call ¶
func (_TableFactory *TableFactoryCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type TableFactoryCallerSession ¶
type TableFactoryCallerSession struct { Contract *TableFactoryCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
TableFactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
type TableFactoryFilterer ¶
type TableFactoryFilterer struct {
// contains filtered or unexported fields
}
TableFactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewTableFactoryFilterer ¶
func NewTableFactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*TableFactoryFilterer, error)
NewTableFactoryFilterer creates a new log filterer instance of TableFactory, bound to a specific deployed contract.
type TableFactoryRaw ¶
type TableFactoryRaw struct {
Contract *TableFactory // Generic contract binding to access the raw methods on
}
TableFactoryRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*TableFactoryRaw) Call ¶
func (_TableFactory *TableFactoryRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*TableFactoryRaw) Transact ¶
func (_TableFactory *TableFactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.RawTransaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*TableFactoryRaw) Transfer ¶
func (_TableFactory *TableFactoryRaw) Transfer(opts *bind.TransactOpts) (*types.RawTransaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type TableFactorySession ¶
type TableFactorySession struct { Contract *TableFactory // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
TableFactorySession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*TableFactorySession) CreateTable ¶
func (_TableFactory *TableFactorySession) CreateTable(tableName string, key string, valueField string) (*types.RawTransaction, error)
CreateTable is a paid mutator transaction binding the contract method 0x56004b6a.
Solidity: function createTable(string tableName, string key, string valueField) returns(int256)
type TableFactoryTransactor ¶
type TableFactoryTransactor struct {
// contains filtered or unexported fields
}
TableFactoryTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewTableFactoryTransactor ¶
func NewTableFactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*TableFactoryTransactor, error)
NewTableFactoryTransactor creates a new write-only instance of TableFactory, bound to a specific deployed contract.
func (*TableFactoryTransactor) CreateTable ¶
func (_TableFactory *TableFactoryTransactor) CreateTable(opts *bind.TransactOpts, tableName string, key string, valueField string) (*types.RawTransaction, error)
CreateTable is a paid mutator transaction binding the contract method 0x56004b6a.
Solidity: function createTable(string tableName, string key, string valueField) returns(int256)
type TableFactoryTransactorRaw ¶
type TableFactoryTransactorRaw struct {
Contract *TableFactoryTransactor // Generic write-only contract binding to access the raw methods on
}
TableFactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*TableFactoryTransactorRaw) Transact ¶
func (_TableFactory *TableFactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.RawTransaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*TableFactoryTransactorRaw) Transfer ¶
func (_TableFactory *TableFactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.RawTransaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type TableFactoryTransactorSession ¶
type TableFactoryTransactorSession struct { Contract *TableFactoryTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
TableFactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*TableFactoryTransactorSession) CreateTable ¶
func (_TableFactory *TableFactoryTransactorSession) CreateTable(tableName string, key string, valueField string) (*types.RawTransaction, error)
CreateTable is a paid mutator transaction binding the contract method 0x56004b6a.
Solidity: function createTable(string tableName, string key, string valueField) returns(int256)