pass

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissionReader

type PermissionReader struct {
	*eth.Eth
	// contains filtered or unexported fields
}

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

type PermissionWriter struct {
	*eth.Session
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

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