Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEntryNotFound = errors.New("no entry with the given hash")
View Source
var ErrIncorrectTimestamp = errors.New("incorrect timestamp")
View Source
var ErrMissingSigner = errors.New("*Blocks needs a signer")
View Source
var ErrMissingVerifier = errors.New("*Blocks needs a verifier")
View Source
var ErrVerificationFailed = errors.New("crypto verification failed")
Functions ¶
This section is empty.
Types ¶
type Blocks ¶
type Blocks struct { Entries []Entry Signer SignerFunc Verifier VerifierFunc sync.RWMutex // contains filtered or unexported fields }
Blocks are the "chain".
type Entry ¶
type Entry struct { Instant time.Time Height int PrevHash []byte NextHash []byte ContentHash []byte Content []byte Signature []byte }
Entry in an entry in the chain.
type SignerFunc ¶
type VerifierFunc ¶
Click to show internal directories.
Click to hide internal directories.