v2

package
v0.0.0-...-1d3cd56 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Backend *PermissionModelV2
}

func (*Account) ApproveAdminRole

func (a *Account) ApproveAdminRole(_args ptype.TxArgs) (*types.Transaction, error)

func (*Account) ApproveBlacklistedAccountRecovery

func (a *Account) ApproveBlacklistedAccountRecovery(_args ptype.TxArgs) (*types.Transaction, error)

func (*Account) AssignAccountRole

func (a *Account) AssignAccountRole(_args ptype.TxArgs) (*types.Transaction, error)

func (*Account) AssignAdminRole

func (a *Account) AssignAdminRole(_args ptype.TxArgs) (*types.Transaction, error)

func (*Account) StartBlacklistedAccountRecovery

func (a *Account) StartBlacklistedAccountRecovery(_args ptype.TxArgs) (*types.Transaction, error)

func (*Account) UpdateAccountStatus

func (a *Account) UpdateAccountStatus(_args ptype.TxArgs) (*types.Transaction, error)

type Audit

type Audit struct {
	Backend *PermissionModelV2
}

func (*Audit) CheckPendingOp

func (a *Audit) CheckPendingOp(_orgId string) bool

func (*Audit) ValidatePendingOp

func (a *Audit) ValidatePendingOp(_authOrg, _orgId, _url string, _account common.Address, _pendingOp int64) bool

type Backend

type Backend struct {
	Ib    ptype.InterfaceBackend
	Contr *Init
}

func (*Backend) GetAccountService

func (b *Backend) GetAccountService(transactOpts *bind.TransactOpts, accountBackend ptype.ContractBackend) (ptype.AccountService, error)

func (*Backend) GetAuditService

func (b *Backend) GetAuditService(auditBackend ptype.ContractBackend) (ptype.AuditService, error)

func (*Backend) GetControlService

func (b *Backend) GetControlService(controlBackend ptype.ContractBackend) (ptype.ControlService, error)

func (*Backend) GetNodeService

func (b *Backend) GetNodeService(transactOpts *bind.TransactOpts, nodeBackend ptype.ContractBackend) (ptype.NodeService, error)

func (*Backend) GetOrgService

func (b *Backend) GetOrgService(transactOpts *bind.TransactOpts, orgBackend ptype.ContractBackend) (ptype.OrgService, error)

func (*Backend) GetRoleService

func (b *Backend) GetRoleService(transactOpts *bind.TransactOpts, roleBackend ptype.ContractBackend) (ptype.RoleService, error)

func (*Backend) ManageAccountPermissions

func (b *Backend) ManageAccountPermissions() error

func (*Backend) ManageNodePermissions

func (b *Backend) ManageNodePermissions() error

func (*Backend) ManageOrgPermissions

func (b *Backend) ManageOrgPermissions() error

func (*Backend) ManageRolePermissions

func (b *Backend) ManageRolePermissions() error

func (*Backend) MonitorNetworkBootUp

func (b *Backend) MonitorNetworkBootUp() error

type Control

type Control struct {
	Backend *PermissionModelV2
}

func (*Control) ConnectionAllowed

func (c *Control) ConnectionAllowed(_enodeId, _ip string, _port, _raftPort uint16) (bool, error)

func (*Control) TransactionAllowed

func (c *Control) TransactionAllowed(_sender common.Address, _target common.Address, _value *big.Int, _gasPrice *big.Int, _gasLimit *big.Int, _payload []byte, _transactionType core.TransactionType) error

type Init

type Init struct {
	Backend ptype.ContractBackend
	//binding contracts
	PermUpgr   *binding.PermUpgr
	PermInterf *binding.PermInterface
	PermNode   *binding.NodeManager
	PermAcct   *binding.AcctManager
	PermRole   *binding.RoleManager
	PermOrg    *binding.OrgManager
	//sessions
	PermInterfSession *binding.PermInterfaceSession
	// contains filtered or unexported fields
}

func (*Init) AddAdminAccount

func (i *Init) AddAdminAccount(_acct common.Address) (*types.Transaction, error)

func (*Init) AddAdminNode

func (i *Init) AddAdminNode(url string) (*types.Transaction, error)

func (*Init) BindContracts

func (i *Init) BindContracts() error

This is to make sure all contract instances are ready and initialized

Required to be call after standard service start lifecycle

func (*Init) GetAccountDetails

func (i *Init) GetAccountDetails(_account common.Address) (common.Address, string, string, *big.Int, bool, error)

func (*Init) GetAccountDetailsFromIndex

