Documentation ¶
Index ¶
- type PermissionReader
- func (r *PermissionReader) IsAllowedFactProvider(ctx context.Context, factProvider common.Address) (bool, error)
- func (r *PermissionReader) IsFactProviderInWhitelist(ctx context.Context, factProvider common.Address) (bool, error)
- func (r *PermissionReader) IsWhitelistOnlyPermissionSet(ctx context.Context) (bool, error)
- type PermissionWriter
- func (w *PermissionWriter) AddFactProviderToWhitelist(ctx context.Context, factProvider common.Address) (common.Hash, error)
- func (w *PermissionWriter) AddFactProviderToWhitelistNoWait(ctx context.Context, factProvider common.Address) (common.Hash, error)
- func (w *PermissionWriter) RemoveFactProviderFromWhitelist(ctx context.Context, factProvider common.Address) (common.Hash, error)
- func (w *PermissionWriter) RemoveFactProviderFromWhitelistNoWait(ctx context.Context, factProvider common.Address) (common.Hash, error)
- func (w *PermissionWriter) SetWhitelistOnlyPermission(ctx context.Context, onlyWhitelist bool) (common.Hash, error)
- func (w *PermissionWriter) SetWhitelistOnlyPermissionNoWait(ctx context.Context, onlyWhitelist bool) (common.Hash, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PermissionReader ¶
PermissionReader reads passport permissions. Anyone is allowed to read passport permissions.
func NewPermissionReader ¶
func NewPermissionReader(e *eth.Eth, passport common.Address) *PermissionReader
NewPermissionReader converts session to PermissionReader
func (*PermissionReader) IsAllowedFactProvider ¶
func (r *PermissionReader) IsAllowedFactProvider(ctx context.Context, factProvider common.Address) (bool, error)
IsAllowedFactProvider returns true when the given address is an allowed fact provider.
func (*PermissionReader) IsFactProviderInWhitelist ¶
func (r *PermissionReader) IsFactProviderInWhitelist(ctx context.Context, factProvider common.Address) (bool, error)
IsFactProviderInWhitelist returns true if fact provider is added to the whitelist.
func (*PermissionReader) IsWhitelistOnlyPermissionSet ¶
func (r *PermissionReader) IsWhitelistOnlyPermissionSet(ctx context.Context) (bool, error)
IsWhitelistOnlyPermissionSet returns true when a whitelist of fact providers is enabled.
type PermissionWriter ¶
PermissionWriter modifies passport permissions. Only passport owner is allowed to modify permissions.
func NewPermissionWriter ¶
func NewPermissionWriter(s *eth.Session, passport common.Address) *PermissionWriter
NewPermissionWriter converts session to PermissionWriter
func (*PermissionWriter) AddFactProviderToWhitelist ¶
func (w *PermissionWriter) AddFactProviderToWhitelist(ctx context.Context, factProvider common.Address) (common.Hash, error)
AddFactProviderToWhitelist allows owner to add fact provider to the whitelist.
func (*PermissionWriter) AddFactProviderToWhitelistNoWait ¶
func (w *PermissionWriter) AddFactProviderToWhitelistNoWait(ctx context.Context, factProvider common.Address) (common.Hash, error)
AddFactProviderToWhitelistNoWait allows owner to add fact provider to the whitelist. This method does not wait for the transaction to be mined. Use the method without the NoWait suffix if you need to make sure that the transaction was successfully mined.
func (*PermissionWriter) RemoveFactProviderFromWhitelist ¶
func (w *PermissionWriter) RemoveFactProviderFromWhitelist(ctx context.Context, factProvider common.Address) (common.Hash, error)
RemoveFactProviderFromWhitelist allows owner to remove fact provider from the whitelist.
func (*PermissionWriter) RemoveFactProviderFromWhitelistNoWait ¶
func (w *PermissionWriter) RemoveFactProviderFromWhitelistNoWait(ctx context.Context, factProvider common.Address) (common.Hash, error)
RemoveFactProviderFromWhitelistNoWait allows owner to remove fact provider from the whitelist. This method does not wait for the transaction to be mined. Use the method without the NoWait suffix if you need to make sure that the transaction was successfully mined.
func (*PermissionWriter) SetWhitelistOnlyPermission ¶
func (w *PermissionWriter) SetWhitelistOnlyPermission(ctx context.Context, onlyWhitelist bool) (common.Hash, error)
SetWhitelistOnlyPermission enables or disables the use of a whitelist of fact providers.
func (*PermissionWriter) SetWhitelistOnlyPermissionNoWait ¶
func (w *PermissionWriter) SetWhitelistOnlyPermissionNoWait(ctx context.Context, onlyWhitelist bool) (common.Hash, error)
SetWhitelistOnlyPermissionNoWait enables or disables the use of a whitelist of fact providers. This method does not wait for the transaction to be mined. Use the method without the NoWait suffix if you need to make sure that the transaction was successfully mined.