permission

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// system table name
	SysConsensus   = "_sys_consensus_"
	SysCNS         = "_sys_cns_"
	SysTableAccess = "_sys_table_access_"
	SysConfig      = "_sys_config_"
	SysTable       = "_sys_tables_"
)
View Source
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 Info added in v0.10.0

type Info struct {
	Address   string `json:"address"`
	EnableNum string `json:"enable_num"`
	TableName string `json:"table_name"`
}

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

type Service struct {
	// contains filtered or unexported fields
}

Service is a precompile contract service.

func NewPermissionService

func NewPermissionService(client *client.Client) (*Service, error)

NewPermissionService returns ptr of Service

func (*Service) GrantCNSManager added in v0.10.0

func (service *Service) GrantCNSManager(accountAddress common.Address) (int64, error)

GrantCNSManager grants the CNS

func (*Service) GrantContractWritePermission added in v0.10.0

func (service *Service) GrantContractWritePermission(contractAddress common.Address, accountAddress common.Address) (int64, error)

GrantContractWritePermission grants the permission of writing contract

func (*Service) GrantDeployAndCreateManager added in v0.10.0

func (service *Service) GrantDeployAndCreateManager(accountAddress common.Address) (int64, error)

GrantDeployAndCreateManager grants the deploy and create option to an address

func (*Service) GrantNodeManager added in v0.10.0

func (service *Service) GrantNodeManager(accountAddress common.Address) (int64, error)

GrantNodeManager grants the Node

func (*Service) GrantPermissionManager added in v0.10.0

func (service *Service) GrantPermissionManager(accountAddress common.Address) (int64, error)

GrantPermissionManager grants the permission

func (*Service) GrantSysConfigManager added in v0.10.0

func (service *Service) GrantSysConfigManager(accountAddress common.Address) (int64, error)

GrantSysConfigManager grants the System configuration manager

func (*Service) GrantUserTableManager added in v0.10.0

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 added in v0.10.0

func (service *Service) ListCNSManager() ([]Info, error)

ListCNSManager returns the list of CNS manager

func (*Service) ListContractWritePermission added in v0.10.0

func (service *Service) ListContractWritePermission(contractAddress common.Address) ([]Info, error)

ListContractWritePermission queries the accounts that have the permission of writing contract

func (*Service) ListDeployAndCreateManager added in v0.10.0

func (service *Service) ListDeployAndCreateManager() ([]Info, error)

ListDeployAndCreateManager returns the list of permission info

func (*Service) ListNodeManager added in v0.10.0

func (service *Service) ListNodeManager() ([]Info, error)

ListNodeManager returns the list of Node manager

func (*Service) ListPermissionManager added in v0.10.0

func (service *Service) ListPermissionManager() ([]Info, error)

ListPermissionManager returns the list of permission

func (*Service) ListSysConfigManager added in v0.10.0

func (service *Service) ListSysConfigManager() ([]Info, error)

ListSysConfigManager returns the list of System configuration manager

func (*Service) ListUserTableManager added in v0.10.0

func (service *Service) ListUserTableManager(tableName string) ([]Info, error)

ListUserTableManager returns the list of permission info

func (*Service) RevokeCNSManager added in v0.10.0

func (service *Service) RevokeCNSManager(accountAddress common.Address) (int64, error)

RevokeCNSManager revokes the CNS

func (*Service) RevokeContractWritePermission added in v0.10.0

func (service *Service) RevokeContractWritePermission(contractAddress common.Address, accountAddress common.Address) (int64, error)

RevokeContractWritePermission revokes the permission of writing contract

func (*Service) RevokeDeployAndCreateManager added in v0.10.0

func (service *Service) RevokeDeployAndCreateManager(accountAddress common.Address) (int64, error)

RevokeDeployAndCreateManager revokes a accountAddress's right of the deploy and create option

func (*Service) RevokeNodeManager added in v0.10.0

func (service *Service) RevokeNodeManager(accountAddress common.Address) (int64, error)

RevokeNodeManager revokes the Node

func (*Service) RevokePermissionManager added in v0.10.0

func (service *Service) RevokePermissionManager(accountAddress common.Address) (int64, error)

RevokePermissionManager revokes the permission

func (*Service) RevokeSysConfigManager added in v0.10.0

func (service *Service) RevokeSysConfigManager(accountAddress common.Address) (int64, error)

RevokeSysConfigManager revokes the System configuration manager

func (*Service) RevokeUserTableManager added in v0.10.0

func (service *Service) RevokeUserTableManager(tableName string, accountAddress common.Address) (int64, error)

RevokeUserTableManager revokes a accountAddress' right of the table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL