Documentation ¶
Index ¶
Constants ¶
View Source
const DBFileCodeStr = "52A7AD74C4929DEC7B5C8D46CC3BAFA81FC96129283B3A6923CD12F41A30B3AC"
TODO compatible with multiple db prefix DoubleSHA256([]byte("MASSDB"))
Variables ¶
View Source
var ( ErrInvalidDBType = errors.New("invalid sktdb type") ErrInvalidDBArgs = errors.New("invalid sktdb args") ErrDBDoesNotExist = errors.New("non-existent sktdb") ErrDBAlreadyExists = errors.New("sktdb already exists") ErrDBCorrupted = errors.New("sktdb corrupted") ErrUnimplemented = errors.New("unimplemented sktdb interface") ErrUnsupportedBitLength = errors.New("unsupported bit length") )
View Source
var ( DBFileCode []byte DBBackendList []DBBackend )
Functions ¶
func AddDBBackend ¶
func AddDBBackend(ins DBBackend)
Types ¶
type SktDB ¶
type SktDB interface { // Get type of SktDB Type() string // Close SktDB Close() error // Execute plotting on SktDB Plot() chan error // Stop plotting on SktDB StopPlot() chan error // Is SktDB loaded and plotted Ready() bool // Get bitLength of SktDB BitLength() int // Get PubKeyHash of SktDB PubKeyHash() pocutil.Hash // Get PubKey of SktDB PubKey() *pocec.PublicKey // Get assembled proof by challenge GetProof(challenge pocutil.Hash) (proof *poc.Proof, err error) // Get plot progress Progress() (prePlotted, plotted bool, progress float64) // Delete all data of SktDB Delete() chan error }
Click to show internal directories.
Click to hide internal directories.