Documentation ¶
Index ¶
- func IsNodePermissioned(node *enode.Node, nodename string, currentNode string, datadir string, ...) bool
- func NewPermissionContractService(ethClnt bind.ContractBackend, permissionV2 bool, key *ecdsa.PrivateKey, ...) ptype.InitService
- type AccountUpdateAction
- type NodeUpdateAction
- type OrgUpdateAction
- type PendingOpInfo
- type PermAction
- type PermissionCtrl
- func (p *PermissionCtrl) AfterStart() error
- func (p *PermissionCtrl) ConnectionAllowed(_enodeId, _ip string, _port, _raftPort uint16) (bool, error)
- func (p *PermissionCtrl) IsTransactionAllowed(_sender common.Address, _target common.Address, _value *big.Int, ...) error
- func (p *PermissionCtrl) IsV2Permission() bool
- func (p *PermissionCtrl) NewPermissionAccountService(txa ethapi.SendTxArgs) (ptype.AccountService, error)
- func (p *PermissionCtrl) NewPermissionAuditService() (ptype.AuditService, error)
- func (p *PermissionCtrl) NewPermissionControlService() (ptype.ControlService, error)
- func (p *PermissionCtrl) NewPermissionNodeService(txa ethapi.SendTxArgs) (ptype.NodeService, error)
- func (p *PermissionCtrl) NewPermissionOrgService(txa ethapi.SendTxArgs) (ptype.OrgService, error)
- func (p *PermissionCtrl) NewPermissionRoleService(txa ethapi.SendTxArgs) (ptype.RoleService, error)
- func (p *PermissionCtrl) Start() error
- func (p *PermissionCtrl) Stop() error
- type QuorumControlsAPI
- func (q *QuorumControlsAPI) AcctList() []core.AccountInfo
- func (q *QuorumControlsAPI) AddAccountToOrg(acct common.Address, orgId string, roleId string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) AddNewRole(orgId string, roleId string, access uint8, isVoter bool, isAdmin bool, ...) (string, error)
- func (q *QuorumControlsAPI) AddNode(orgId string, url string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) AddOrg(orgId string, url string, acct common.Address, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) AddSubOrg(porgId, orgId string, url string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ApproveAdminRole(orgId string, acct common.Address, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ApproveBlackListedAccountRecovery(orgId string, acctId common.Address, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ApproveBlackListedNodeRecovery(orgId string, enodeId string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ApproveOrg(orgId string, url string, acct common.Address, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ApproveOrgStatus(orgId string, status uint8, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) AssignAdminRole(orgId string, acct common.Address, roleId string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ChangeAccountRole(acct common.Address, orgId string, roleId string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) ConnectionAllowed(enodeId, ip string, port, raftPort uint16) bool
- func (q *QuorumControlsAPI) GetOrgDetails(orgId string) (core.OrgDetailInfo, error)
- func (q *QuorumControlsAPI) NodeList() []core.NodeInfo
- func (q *QuorumControlsAPI) OrgList() []core.OrgInfo
- func (q *QuorumControlsAPI) RecoverBlackListedAccount(orgId string, acctId common.Address, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) RecoverBlackListedNode(orgId string, enodeId string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) RemoveRole(orgId string, roleId string, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) RoleList() []core.RoleInfo
- func (q *QuorumControlsAPI) TransactionAllowed(txa ethapi.SendTxArgs) bool
- func (q *QuorumControlsAPI) UpdateAccountStatus(orgId string, acct common.Address, status uint8, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) UpdateNodeStatus(orgId string, url string, action uint8, txa ethapi.SendTxArgs) (string, error)
- func (q *QuorumControlsAPI) UpdateOrgStatus(orgId string, status uint8, txa ethapi.SendTxArgs) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNodePermissioned ¶
func NewPermissionContractService ¶
func NewPermissionContractService(ethClnt bind.ContractBackend, permissionV2 bool, key *ecdsa.PrivateKey, permConfig *ptype.PermissionConfig, isRaft, useDns bool, chainId *big.Int) ptype.InitService
Types ¶
type AccountUpdateAction ¶
type AccountUpdateAction int
const ( SuspendAccount AccountUpdateAction = iota + 1 ActivateSuspendedAccount BlacklistAccount RecoverBlacklistedAccount ApproveBlacklistedAccountRecovery )
type NodeUpdateAction ¶
type NodeUpdateAction int
const ( SuspendNode NodeUpdateAction = iota + 1 ActivateSuspendedNode BlacklistNode RecoverBlacklistedNode ApproveBlacklistedNodeRecovery )
type OrgUpdateAction ¶
type OrgUpdateAction int
const ( SuspendOrg OrgUpdateAction = iota + 1 ActivateSuspendedOrg )
type PendingOpInfo ¶
type PermAction ¶
type PermAction int
PermAction represents actions in permission contract
const ( AddOrg PermAction = iota ApproveOrg AddSubOrg UpdateOrgStatus ApproveOrgStatus AddNode UpdateNodeStatus AssignAdminRole ApproveAdminRole AddNewRole RemoveRole AddAccountToOrg ChangeAccountRole UpdateAccountStatus InitiateNodeRecovery InitiateAccountRecovery ApproveNodeRecovery ApproveAccountRecovery )
type PermissionCtrl ¶
type PermissionCtrl struct {
// contains filtered or unexported fields
}
func NewQuorumPermissionCtrl ¶
func NewQuorumPermissionCtrl(stack *node.Node, pconfig *ptype.PermissionConfig, useDns bool, chainID *big.Int) (*PermissionCtrl, error)
Create a service instance for permissioning
Permission Service depends on the following: 1. EthService to be ready 2. Downloader to sync up blocks 3. InProc RPC server to be ready
func (*PermissionCtrl) AfterStart ¶
func (p *PermissionCtrl) AfterStart() error
This is to make sure all contract instances are ready and initialized
Required to be call after standard service start lifecycle
func (*PermissionCtrl) ConnectionAllowed ¶
func (p *PermissionCtrl) ConnectionAllowed(_enodeId, _ip string, _port, _raftPort uint16) (bool, error)
func (*PermissionCtrl) IsTransactionAllowed ¶
func (*PermissionCtrl) IsV2Permission ¶
func (p *PermissionCtrl) IsV2Permission() bool
func (*PermissionCtrl) NewPermissionAccountService ¶
func (p *PermissionCtrl) NewPermissionAccountService(txa ethapi.SendTxArgs) (ptype.AccountService, error)
func (*PermissionCtrl) NewPermissionAuditService ¶
func (p *PermissionCtrl) NewPermissionAuditService() (ptype.AuditService, error)
func (*PermissionCtrl) NewPermissionControlService ¶
func (p *PermissionCtrl) NewPermissionControlService() (ptype.ControlService, error)
func (*PermissionCtrl) NewPermissionNodeService ¶
func (p *PermissionCtrl) NewPermissionNodeService(txa ethapi.SendTxArgs) (ptype.NodeService, error)
func (*PermissionCtrl) NewPermissionOrgService ¶
func (p *PermissionCtrl) NewPermissionOrgService(txa ethapi.SendTxArgs) (ptype.OrgService, error)
func (*PermissionCtrl) NewPermissionRoleService ¶
func (p *PermissionCtrl) NewPermissionRoleService(txa ethapi.SendTxArgs) (ptype.RoleService, error)
func (*PermissionCtrl) Start ¶
func (p *PermissionCtrl) Start() error
func (*PermissionCtrl) Stop ¶
func (p *PermissionCtrl) Stop() error
type QuorumControlsAPI ¶
type QuorumControlsAPI struct {
// contains filtered or unexported fields
}
QuorumControlsAPI provides an API to access Quorum's enterprise permissions related services
func NewQuorumControlsAPI ¶
func NewQuorumControlsAPI(p *PermissionCtrl) *QuorumControlsAPI
NewQuorumControlsAPI creates a new QuorumControlsAPI to access quorum services
func (*QuorumControlsAPI) AcctList ¶
func (q *QuorumControlsAPI) AcctList() []core.AccountInfo
func (*QuorumControlsAPI) AddAccountToOrg ¶
func (q *QuorumControlsAPI) AddAccountToOrg(acct common.Address, orgId string, roleId string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) AddNewRole ¶
func (q *QuorumControlsAPI) AddNewRole(orgId string, roleId string, access uint8, isVoter bool, isAdmin bool, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) AddNode ¶
func (q *QuorumControlsAPI) AddNode(orgId string, url string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) AddOrg ¶
func (q *QuorumControlsAPI) AddOrg(orgId string, url string, acct common.Address, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) AddSubOrg ¶
func (q *QuorumControlsAPI) AddSubOrg(porgId, orgId string, url string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ApproveAdminRole ¶
func (q *QuorumControlsAPI) ApproveAdminRole(orgId string, acct common.Address, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ApproveBlackListedAccountRecovery ¶
func (q *QuorumControlsAPI) ApproveBlackListedAccountRecovery(orgId string, acctId common.Address, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ApproveBlackListedNodeRecovery ¶
func (q *QuorumControlsAPI) ApproveBlackListedNodeRecovery(orgId string, enodeId string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ApproveOrg ¶
func (q *QuorumControlsAPI) ApproveOrg(orgId string, url string, acct common.Address, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ApproveOrgStatus ¶
func (q *QuorumControlsAPI) ApproveOrgStatus(orgId string, status uint8, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) AssignAdminRole ¶
func (q *QuorumControlsAPI) AssignAdminRole(orgId string, acct common.Address, roleId string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ChangeAccountRole ¶
func (q *QuorumControlsAPI) ChangeAccountRole(acct common.Address, orgId string, roleId string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) ConnectionAllowed ¶
func (q *QuorumControlsAPI) ConnectionAllowed(enodeId, ip string, port, raftPort uint16) bool
func (*QuorumControlsAPI) GetOrgDetails ¶
func (q *QuorumControlsAPI) GetOrgDetails(orgId string) (core.OrgDetailInfo, error)
func (*QuorumControlsAPI) NodeList ¶
func (q *QuorumControlsAPI) NodeList() []core.NodeInfo
func (*QuorumControlsAPI) OrgList ¶
func (q *QuorumControlsAPI) OrgList() []core.OrgInfo
func (*QuorumControlsAPI) RecoverBlackListedAccount ¶
func (q *QuorumControlsAPI) RecoverBlackListedAccount(orgId string, acctId common.Address, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) RecoverBlackListedNode ¶
func (q *QuorumControlsAPI) RecoverBlackListedNode(orgId string, enodeId string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) RemoveRole ¶
func (q *QuorumControlsAPI) RemoveRole(orgId string, roleId string, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) RoleList ¶
func (q *QuorumControlsAPI) RoleList() []core.RoleInfo
func (*QuorumControlsAPI) TransactionAllowed ¶
func (q *QuorumControlsAPI) TransactionAllowed(txa ethapi.SendTxArgs) bool
func (*QuorumControlsAPI) UpdateAccountStatus ¶
func (q *QuorumControlsAPI) UpdateAccountStatus(orgId string, acct common.Address, status uint8, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) UpdateNodeStatus ¶
func (q *QuorumControlsAPI) UpdateNodeStatus(orgId string, url string, action uint8, txa ethapi.SendTxArgs) (string, error)
func (*QuorumControlsAPI) UpdateOrgStatus ¶
func (q *QuorumControlsAPI) UpdateOrgStatus(orgId string, status uint8, txa ethapi.SendTxArgs) (string, error)
Click to show internal directories.
Click to hide internal directories.