rulemgr

package
v0.0.0-...-f069fcf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 8 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
	Ve     *validator.ValidationEngine
	// contains filtered or unexported fields
}

func New

func New(storage storage.Storage, logger logrus.FieldLogger) *RuleMgr

func (*RuleMgr) HandleRule

func (rm *RuleMgr) HandleRule(p port.Port, msg *pb.Message)

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