func (i *Init) GetAccountDetailsFromIndex(_aIndex *big.Int) (common.Address, string, string, *big.Int, bool, error)

func (*Init) GetNetworkBootStatus

func (i *Init) GetNetworkBootStatus() (bool, error)

func (*Init) GetNodeDetails

func (i *Init) GetNodeDetails(enodeId string) (string, string, *big.Int, error)

func (*Init) GetNodeDetailsFromIndex

func (i *Init) GetNodeDetailsFromIndex(_nodeIndex *big.Int) (string, string, *big.Int, error)

func (*Init) GetNumberOfAccounts

func (i *Init) GetNumberOfAccounts() (*big.Int, error)

func (*Init) GetNumberOfNodes

func (i *Init) GetNumberOfNodes() (*big.Int, error)

func (*Init) GetNumberOfOrgs

func (i *Init) GetNumberOfOrgs() (*big.Int, error)

func (*Init) GetNumberOfRoles

func (i *Init) GetNumberOfRoles() (*big.Int, error)

func (*Init) GetOrgDetails

func (i *Init) GetOrgDetails(_orgId string) (string, string, string, *big.Int, *big.Int, error)

func (*Init) GetOrgInfo

func (i *Init) GetOrgInfo(_orgIndex *big.Int) (string, string, string, *big.Int, *big.Int, error)

func (*Init) GetRoleDetails

func (i *Init) GetRoleDetails(_roleId string, _orgId string) (struct {
	RoleId     string
	OrgId      string
	AccessType *big.Int
	Voter      bool
	Admin      bool
	Active     bool
}, error)

func (*Init) GetRoleDetailsFromIndex

func (i *Init) GetRoleDetailsFromIndex(_rIndex *big.Int) (struct {
	RoleId     string
	OrgId      string
	AccessType *big.Int
	Voter      bool
	Admin      bool
	Active     bool
}, error)

func (*Init) GetSubOrgIndexes

func (i *Init) GetSubOrgIndexes(_orgId string) ([]*big.Int, error)

func (*Init) Init

func (i *Init) Init(_breadth *big.Int, _depth *big.Int) (*types.Transaction, error)

func (*Init) SetPolicy

func (i *Init) SetPolicy(_nwAdminOrg string, _nwAdminRole string, _oAdminRole string) (*types.Transaction, error)

func (*Init) UpdateNetworkBootStatus

func (i *Init) UpdateNetworkBootStatus() (*types.Transaction, error)

type Node

type Node struct {
	Backend *PermissionModelV2
}

func (*Node) AddNode

func (n *Node) AddNode(_args ptype.TxArgs) (*types.Transaction, error)

func (*Node) ApproveBlacklistedNodeRecovery

func (n *Node) ApproveBlacklistedNodeRecovery(_args ptype.TxArgs) (*types.Transaction, error)

func (*Node) StartBlacklistedNodeRecovery

func (n *Node) StartBlacklistedNodeRecovery(_args ptype.TxArgs) (*types.Transaction, error)

func (*Node) UpdateNodeStatus

func (n *Node) UpdateNodeStatus(_args ptype.TxArgs) (*types.Transaction, error)

type Org

type Org struct {
	Backend *PermissionModelV2
}

func (*Org) AddOrg

func (o *Org) AddOrg(_args ptype.TxArgs) (*types.Transaction, error)

func (*Org) AddSubOrg

func (o *Org) AddSubOrg(_args ptype.TxArgs) (*types.Transaction, error)

func (*Org) ApproveOrg

func (o *Org) ApproveOrg(_args ptype.TxArgs) (*types.Transaction, error)

func (*Org) ApproveOrgStatus

func (o *Org) ApproveOrgStatus(_args ptype.TxArgs) (*types.Transaction, error)

func (*Org) UpdateOrgStatus

func (o *Org) UpdateOrgStatus(_args ptype.TxArgs) (*types.Transaction, error)

type PermissionModelV2

type PermissionModelV2 struct {
	ContractBackend   ptype.ContractBackend
	PermInterf        *binding.PermInterface
	PermInterfSession *binding.PermInterfaceSession
}

type Role

type Role struct {
	Backend *PermissionModelV2
}

func (*Role) AddNewRole

func (r *Role) AddNewRole(_args ptype.TxArgs) (*types.Transaction, error)

func (*Role) RemoveRole

func (r *Role) RemoveRole(_args ptype.TxArgs) (*types.Transaction, error)

Directories

Path Synopsis
contract
gen

Jump to

Keyboard shortcuts

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