data

package
v0.0.0-...-2147502 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// To reconstruct licenses.gob,
	//     cat licenses-gob-* > licenses.gob
	Licenses      = licenseBenchmarkData("licenses")
	LicensesSmall = licenseBenchmarkData("licenses-small")
)
View Source
var ASTData = gobBenchmarkData("ast", func() interface{} { return new(map[string]*ast.File) })
View Source
var Hyperledger = BenchmarkData{
	"hyperledger",
	func() (interface{}, error) { return hlDecodeJSON("data/ledgerAPIs.json") },
	func() interface{} { return new(submittedData) },
}
View Source
var Scores = gobBenchmarkData("scores", func() interface{} { return new([]Score) })
View Source
var Stocks = gobBenchmarkData("stocks", func() interface{} { return new([]*StockData) })

Functions

func Generate

func Generate(words []string) error

func ParseStdlibPackage

func ParseStdlibPackage(ppath string) (*ast.Package, error)

ParseStdlibPackage parses and returns the standard library package at ppath. It assumes the package name is the last component of the path.

func WriteNewFile

func WriteNewFile(filename string, writer func(*os.File) error) error

Types

type BenchmarkData

type BenchmarkData struct {
	Name   string
	Read   func() (interface{}, error)
	Newptr func() interface{}
}

type Block

type Block struct {
	Header   *BlockHeader
	Data     *BlockData
	Metadata *BlockMetadata
}

type BlockAndPvtData

type BlockAndPvtData struct {
	Block          *Block
	PvtData        TxPvtDataMap
	MissingPvtData TxMissingPvtData
}

type BlockData

type BlockData struct {
	Data [][]byte
}

type BlockHeader

type BlockHeader struct {
	Number       uint64
	PreviousHash []byte
	DataHash     []byte
}

type BlockMetadata

type BlockMetadata struct {
	Metadata [][]byte
}

type CollectionPvtReadWriteSet

type CollectionPvtReadWriteSet struct {
	CollectionName string
	Rwset          []byte
}

type Envelope

type Envelope struct {
	Payload   []byte
	Signature []byte
}

type Interval

type Interval struct {
	Start, End                     time.Time
	Open, Close, Low, High, Volume float64
}

func (Interval) Equal

func (i Interval) Equal(j Interval) bool

type LicenseContents

type LicenseContents struct {
	Contents     []byte
	ContentsHash [sha256.Size]byte     // SHA256 of the contents, to dedup equal contents
	OldTypes     []string              // from the DB, stored in the gob file
	OldCoverage  licensecheck.Coverage // ditto
	NewTypes     []string              // not populated from the gob
	NewCoverage  licensecheck.Coverage // ditto
}

LicenseContents hold the contents of a license file, and information derived from it.

func (*LicenseContents) Equal

func (c1 *LicenseContents) Equal(c2 *LicenseContents) bool

type LicenseData

type LicenseData struct {
	Files    []*LicenseFile
	Contents []*LicenseContents
}

type LicenseFile

type LicenseFile struct {
	Module   string
	Version  string
	FilePath string
	Contents int // index into LicenseData.Contents; not a pointer because gob does not dedup
}

LicenseFile holds information about a license file.

func (*LicenseFile) Equal

func (f1 *LicenseFile) Equal(f2 *LicenseFile) bool

type MissingPvtData

type MissingPvtData struct {
	Namespace  string
	Collection string
	IsEligible bool
}

type NsPvtReadWriteSet

type NsPvtReadWriteSet struct {
	Namespace          string
	CollectionPvtRwset []*CollectionPvtReadWriteSet
}

type Score

type Score struct {
	GameID   int
	PlayerID int
	Scores   []int
}

type StockData

type StockData struct {
	Symbol    string
	Intervals []Interval
}

func (*StockData) Equal

func (s1 *StockData) Equal(s2 *StockData) bool

type TxMissingPvtData

type TxMissingPvtData map[uint64][]*MissingPvtData

type TxPvtData

type TxPvtData struct {
	SeqInBlock uint64
	WriteSet   *TxPvtReadWriteSet
}

type TxPvtDataMap

type TxPvtDataMap map[uint64]*TxPvtData

type TxPvtReadWriteSet

type TxPvtReadWriteSet struct {
	DataModel  int32
	NsPvtRwset []*NsPvtReadWriteSet
}

Jump to

Keyboard shortcuts

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