2018-07-11 00:25:45 -07:00
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package permissions
import (
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// PermissionsABI is the input ABI used to generate the binding from.
2018-08-31 04:35:35 -07:00
const PermissionsABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"BlacklistNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"getNodeStatus\",\"outputs\":[{\"name\":\"_status\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_canWrite\",\"type\":\"bool\"},{\"name\":\"_canLead\",\"type\":\"bool\"},{\"name\":\"_ipAddrPort\",\"type\":\"string\"},{\"name\":\"_discPort\",\"type\":\"string\"},{\"name\":\"_raftPort\",\"type\":\"string\"}],\"name\":\"ProposeNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"ProposeDeactivation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_acctId\",\"type\":\"address\"},{\"name\":\"access\",\"type\":\"uint8\"}],\"name\":\"updateAcctAccess\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"DeactivateNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"ApproveNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ipAddrPort\",\"type\":\"string\"},{\"name\":\"_discPort\",\"type\":\"string\"},{\"name\":\"_raftPort\",\"type\":\"string\"}],\"name\":\"ProposeNodeBlacklisting\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"NewNodeProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ipAddrPort\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_discPort\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_raftPort\",\"type\":\"string\"}],\"name\":\"NodeApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"NodePendingDeactivation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ipAddrPort\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_discPort\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_raftPort\",\"type\":\"string\"}],\"name\":\"NodeDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"acctId\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"access\",\"type\":\"uint8\"}],\"name\":\"AcctAccessModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"}],\"name\":\"NodePendingBlacklisting\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ipAddrPort\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_discPort\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_raftPort\",\"type\":\"string\"}],\"name\":\"NodeBlacklisted\",\"type\":\"event\"}]"
2018-07-11 00:25:45 -07:00
// Permissions is an auto generated Go binding around an Ethereum contract.
type Permissions struct {
PermissionsCaller // Read-only binding to the contract
PermissionsTransactor // Write-only binding to the contract
PermissionsFilterer // Log filterer for contract events
}
// PermissionsCaller is an auto generated read-only Go binding around an Ethereum contract.
type PermissionsCaller struct {
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
// PermissionsTransactor is an auto generated write-only Go binding around an Ethereum contract.
type PermissionsTransactor struct {
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
// PermissionsFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type PermissionsFilterer struct {
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
// PermissionsSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type PermissionsSession struct {
Contract * Permissions // 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
}
// PermissionsCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type PermissionsCallerSession struct {
Contract * PermissionsCaller // Generic contract caller binding to set the session for
CallOpts bind . CallOpts // Call options to use throughout this session
}
// PermissionsTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type PermissionsTransactorSession struct {
Contract * PermissionsTransactor // Generic contract transactor binding to set the session for
TransactOpts bind . TransactOpts // Transaction auth options to use throughout this session
}
// PermissionsRaw is an auto generated low-level Go binding around an Ethereum contract.
type PermissionsRaw struct {
Contract * Permissions // Generic contract binding to access the raw methods on
}
// PermissionsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type PermissionsCallerRaw struct {
Contract * PermissionsCaller // Generic read-only contract binding to access the raw methods on
}
// PermissionsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type PermissionsTransactorRaw struct {
Contract * PermissionsTransactor // Generic write-only contract binding to access the raw methods on
}
// NewPermissions creates a new instance of Permissions, bound to a specific deployed contract.
func NewPermissions ( address common . Address , backend bind . ContractBackend ) ( * Permissions , error ) {
contract , err := bindPermissions ( address , backend , backend , backend )
if err != nil {
return nil , err
}
return & Permissions { PermissionsCaller : PermissionsCaller { contract : contract } , PermissionsTransactor : PermissionsTransactor { contract : contract } , PermissionsFilterer : PermissionsFilterer { contract : contract } } , nil
}
// NewPermissionsCaller creates a new read-only instance of Permissions, bound to a specific deployed contract.
func NewPermissionsCaller ( address common . Address , caller bind . ContractCaller ) ( * PermissionsCaller , error ) {
contract , err := bindPermissions ( address , caller , nil , nil )
if err != nil {
return nil , err
}
return & PermissionsCaller { contract : contract } , nil
}
// NewPermissionsTransactor creates a new write-only instance of Permissions, bound to a specific deployed contract.
func NewPermissionsTransactor ( address common . Address , transactor bind . ContractTransactor ) ( * PermissionsTransactor , error ) {
contract , err := bindPermissions ( address , nil , transactor , nil )
if err != nil {
return nil , err
}
return & PermissionsTransactor { contract : contract } , nil
}
// NewPermissionsFilterer creates a new log filterer instance of Permissions, bound to a specific deployed contract.
func NewPermissionsFilterer ( address common . Address , filterer bind . ContractFilterer ) ( * PermissionsFilterer , error ) {
contract , err := bindPermissions ( address , nil , nil , filterer )
if err != nil {
return nil , err
}
return & PermissionsFilterer { contract : contract } , nil
}
// bindPermissions binds a generic wrapper to an already deployed contract.
func bindPermissions ( address common . Address , caller bind . ContractCaller , transactor bind . ContractTransactor , filterer bind . ContractFilterer ) ( * bind . BoundContract , error ) {
parsed , err := abi . JSON ( strings . NewReader ( PermissionsABI ) )
if err != nil {
return nil , err
}
return bind . NewBoundContract ( address , parsed , caller , transactor , filterer ) , nil
}
// 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 ( _Permissions * PermissionsRaw ) Call ( opts * bind . CallOpts , result interface { } , method string , params ... interface { } ) error {
return _Permissions . Contract . PermissionsCaller . contract . Call ( opts , result , method , params ... )
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func ( _Permissions * PermissionsRaw ) Transfer ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _Permissions . Contract . PermissionsTransactor . contract . Transfer ( opts )
}
// Transact invokes the (paid) contract method with params as input values.
func ( _Permissions * PermissionsRaw ) Transact ( opts * bind . TransactOpts , method string , params ... interface { } ) ( * types . Transaction , error ) {
return _Permissions . Contract . PermissionsTransactor . contract . Transact ( opts , method , params ... )
}
// 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 ( _Permissions * PermissionsCallerRaw ) Call ( opts * bind . CallOpts , result interface { } , method string , params ... interface { } ) error {
return _Permissions . Contract . contract . Call ( opts , result , method , params ... )
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func ( _Permissions * PermissionsTransactorRaw ) Transfer ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _Permissions . Contract . contract . Transfer ( opts )
}
// Transact invokes the (paid) contract method with params as input values.
func ( _Permissions * PermissionsTransactorRaw ) Transact ( opts * bind . TransactOpts , method string , params ... interface { } ) ( * types . Transaction , error ) {
return _Permissions . Contract . contract . Transact ( opts , method , params ... )
}
// GetNodeStatus is a free data retrieval call binding the contract method 0x397eeccb.
//
// Solidity: function getNodeStatus(_enodeId string) constant returns(_status uint8)
func ( _Permissions * PermissionsCaller ) GetNodeStatus ( opts * bind . CallOpts , _enodeId string ) ( uint8 , error ) {
var (
ret0 = new ( uint8 )
)
out := ret0
err := _Permissions . contract . Call ( opts , out , "getNodeStatus" , _enodeId )
return * ret0 , err
}
// GetNodeStatus is a free data retrieval call binding the contract method 0x397eeccb.
//
// Solidity: function getNodeStatus(_enodeId string) constant returns(_status uint8)
func ( _Permissions * PermissionsSession ) GetNodeStatus ( _enodeId string ) ( uint8 , error ) {
return _Permissions . Contract . GetNodeStatus ( & _Permissions . CallOpts , _enodeId )
}
// GetNodeStatus is a free data retrieval call binding the contract method 0x397eeccb.
//
// Solidity: function getNodeStatus(_enodeId string) constant returns(_status uint8)
func ( _Permissions * PermissionsCallerSession ) GetNodeStatus ( _enodeId string ) ( uint8 , error ) {
return _Permissions . Contract . GetNodeStatus ( & _Permissions . CallOpts , _enodeId )
}
// ApproveNode is a paid mutator transaction binding the contract method 0xc1dd1d92.
//
// Solidity: function ApproveNode(_enodeId string) returns()
func ( _Permissions * PermissionsTransactor ) ApproveNode ( opts * bind . TransactOpts , _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "ApproveNode" , _enodeId )
}
// ApproveNode is a paid mutator transaction binding the contract method 0xc1dd1d92.
//
// Solidity: function ApproveNode(_enodeId string) returns()
func ( _Permissions * PermissionsSession ) ApproveNode ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ApproveNode ( & _Permissions . TransactOpts , _enodeId )
}
// ApproveNode is a paid mutator transaction binding the contract method 0xc1dd1d92.
//
// Solidity: function ApproveNode(_enodeId string) returns()
func ( _Permissions * PermissionsTransactorSession ) ApproveNode ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ApproveNode ( & _Permissions . TransactOpts , _enodeId )
}
2018-08-31 04:35:35 -07:00
// BlacklistNode is a paid mutator transaction binding the contract method 0x2b6f15a1.
//
// Solidity: function BlacklistNode(_enodeId string) returns()
func ( _Permissions * PermissionsTransactor ) BlacklistNode ( opts * bind . TransactOpts , _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "BlacklistNode" , _enodeId )
}
// BlacklistNode is a paid mutator transaction binding the contract method 0x2b6f15a1.
//
// Solidity: function BlacklistNode(_enodeId string) returns()
func ( _Permissions * PermissionsSession ) BlacklistNode ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . BlacklistNode ( & _Permissions . TransactOpts , _enodeId )
}
// BlacklistNode is a paid mutator transaction binding the contract method 0x2b6f15a1.
//
// Solidity: function BlacklistNode(_enodeId string) returns()
func ( _Permissions * PermissionsTransactorSession ) BlacklistNode ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . BlacklistNode ( & _Permissions . TransactOpts , _enodeId )
}
2018-07-11 00:25:45 -07:00
// DeactivateNode is a paid mutator transaction binding the contract method 0xbc67f80b.
//
// Solidity: function DeactivateNode(_enodeId string) returns()
func ( _Permissions * PermissionsTransactor ) DeactivateNode ( opts * bind . TransactOpts , _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "DeactivateNode" , _enodeId )
}
// DeactivateNode is a paid mutator transaction binding the contract method 0xbc67f80b.
//
// Solidity: function DeactivateNode(_enodeId string) returns()
func ( _Permissions * PermissionsSession ) DeactivateNode ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . DeactivateNode ( & _Permissions . TransactOpts , _enodeId )
}
// DeactivateNode is a paid mutator transaction binding the contract method 0xbc67f80b.
//
// Solidity: function DeactivateNode(_enodeId string) returns()
func ( _Permissions * PermissionsTransactorSession ) DeactivateNode ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . DeactivateNode ( & _Permissions . TransactOpts , _enodeId )
}
// ProposeDeactivation is a paid mutator transaction binding the contract method 0x6dcd03e0.
//
// Solidity: function ProposeDeactivation(_enodeId string) returns()
func ( _Permissions * PermissionsTransactor ) ProposeDeactivation ( opts * bind . TransactOpts , _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "ProposeDeactivation" , _enodeId )
}
// ProposeDeactivation is a paid mutator transaction binding the contract method 0x6dcd03e0.
//
// Solidity: function ProposeDeactivation(_enodeId string) returns()
func ( _Permissions * PermissionsSession ) ProposeDeactivation ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ProposeDeactivation ( & _Permissions . TransactOpts , _enodeId )
}
// ProposeDeactivation is a paid mutator transaction binding the contract method 0x6dcd03e0.
//
// Solidity: function ProposeDeactivation(_enodeId string) returns()
func ( _Permissions * PermissionsTransactorSession ) ProposeDeactivation ( _enodeId string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ProposeDeactivation ( & _Permissions . TransactOpts , _enodeId )
}
2018-08-12 19:00:35 -07:00
// ProposeNode is a paid mutator transaction binding the contract method 0x6b4b4867.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: function ProposeNode(_enodeId string, _canWrite bool, _canLead bool, _ipAddrPort string, _discPort string, _raftPort string) returns()
func ( _Permissions * PermissionsTransactor ) ProposeNode ( opts * bind . TransactOpts , _enodeId string , _canWrite bool , _canLead bool , _ipAddrPort string , _discPort string , _raftPort string ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "ProposeNode" , _enodeId , _canWrite , _canLead , _ipAddrPort , _discPort , _raftPort )
2018-07-11 00:25:45 -07:00
}
2018-08-12 19:00:35 -07:00
// ProposeNode is a paid mutator transaction binding the contract method 0x6b4b4867.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: function ProposeNode(_enodeId string, _canWrite bool, _canLead bool, _ipAddrPort string, _discPort string, _raftPort string) returns()
func ( _Permissions * PermissionsSession ) ProposeNode ( _enodeId string , _canWrite bool , _canLead bool , _ipAddrPort string , _discPort string , _raftPort string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ProposeNode ( & _Permissions . TransactOpts , _enodeId , _canWrite , _canLead , _ipAddrPort , _discPort , _raftPort )
2018-07-11 00:25:45 -07:00
}
2018-08-12 19:00:35 -07:00
// ProposeNode is a paid mutator transaction binding the contract method 0x6b4b4867.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: function ProposeNode(_enodeId string, _canWrite bool, _canLead bool, _ipAddrPort string, _discPort string, _raftPort string) returns()
func ( _Permissions * PermissionsTransactorSession ) ProposeNode ( _enodeId string , _canWrite bool , _canLead bool , _ipAddrPort string , _discPort string , _raftPort string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ProposeNode ( & _Permissions . TransactOpts , _enodeId , _canWrite , _canLead , _ipAddrPort , _discPort , _raftPort )
2018-07-11 00:25:45 -07:00
}
2018-08-31 04:35:35 -07:00
// ProposeNodeBlacklisting is a paid mutator transaction binding the contract method 0xf06be99b.
//
// Solidity: function ProposeNodeBlacklisting(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string) returns()
func ( _Permissions * PermissionsTransactor ) ProposeNodeBlacklisting ( opts * bind . TransactOpts , _enodeId string , _ipAddrPort string , _discPort string , _raftPort string ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "ProposeNodeBlacklisting" , _enodeId , _ipAddrPort , _discPort , _raftPort )
}
// ProposeNodeBlacklisting is a paid mutator transaction binding the contract method 0xf06be99b.
//
// Solidity: function ProposeNodeBlacklisting(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string) returns()
func ( _Permissions * PermissionsSession ) ProposeNodeBlacklisting ( _enodeId string , _ipAddrPort string , _discPort string , _raftPort string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ProposeNodeBlacklisting ( & _Permissions . TransactOpts , _enodeId , _ipAddrPort , _discPort , _raftPort )
}
// ProposeNodeBlacklisting is a paid mutator transaction binding the contract method 0xf06be99b.
//
// Solidity: function ProposeNodeBlacklisting(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string) returns()
func ( _Permissions * PermissionsTransactorSession ) ProposeNodeBlacklisting ( _enodeId string , _ipAddrPort string , _discPort string , _raftPort string ) ( * types . Transaction , error ) {
return _Permissions . Contract . ProposeNodeBlacklisting ( & _Permissions . TransactOpts , _enodeId , _ipAddrPort , _discPort , _raftPort )
}
2018-08-05 22:26:29 -07:00
// UpdateAcctAccess is a paid mutator transaction binding the contract method 0x913fc7d7.
//
// Solidity: function updateAcctAccess(_acctId address, access uint8) returns()
func ( _Permissions * PermissionsTransactor ) UpdateAcctAccess ( opts * bind . TransactOpts , _acctId common . Address , access uint8 ) ( * types . Transaction , error ) {
return _Permissions . contract . Transact ( opts , "updateAcctAccess" , _acctId , access )
}
// UpdateAcctAccess is a paid mutator transaction binding the contract method 0x913fc7d7.
//
// Solidity: function updateAcctAccess(_acctId address, access uint8) returns()
func ( _Permissions * PermissionsSession ) UpdateAcctAccess ( _acctId common . Address , access uint8 ) ( * types . Transaction , error ) {
return _Permissions . Contract . UpdateAcctAccess ( & _Permissions . TransactOpts , _acctId , access )
}
// UpdateAcctAccess is a paid mutator transaction binding the contract method 0x913fc7d7.
//
// Solidity: function updateAcctAccess(_acctId address, access uint8) returns()
func ( _Permissions * PermissionsTransactorSession ) UpdateAcctAccess ( _acctId common . Address , access uint8 ) ( * types . Transaction , error ) {
return _Permissions . Contract . UpdateAcctAccess ( & _Permissions . TransactOpts , _acctId , access )
}
// PermissionsAcctAccessModifiedIterator is returned from FilterAcctAccessModified and is used to iterate over the raw logs and unpacked data for AcctAccessModified events raised by the Permissions contract.
type PermissionsAcctAccessModifiedIterator struct {
Event * PermissionsAcctAccessModified // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsAcctAccessModifiedIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsAcctAccessModified )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsAcctAccessModified )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsAcctAccessModifiedIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsAcctAccessModifiedIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsAcctAccessModified represents a AcctAccessModified event raised by the Permissions contract.
type PermissionsAcctAccessModified struct {
AcctId common . Address
Access uint8
Raw types . Log // Blockchain specific contextual infos
}
// FilterAcctAccessModified is a free log retrieval operation binding the contract event 0xb9f8d88def106a1a167b617a197bee4323d3997cb1fa46b785c1a7b9af6e82a8.
//
// Solidity: e AcctAccessModified(acctId address, access uint8)
func ( _Permissions * PermissionsFilterer ) FilterAcctAccessModified ( opts * bind . FilterOpts ) ( * PermissionsAcctAccessModifiedIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "AcctAccessModified" )
if err != nil {
return nil , err
}
return & PermissionsAcctAccessModifiedIterator { contract : _Permissions . contract , event : "AcctAccessModified" , logs : logs , sub : sub } , nil
}
// WatchAcctAccessModified is a free log subscription operation binding the contract event 0xb9f8d88def106a1a167b617a197bee4323d3997cb1fa46b785c1a7b9af6e82a8.
//
// Solidity: e AcctAccessModified(acctId address, access uint8)
func ( _Permissions * PermissionsFilterer ) WatchAcctAccessModified ( opts * bind . WatchOpts , sink chan <- * PermissionsAcctAccessModified ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "AcctAccessModified" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsAcctAccessModified )
if err := _Permissions . contract . UnpackLog ( event , "AcctAccessModified" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-07-11 00:25:45 -07:00
// PermissionsNewNodeProposedIterator is returned from FilterNewNodeProposed and is used to iterate over the raw logs and unpacked data for NewNodeProposed events raised by the Permissions contract.
type PermissionsNewNodeProposedIterator struct {
Event * PermissionsNewNodeProposed // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsNewNodeProposedIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsNewNodeProposed )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsNewNodeProposed )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsNewNodeProposedIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsNewNodeProposedIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsNewNodeProposed represents a NewNodeProposed event raised by the Permissions contract.
type PermissionsNewNodeProposed struct {
2018-08-12 19:00:35 -07:00
EnodeId string
Raw types . Log // Blockchain specific contextual infos
2018-07-11 00:25:45 -07:00
}
2018-08-12 19:00:35 -07:00
// FilterNewNodeProposed is a free log retrieval operation binding the contract event 0xe370df14cec622d932b6c03454042c48c2815c9f96d22ab2bdb2e7171d96eb00.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: e NewNodeProposed(_enodeId string)
2018-07-11 00:25:45 -07:00
func ( _Permissions * PermissionsFilterer ) FilterNewNodeProposed ( opts * bind . FilterOpts ) ( * PermissionsNewNodeProposedIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "NewNodeProposed" )
if err != nil {
return nil , err
}
return & PermissionsNewNodeProposedIterator { contract : _Permissions . contract , event : "NewNodeProposed" , logs : logs , sub : sub } , nil
}
2018-08-12 19:00:35 -07:00
// WatchNewNodeProposed is a free log subscription operation binding the contract event 0xe370df14cec622d932b6c03454042c48c2815c9f96d22ab2bdb2e7171d96eb00.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: e NewNodeProposed(_enodeId string)
2018-07-11 00:25:45 -07:00
func ( _Permissions * PermissionsFilterer ) WatchNewNodeProposed ( opts * bind . WatchOpts , sink chan <- * PermissionsNewNodeProposed ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "NewNodeProposed" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsNewNodeProposed )
if err := _Permissions . contract . UnpackLog ( event , "NewNodeProposed" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
// PermissionsNodeApprovedIterator is returned from FilterNodeApproved and is used to iterate over the raw logs and unpacked data for NodeApproved events raised by the Permissions contract.
type PermissionsNodeApprovedIterator struct {
Event * PermissionsNodeApproved // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsNodeApprovedIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodeApproved )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodeApproved )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsNodeApprovedIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsNodeApprovedIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsNodeApproved represents a NodeApproved event raised by the Permissions contract.
type PermissionsNodeApproved struct {
2018-08-12 19:00:35 -07:00
EnodeId string
IpAddrPort string
DiscPort string
RaftPort string
Raw types . Log // Blockchain specific contextual infos
2018-07-11 00:25:45 -07:00
}
2018-08-12 19:00:35 -07:00
// FilterNodeApproved is a free log retrieval operation binding the contract event 0xc6d86deaa3b3cf7c374cfd405aae9f08571fce2bf6ccfe8f98a399cda8960a98.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: e NodeApproved(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string)
2018-07-11 00:25:45 -07:00
func ( _Permissions * PermissionsFilterer ) FilterNodeApproved ( opts * bind . FilterOpts ) ( * PermissionsNodeApprovedIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "NodeApproved" )
if err != nil {
return nil , err
}
return & PermissionsNodeApprovedIterator { contract : _Permissions . contract , event : "NodeApproved" , logs : logs , sub : sub } , nil
}
2018-08-12 19:00:35 -07:00
// WatchNodeApproved is a free log subscription operation binding the contract event 0xc6d86deaa3b3cf7c374cfd405aae9f08571fce2bf6ccfe8f98a399cda8960a98.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: e NodeApproved(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string)
2018-07-11 00:25:45 -07:00
func ( _Permissions * PermissionsFilterer ) WatchNodeApproved ( opts * bind . WatchOpts , sink chan <- * PermissionsNodeApproved ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "NodeApproved" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsNodeApproved )
if err := _Permissions . contract . UnpackLog ( event , "NodeApproved" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-08-31 04:35:35 -07:00
// PermissionsNodeBlacklistedIterator is returned from FilterNodeBlacklisted and is used to iterate over the raw logs and unpacked data for NodeBlacklisted events raised by the Permissions contract.
type PermissionsNodeBlacklistedIterator struct {
Event * PermissionsNodeBlacklisted // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsNodeBlacklistedIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodeBlacklisted )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodeBlacklisted )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsNodeBlacklistedIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsNodeBlacklistedIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsNodeBlacklisted represents a NodeBlacklisted event raised by the Permissions contract.
type PermissionsNodeBlacklisted struct {
EnodeId string
IpAddrPort string
DiscPort string
RaftPort string
Raw types . Log // Blockchain specific contextual infos
}
// FilterNodeBlacklisted is a free log retrieval operation binding the contract event 0xe1b239bf9d5854aeca74dfeac25d6ce470230bdb5f0eec48713c4375becfe97e.
//
// Solidity: e NodeBlacklisted(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string)
func ( _Permissions * PermissionsFilterer ) FilterNodeBlacklisted ( opts * bind . FilterOpts ) ( * PermissionsNodeBlacklistedIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "NodeBlacklisted" )
if err != nil {
return nil , err
}
return & PermissionsNodeBlacklistedIterator { contract : _Permissions . contract , event : "NodeBlacklisted" , logs : logs , sub : sub } , nil
}
// WatchNodeBlacklisted is a free log subscription operation binding the contract event 0xe1b239bf9d5854aeca74dfeac25d6ce470230bdb5f0eec48713c4375becfe97e.
//
// Solidity: e NodeBlacklisted(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string)
func ( _Permissions * PermissionsFilterer ) WatchNodeBlacklisted ( opts * bind . WatchOpts , sink chan <- * PermissionsNodeBlacklisted ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "NodeBlacklisted" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsNodeBlacklisted )
if err := _Permissions . contract . UnpackLog ( event , "NodeBlacklisted" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-07-11 00:25:45 -07:00
// PermissionsNodeDeactivatedIterator is returned from FilterNodeDeactivated and is used to iterate over the raw logs and unpacked data for NodeDeactivated events raised by the Permissions contract.
type PermissionsNodeDeactivatedIterator struct {
Event * PermissionsNodeDeactivated // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsNodeDeactivatedIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodeDeactivated )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodeDeactivated )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsNodeDeactivatedIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsNodeDeactivatedIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsNodeDeactivated represents a NodeDeactivated event raised by the Permissions contract.
type PermissionsNodeDeactivated struct {
2018-08-12 19:00:35 -07:00
EnodeId string
IpAddrPort string
DiscPort string
RaftPort string
Raw types . Log // Blockchain specific contextual infos
2018-07-11 00:25:45 -07:00
}
2018-08-12 19:00:35 -07:00
// FilterNodeDeactivated is a free log retrieval operation binding the contract event 0xd5fa0ecdea15b332dd0a270c65234bc4aee212edf2ed62eb2fd182ef55ca98a1.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: e NodeDeactivated(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string)
2018-07-11 00:25:45 -07:00
func ( _Permissions * PermissionsFilterer ) FilterNodeDeactivated ( opts * bind . FilterOpts ) ( * PermissionsNodeDeactivatedIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "NodeDeactivated" )
if err != nil {
return nil , err
}
return & PermissionsNodeDeactivatedIterator { contract : _Permissions . contract , event : "NodeDeactivated" , logs : logs , sub : sub } , nil
}
2018-08-12 19:00:35 -07:00
// WatchNodeDeactivated is a free log subscription operation binding the contract event 0xd5fa0ecdea15b332dd0a270c65234bc4aee212edf2ed62eb2fd182ef55ca98a1.
2018-07-11 00:25:45 -07:00
//
2018-08-12 19:00:35 -07:00
// Solidity: e NodeDeactivated(_enodeId string, _ipAddrPort string, _discPort string, _raftPort string)
2018-07-11 00:25:45 -07:00
func ( _Permissions * PermissionsFilterer ) WatchNodeDeactivated ( opts * bind . WatchOpts , sink chan <- * PermissionsNodeDeactivated ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "NodeDeactivated" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsNodeDeactivated )
if err := _Permissions . contract . UnpackLog ( event , "NodeDeactivated" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-08-31 04:35:35 -07:00
// PermissionsNodePendingBlacklistingIterator is returned from FilterNodePendingBlacklisting and is used to iterate over the raw logs and unpacked data for NodePendingBlacklisting events raised by the Permissions contract.
type PermissionsNodePendingBlacklistingIterator struct {
Event * PermissionsNodePendingBlacklisting // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsNodePendingBlacklistingIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodePendingBlacklisting )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodePendingBlacklisting )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsNodePendingBlacklistingIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsNodePendingBlacklistingIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsNodePendingBlacklisting represents a NodePendingBlacklisting event raised by the Permissions contract.
type PermissionsNodePendingBlacklisting struct {
EnodeId string
Raw types . Log // Blockchain specific contextual infos
}
// FilterNodePendingBlacklisting is a free log retrieval operation binding the contract event 0xb72401fcad1677cdc28a305cfafaaec7f95e3be1fdddc2053d10e87e4997532b.
//
// Solidity: e NodePendingBlacklisting(_enodeId string)
func ( _Permissions * PermissionsFilterer ) FilterNodePendingBlacklisting ( opts * bind . FilterOpts ) ( * PermissionsNodePendingBlacklistingIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "NodePendingBlacklisting" )
if err != nil {
return nil , err
}
return & PermissionsNodePendingBlacklistingIterator { contract : _Permissions . contract , event : "NodePendingBlacklisting" , logs : logs , sub : sub } , nil
}
// WatchNodePendingBlacklisting is a free log subscription operation binding the contract event 0xb72401fcad1677cdc28a305cfafaaec7f95e3be1fdddc2053d10e87e4997532b.
//
// Solidity: e NodePendingBlacklisting(_enodeId string)
func ( _Permissions * PermissionsFilterer ) WatchNodePendingBlacklisting ( opts * bind . WatchOpts , sink chan <- * PermissionsNodePendingBlacklisting ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "NodePendingBlacklisting" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsNodePendingBlacklisting )
if err := _Permissions . contract . UnpackLog ( event , "NodePendingBlacklisting" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-07-11 00:25:45 -07:00
// PermissionsNodePendingDeactivationIterator is returned from FilterNodePendingDeactivation and is used to iterate over the raw logs and unpacked data for NodePendingDeactivation events raised by the Permissions contract.
type PermissionsNodePendingDeactivationIterator struct {
Event * PermissionsNodePendingDeactivation // Event containing the contract specifics and raw log
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func ( it * PermissionsNodePendingDeactivationIterator ) Next ( ) bool {
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodePendingDeactivation )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
it . Event = new ( PermissionsNodePendingDeactivation )
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func ( it * PermissionsNodePendingDeactivationIterator ) Error ( ) error {
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func ( it * PermissionsNodePendingDeactivationIterator ) Close ( ) error {
it . sub . Unsubscribe ( )
return nil
}
// PermissionsNodePendingDeactivation represents a NodePendingDeactivation event raised by the Permissions contract.
type PermissionsNodePendingDeactivation struct {
EnodeId string
Raw types . Log // Blockchain specific contextual infos
}
// FilterNodePendingDeactivation is a free log retrieval operation binding the contract event 0x2b5689b33f48f1dcbda2084e130a9bee7b3bf14dc767ea74cbdf3e5fffb118e4.
//
// Solidity: e NodePendingDeactivation(_enodeId string)
func ( _Permissions * PermissionsFilterer ) FilterNodePendingDeactivation ( opts * bind . FilterOpts ) ( * PermissionsNodePendingDeactivationIterator , error ) {
logs , sub , err := _Permissions . contract . FilterLogs ( opts , "NodePendingDeactivation" )
if err != nil {
return nil , err
}
return & PermissionsNodePendingDeactivationIterator { contract : _Permissions . contract , event : "NodePendingDeactivation" , logs : logs , sub : sub } , nil
}
// WatchNodePendingDeactivation is a free log subscription operation binding the contract event 0x2b5689b33f48f1dcbda2084e130a9bee7b3bf14dc767ea74cbdf3e5fffb118e4.
//
// Solidity: e NodePendingDeactivation(_enodeId string)
func ( _Permissions * PermissionsFilterer ) WatchNodePendingDeactivation ( opts * bind . WatchOpts , sink chan <- * PermissionsNodePendingDeactivation ) ( event . Subscription , error ) {
logs , sub , err := _Permissions . contract . WatchLogs ( opts , "NodePendingDeactivation" )
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
event := new ( PermissionsNodePendingDeactivation )
if err := _Permissions . contract . UnpackLog ( event , "NodePendingDeactivation" , log ) ; err != nil {
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}