Documentation ¶
Index ¶
- Constants
- type Info
- type Permission
- type PermissionCaller
- type PermissionCallerRaw
- type PermissionCallerSession
- type PermissionFilterer
- type PermissionRaw
- func (_Permission *PermissionRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_Permission *PermissionRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)
- type PermissionSession
- func (_Permission *PermissionSession) GrantWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionSession) Insert(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionSession) QueryByName(table_name string) (string, error)
- func (_Permission *PermissionSession) QueryPermission(contractAddr common.Address) (string, error)
- func (_Permission *PermissionSession) Remove(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionSession) RevokeWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
- type PermissionTransactor
- func (_Permission *PermissionTransactor) GrantWrite(opts *bind.TransactOpts, contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionTransactor) Insert(opts *bind.TransactOpts, table_name string, addr string) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionTransactor) Remove(opts *bind.TransactOpts, table_name string, addr string) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionTransactor) RevokeWrite(opts *bind.TransactOpts, contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
- type PermissionTransactorRaw
- type PermissionTransactorSession
- func (_Permission *PermissionTransactorSession) GrantWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionTransactorSession) Insert(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionTransactorSession) Remove(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
- func (_Permission *PermissionTransactorSession) RevokeWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
- type Service
- func (service *Service) GrantCNSManager(accountAddress common.Address) (int64, error)
- func (service *Service) GrantContractWritePermission(contractAddress common.Address, accountAddress common.Address) (int64, error)
- func (service *Service) GrantDeployAndCreateManager(accountAddress common.Address) (int64, error)
- func (service *Service) GrantNodeManager(accountAddress common.Address) (int64, error)
- func (service *Service) GrantPermissionManager(accountAddress common.Address) (int64, error)
- func (service *Service) GrantSysConfigManager(accountAddress common.Address) (int64, error)
- func (service *Service) GrantUserTableManager(tableName string, accountAddress common.Address) (int64, error)
- func (service *Service) ListCNSManager() ([]Info, error)
- func (service *Service) ListContractWritePermission(contractAddress common.Address) ([]Info, error)
- func (service *Service) ListDeployAndCreateManager() ([]Info, error)
- func (service *Service) ListNodeManager() ([]Info, error)
- func (service *Service) ListPermissionManager() ([]Info, error)
- func (service *Service) ListSysConfigManager() ([]Info, error)
- func (service *Service) ListUserTableManager(tableName string) ([]Info, error)
- func (service *Service) RevokeCNSManager(accountAddress common.Address) (int64, error)
- func (service *Service) RevokeContractWritePermission(contractAddress common.Address, accountAddress common.Address) (int64, error)
- func (service *Service) RevokeDeployAndCreateManager(accountAddress common.Address) (int64, error)
- func (service *Service) RevokeNodeManager(accountAddress common.Address) (int64, error)
- func (service *Service) RevokePermissionManager(accountAddress common.Address) (int64, error)
- func (service *Service) RevokeSysConfigManager(accountAddress common.Address) (int64, error)
- func (service *Service) RevokeUserTableManager(tableName string, accountAddress common.Address) (int64, error)
Constants ¶
const ( // system table name SysConsensus = "_sys_consensus_" SysCNS = "_sys_cns_" SysTableAccess = "_sys_table_access_" SysConfig = "_sys_config_" SysTable = "_sys_tables_" )
const PermissionABI = "" /* 1531-byte string literal not displayed */
PermissionABI is the input ABI used to generate the binding from.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission struct { PermissionCaller // Read-only binding to the contract PermissionTransactor // Write-only binding to the contract PermissionFilterer // Log filterer for contract events }
Permission is an auto generated Go binding around a Solidity contract.
func NewPermission ¶
func NewPermission(address common.Address, backend bind.ContractBackend) (*Permission, error)
NewPermission creates a new instance of Permission, bound to a specific deployed contract.
type PermissionCaller ¶
type PermissionCaller struct {
// contains filtered or unexported fields
}
PermissionCaller is an auto generated read-only Go binding around a Solidity contract.
func NewPermissionCaller ¶
func NewPermissionCaller(address common.Address, caller bind.ContractCaller) (*PermissionCaller, error)
NewPermissionCaller creates a new read-only instance of Permission, bound to a specific deployed contract.
func (*PermissionCaller) QueryByName ¶
func (_Permission *PermissionCaller) QueryByName(opts *bind.CallOpts, table_name string) (string, error)
QueryByName is a free data retrieval call binding the contract method 0x20586031.
Solidity: function queryByName(string table_name) constant returns(string)
func (*PermissionCaller) QueryPermission ¶
func (_Permission *PermissionCaller) QueryPermission(opts *bind.CallOpts, contractAddr common.Address) (string, error)
QueryPermission is a free data retrieval call binding the contract method 0x54ad6352.
Solidity: function queryPermission(address contractAddr) constant returns(string)
type PermissionCallerRaw ¶
type PermissionCallerRaw struct {
Contract *PermissionCaller // Generic read-only contract binding to access the raw methods on
}
PermissionCallerRaw is an auto generated low-level read-only Go binding around a Solidity contract.
func (*PermissionCallerRaw) Call ¶
func (_Permission *PermissionCallerRaw) 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 PermissionCallerSession ¶
type PermissionCallerSession struct { Contract *PermissionCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
PermissionCallerSession is an auto generated read-only Go binding around a Solidity contract, with pre-set call options.
func (*PermissionCallerSession) QueryByName ¶
func (_Permission *PermissionCallerSession) QueryByName(table_name string) (string, error)
QueryByName is a free data retrieval call binding the contract method 0x20586031.
Solidity: function queryByName(string table_name) constant returns(string)
func (*PermissionCallerSession) QueryPermission ¶
func (_Permission *PermissionCallerSession) QueryPermission(contractAddr common.Address) (string, error)
QueryPermission is a free data retrieval call binding the contract method 0x54ad6352.
Solidity: function queryPermission(address contractAddr) constant returns(string)
type PermissionFilterer ¶
type PermissionFilterer struct {
// contains filtered or unexported fields
}
PermissionFilterer is an auto generated log filtering Go binding around a Solidity contract events.
func NewPermissionFilterer ¶
func NewPermissionFilterer(address common.Address, filterer bind.ContractFilterer) (*PermissionFilterer, error)
NewPermissionFilterer creates a new log filterer instance of Permission, bound to a specific deployed contract.
type PermissionRaw ¶
type PermissionRaw struct {
Contract *Permission // Generic contract binding to access the raw methods on
}
PermissionRaw is an auto generated low-level Go binding around a Solidity contract.
func (*PermissionRaw) Call ¶
func (_Permission *PermissionRaw) 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 (*PermissionRaw) Transact ¶
func (_Permission *PermissionRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)
Transact invokes the (paid) contract method with params as input values.
func (*PermissionRaw) Transfer ¶
func (_Permission *PermissionRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type PermissionSession ¶
type PermissionSession struct { Contract *Permission // 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 }
PermissionSession is an auto generated Go binding around a Solidity contract, with pre-set call and transact options.
func (*PermissionSession) GrantWrite ¶
func (_Permission *PermissionSession) GrantWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
GrantWrite is a paid mutator transaction binding the contract method 0x96ec37c4.
Solidity: function grantWrite(address contractAddr, address user) returns(int256)
func (*PermissionSession) Insert ¶
func (_Permission *PermissionSession) Insert(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
Insert is a paid mutator transaction binding the contract method 0x06e63ff8.
Solidity: function insert(string table_name, string addr) returns(int256)
func (*PermissionSession) QueryByName ¶
func (_Permission *PermissionSession) QueryByName(table_name string) (string, error)
QueryByName is a free data retrieval call binding the contract method 0x20586031.
Solidity: function queryByName(string table_name) constant returns(string)
func (*PermissionSession) QueryPermission ¶
func (_Permission *PermissionSession) QueryPermission(contractAddr common.Address) (string, error)
QueryPermission is a free data retrieval call binding the contract method 0x54ad6352.
Solidity: function queryPermission(address contractAddr) constant returns(string)
func (*PermissionSession) Remove ¶
func (_Permission *PermissionSession) Remove(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
Remove is a paid mutator transaction binding the contract method 0x44590a7e.
Solidity: function remove(string table_name, string addr) returns(int256)
func (*PermissionSession) RevokeWrite ¶
func (_Permission *PermissionSession) RevokeWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
RevokeWrite is a paid mutator transaction binding the contract method 0x99c26010.
Solidity: function revokeWrite(address contractAddr, address user) returns(int256)
type PermissionTransactor ¶
type PermissionTransactor struct {
// contains filtered or unexported fields
}
PermissionTransactor is an auto generated write-only Go binding around a Solidity contract.
func NewPermissionTransactor ¶
func NewPermissionTransactor(address common.Address, transactor bind.ContractTransactor) (*PermissionTransactor, error)
NewPermissionTransactor creates a new write-only instance of Permission, bound to a specific deployed contract.
func (*PermissionTransactor) GrantWrite ¶
func (_Permission *PermissionTransactor) GrantWrite(opts *bind.TransactOpts, contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
GrantWrite is a paid mutator transaction binding the contract method 0x96ec37c4.
Solidity: function grantWrite(address contractAddr, address user) returns(int256)
func (*PermissionTransactor) Insert ¶
func (_Permission *PermissionTransactor) Insert(opts *bind.TransactOpts, table_name string, addr string) (*types.Transaction, *types.Receipt, error)
Insert is a paid mutator transaction binding the contract method 0x06e63ff8.
Solidity: function insert(string table_name, string addr) returns(int256)
func (*PermissionTransactor) Remove ¶
func (_Permission *PermissionTransactor) Remove(opts *bind.TransactOpts, table_name string, addr string) (*types.Transaction, *types.Receipt, error)
Remove is a paid mutator transaction binding the contract method 0x44590a7e.
Solidity: function remove(string table_name, string addr) returns(int256)
func (*PermissionTransactor) RevokeWrite ¶
func (_Permission *PermissionTransactor) RevokeWrite(opts *bind.TransactOpts, contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
RevokeWrite is a paid mutator transaction binding the contract method 0x99c26010.
Solidity: function revokeWrite(address contractAddr, address user) returns(int256)
type PermissionTransactorRaw ¶
type PermissionTransactorRaw struct {
Contract *PermissionTransactor // Generic write-only contract binding to access the raw methods on
}
PermissionTransactorRaw is an auto generated low-level write-only Go binding around a Solidity contract.
func (*PermissionTransactorRaw) Transact ¶
func (_Permission *PermissionTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)
Transact invokes the (paid) contract method with params as input values.
func (*PermissionTransactorRaw) Transfer ¶
func (_Permission *PermissionTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type PermissionTransactorSession ¶
type PermissionTransactorSession struct { Contract *PermissionTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
PermissionTransactorSession is an auto generated write-only Go binding around a Solidity contract, with pre-set transact options.
func (*PermissionTransactorSession) GrantWrite ¶
func (_Permission *PermissionTransactorSession) GrantWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
GrantWrite is a paid mutator transaction binding the contract method 0x96ec37c4.
Solidity: function grantWrite(address contractAddr, address user) returns(int256)
func (*PermissionTransactorSession) Insert ¶
func (_Permission *PermissionTransactorSession) Insert(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
Insert is a paid mutator transaction binding the contract method 0x06e63ff8.
Solidity: function insert(string table_name, string addr) returns(int256)
func (*PermissionTransactorSession) Remove ¶
func (_Permission *PermissionTransactorSession) Remove(table_name string, addr string) (*types.Transaction, *types.Receipt, error)
Remove is a paid mutator transaction binding the contract method 0x44590a7e.
Solidity: function remove(string table_name, string addr) returns(int256)
func (*PermissionTransactorSession) RevokeWrite ¶
func (_Permission *PermissionTransactorSession) RevokeWrite(contractAddr common.Address, user common.Address) (*types.Transaction, *types.Receipt, error)
RevokeWrite is a paid mutator transaction binding the contract method 0x99c26010.
Solidity: function revokeWrite(address contractAddr, address user) returns(int256)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a precompile contract service.
func NewPermissionService ¶
NewPermissionService returns ptr of Service
func (*Service) GrantCNSManager ¶
GrantCNSManager grants the CNS
func (*Service) GrantContractWritePermission ¶
func (service *Service) GrantContractWritePermission(contractAddress common.Address, accountAddress common.Address) (int64, error)
GrantContractWritePermission grants the permission of writing contract
func (*Service) GrantDeployAndCreateManager ¶
GrantDeployAndCreateManager grants the deploy and create option to an address
func (*Service) GrantNodeManager ¶
GrantNodeManager grants the Node
func (*Service) GrantPermissionManager ¶
GrantPermissionManager grants the permission
func (*Service) GrantSysConfigManager ¶
GrantSysConfigManager grants the System configuration manager
func (*Service) GrantUserTableManager ¶
func (service *Service) GrantUserTableManager(tableName string, accountAddress common.Address) (int64, error)
GrantUserTableManager grants the info by the table name and user address
func (*Service) ListCNSManager ¶
ListCNSManager returns the list of CNS manager
func (*Service) ListContractWritePermission ¶
ListContractWritePermission queries the accounts that have the permission of writing contract
func (*Service) ListDeployAndCreateManager ¶
ListDeployAndCreateManager returns the list of permission info
func (*Service) ListNodeManager ¶
ListNodeManager returns the list of Node manager
func (*Service) ListPermissionManager ¶
ListPermissionManager returns the list of permission
func (*Service) ListSysConfigManager ¶
ListSysConfigManager returns the list of System configuration manager
func (*Service) ListUserTableManager ¶
ListUserTableManager returns the list of permission info
func (*Service) RevokeCNSManager ¶
RevokeCNSManager revokes the CNS
func (*Service) RevokeContractWritePermission ¶
func (service *Service) RevokeContractWritePermission(contractAddress common.Address, accountAddress common.Address) (int64, error)
RevokeContractWritePermission revokes the permission of writing contract
func (*Service) RevokeDeployAndCreateManager ¶
RevokeDeployAndCreateManager revokes a accountAddress's right of the deploy and create option
func (*Service) RevokeNodeManager ¶
RevokeNodeManager revokes the Node
func (*Service) RevokePermissionManager ¶
RevokePermissionManager revokes the permission
func (*Service) RevokeSysConfigManager ¶
RevokeSysConfigManager revokes the System configuration manager