receipts

package
v6.3.3-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataStorePath string = "./receipts"

Functions

func ExportAllEntryReceipts

func ExportAllEntryReceipts(dbo interfaces.DBOverlay) error

func ExportEntryReceipt

func ExportEntryReceipt(entryID string, dbo interfaces.DBOverlaySimple) error

func FileNotExists

func FileNotExists(name string) bool

func Save

func Save(receipt *Receipt) error

func VerifyFullReceipt

func VerifyFullReceipt(dbo interfaces.DBOverlaySimple, receiptStr string) error

func VerifyMinimalReceipt

func VerifyMinimalReceipt(dbo interfaces.DBOverlaySimple, receiptStr string) error

Types

type EntryJSON

type EntryJSON struct {
	Raw       string `json:"raw,omitempty"`
	EntryHash string `json:"entryhash,omitempty"`
	Timestamp int64  `json:"timestamp,omitempty"`
}

func (*EntryJSON) IsSameAs

func (e *EntryJSON) IsSameAs(r *EntryJSON) bool

func (*EntryJSON) JSONByte

func (e *EntryJSON) JSONByte() ([]byte, error)

func (*EntryJSON) JSONString

func (e *EntryJSON) JSONString() (string, error)

func (*EntryJSON) String

func (e *EntryJSON) String() string

type Receipt

type Receipt struct {
	Entry                *EntryJSON               `json:"entry,omitempty"`
	MerkleBranch         []*primitives.MerkleNode `json:"merklebranch,omitempty"`
	EntryBlockKeyMR      *primitives.Hash         `json:"entryblockkeymr,omitempty"`
	DirectoryBlockKeyMR  *primitives.Hash         `json:"directoryblockkeymr,omitempty"`
	DirectoryBlockHeight uint32                   `json:"directoryblockheight,omitempty"`
}

func CreateFullReceipt

func CreateFullReceipt(dbo interfaces.DBOverlaySimple, entryHash interfaces.IHash, includeRawEntry bool) (*Receipt, error)

func CreateMinimalReceipt

func CreateMinimalReceipt(dbo interfaces.DBOverlaySimple, entryID interfaces.IHash) (*Receipt, error)

func CreateReceipt

func CreateReceipt(dbo interfaces.DBOverlaySimple, entryHash interfaces.IHash, includeRawEntry bool) (*Receipt, error)

func DecodeReceiptString

func DecodeReceiptString(str string) (*Receipt, error)

func (*Receipt) CustomMarshalString

func (e *Receipt) CustomMarshalString() string

func (*Receipt) DecodeString

func (e *Receipt) DecodeString(str string) error

func (*Receipt) IsSameAs

func (e *Receipt) IsSameAs(r *Receipt) bool

func (*Receipt) JSONByte

func (e *Receipt) JSONByte() ([]byte, error)

func (*Receipt) JSONString

func (e *Receipt) JSONString() (string, error)

func (*Receipt) TrimReceipt

func (e *Receipt) TrimReceipt()

func (*Receipt) Validate

func (e *Receipt) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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