validator

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockValidator

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

MockValidator returns true if the data and address passed in the Validate method are a byte-wise match to the data and address passed to the constructor

func NewMockValidator

func NewMockValidator(address swarm.Address, data []byte) *MockValidator

NewMockValidator constructs a new MockValidator

func (*MockValidator) AddPair

func (v *MockValidator) AddPair(address swarm.Address, data []byte)

Add a new address/data pair which can be validated

func (*MockValidator) Validate

func (v *MockValidator) Validate(ch swarm.Chunk) (valid bool)

Validate checks the passed chunk for validity

Jump to

Keyboard shortcuts

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