roles

package
v0.0.0-...-086ef7a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SenderHasRole

func SenderHasRole(roleName string, ctr WithRoles) (bool, errstack.E)

SenderHasRole checks if contract sender has specified role

func SenderIsOwnerOrHasRole

func SenderIsOwnerOrHasRole(who common.Address, roleName string, ctr WithRoles) (bool, errstack.E)

SenderIsOwnerOrHasRole checks if `who` is owner or sender has role

func SenderIsOwnerOrHasRoleErrp

func SenderIsOwnerOrHasRoleErrp(who common.Address, roleName string, ctr WithRoles, errp errstack.Putter) error

SenderIsOwnerOrHasRoleErrp wraps SenderIsOwnerOrHasRole and assigns false response as an error to the putter.

Types

type WithRoles

type WithRoles interface {
	Owner(opts *bind.CallOpts) (common.Address, error)
	HasRole(opts *bind.CallOpts, roleName string) (bool, error)
	SenderHasRole(opts *bind.CallOpts, roleName string) (bool, error)
}

WithRoles provides interface for contracts which implement Roles contract.

Jump to

Keyboard shortcuts

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