permission

package
v0.0.0-...-0599406 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePermissionConfig

func ParsePermissionConfig(dir string) (types.PermissionConfig, error)

function reads the permissions config file passed and populates the config structure accordingly

Types

type AccountUpdateAction

type AccountUpdateAction int
const (
	SuspendAccount AccountUpdateAction = iota + 1
	ActivateSuspendedAccount
	BlacklistAccount
	RecoverBlacklistedAccount
	ApproveBlacklistedAccountRecovery
)

type NodeOperation

type NodeOperation uint8
const (
	NodeAdd NodeOperation = iota
	NodeDelete
)

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 PendingOpInfo struct {
	PendingKey string `json:"pendingKey"`
	PendingOp  string `json:"pendingOp"`
}

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 *types.PermissionConfig) (*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) APIs

func (p *PermissionCtrl) APIs() []rpc.API

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) Protocols

func (p *PermissionCtrl) Protocols() []p2p.Protocol

func (*PermissionCtrl) Start

func (p *PermissionCtrl) Start(srvr *p2p.Server) 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 node permission and org key management 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() []types.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) GetOrgDetails

func (q *QuorumControlsAPI) GetOrgDetails(orgId string) (types.OrgDetailInfo, error)

func (*QuorumControlsAPI) NodeList

func (q *QuorumControlsAPI) NodeList() []types.NodeInfo

func (*QuorumControlsAPI) OrgList

func (q *QuorumControlsAPI) OrgList() []types.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() []types.RoleInfo

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)

Directories

Path Synopsis
contract
gen

Jump to

Keyboard shortcuts

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