acl

package
v0.0.0-...-b2d87a2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

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