receipts

package
v6.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 21, 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 JSON

type JSON struct {
	Raw       string `json:"raw,omitempty"`
	EntryHash string `json:"entryhash,omitempty"`
	Json      string `json:"json,omitempty"`
}

func (*JSON) IsSameAs

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

func (*JSON) JSONByte

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

func (*JSON) JSONString

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

func (*JSON) String

func (e *JSON) String() string

type Receipt

type Receipt struct {
	Entry                  *JSON                    `json:"entry,omitempty"`
	MerkleBranch           []*primitives.MerkleNode `json:"merklebranch,omitempty"`
	EntryBlockKeyMR        *primitives.Hash         `json:"entryblockkeymr,omitempty"`
	DirectoryBlockKeyMR    *primitives.Hash         `json:"directoryblockkeymr,omitempty"`
	BitcoinTransactionHash *primitives.Hash         `json:"bitcointransactionhash,omitempty"`
	BitcoinBlockHash       *primitives.Hash         `json:"bitcoinblockhash,omitempty"`
}

func CreateFullReceipt

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

func CreateMinimalReceipt

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

func CreateReceipt

func CreateReceipt(dbo interfaces.DBOverlaySimple, entryID interfaces.IHash) (*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