validator

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: GPL-3.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApprovedData

func AddApprovedData(data *mpcprotocol.SendData) error

func AddApprovingData

func AddApprovingData(data *mpcprotocol.SendData) error

func AddValidData added in v1.0.1

func AddValidData(data *mpcprotocol.SendData) error

func ApproveData

func ApproveData(approveData []mpcprotocol.SendData) []error

func GetDataForApprove

func GetDataForApprove() ([]mpcprotocol.SendData, error)

func NewDatabase

func NewDatabase(file string) error

func ValidateData

func ValidateData(data *mpcprotocol.SendData) (bool, error)

TODO add ValidateData

Types

type Database

type Database interface {
	Put(key []byte, value []byte) error
	Get(key []byte) ([]byte, error)
	Delete(key []byte) error
	Has(key []byte) (bool, error)
	Close()
}

func GetDB

func GetDB() (Database, error)

GetDB returns singleton of Database implementation

Jump to

Keyboard shortcuts

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