rulemgr

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeLedger

type CodeLedger struct {
	// contains filtered or unexported fields
}

func (*CodeLedger) GetCode

func (l *CodeLedger) GetCode(address types.Address) []byte

func (*CodeLedger) SetCode

func (l *CodeLedger) SetCode(address *types.Address, code []byte) error

type Rule

type Rule struct {
	Code    []byte `json:"code"`
	Address string `json:"address"`
}

type RuleMgr

type RuleMgr struct {
	Ledger      *CodeLedger
	PeerManager peermgr.PeerManager
	Ve          *validator.ValidationEngine
}

func New

func New(storage storage.Storage, pm peermgr.PeerManager) (*RuleMgr, error)

func (*RuleMgr) Validate

func (rm *RuleMgr) Validate(address, from string, proof, payload []byte, validators string) (bool, error)

type RuleResponse

type RuleResponse struct {
	Ok      bool   `json:"ok"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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