acl

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewACLManager

func NewACLManager(ctx *actx.AclCtx) (base.AclManager, error)

NewACLManager create instance of ACLManager

func UpdateAK2AccountReflection

func UpdateAK2AccountReflection(ctx contract.KContext, aclOldJSON []byte, aclNewJSON []byte, accountName string) error

Types

type KernMethod

type KernMethod struct {
	BcName                   string
	NewAccountResourceAmount int64
}

func NewKernContractMethod

func NewKernContractMethod(bcName string, NewAccountResourceAmount int64) *KernMethod

func (*KernMethod) NewAccount

func (t *KernMethod) NewAccount(ctx contract.KContext) (*contract.Response, error)

func (*KernMethod) SetAccountACL

func (t *KernMethod) SetAccountACL(ctx contract.KContext) (*contract.Response, error)

func (*KernMethod) SetMethodACL

func (t *KernMethod) SetMethodACL(ctx contract.KContext) (*contract.Response, error)

type Manager

type Manager struct {
	Ctx *actx.AclCtx
}

Manager manages all ACL releated data, providing read/write interface for ACL table

func (*Manager) GetAccountACL

func (mgr *Manager) GetAccountACL(accountName string) (*pb.Acl, error)

GetAccountACL get acl of an account

func (*Manager) GetAccountAddresses

func (mgr *Manager) GetAccountAddresses(accountName string) ([]string, error)

GetAccountAddresses get the addresses belongs to contract account

func (*Manager) GetContractMethodACL

func (mgr *Manager) GetContractMethodACL(contractName, methodName string) (*pb.Acl, error)

GetContractMethodACL get acl of contract method

func (*Manager) GetObjectBySnapshot

func (mgr *Manager) GetObjectBySnapshot(bucket string, object []byte) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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