demodb

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package demodb supports loading an example database into syncbase for experimentation and testing purposes.

Index

Constants

This section is empty.

Variables

CreditAgencyAll holds all labels for CreditAgency.

ExperianRatingAll holds all labels for ExperianRating.

Functions

func PopulateDemoDB

func PopulateDemoDB(ctx *context.T, db syncbase.Database) error

Creates demo collections in the provided database. Collections are destroyed and recreated if they already exist.

func VDLReadActOrSatScore

func VDLReadActOrSatScore(dec vdl.Decoder, x *ActOrSatScore) error

func VDLReadAgencyReport

func VDLReadAgencyReport(dec vdl.Decoder, x *AgencyReport) error

func VDLReadTitleOrValueType

func VDLReadTitleOrValueType(dec vdl.Decoder, x *TitleOrValueType) error

Types

type ActOrSatScore

type ActOrSatScore interface {
	// Index returns the field index.
	Index() int
	// Interface returns the field value as an interface.
	Interface() interface{}
	// Name returns the field name.
	Name() string
	// VDLReflect describes the ActOrSatScore union type.
	VDLReflect(__ActOrSatScoreReflect)
	VDLIsZero() bool
	VDLWrite(vdl.Encoder) error
}

ActOrSatScore represents any single field of the ActOrSatScore union type.

type ActOrSatScoreActScore

type ActOrSatScoreActScore struct{ Value uint16 }

ActOrSatScoreActScore represents field ActScore of the ActOrSatScore union type.

func (ActOrSatScoreActScore) Index

func (x ActOrSatScoreActScore) Index() int

func (ActOrSatScoreActScore) Interface

func (x ActOrSatScoreActScore) Interface() interface{}

func (ActOrSatScoreActScore) Name

func (x ActOrSatScoreActScore) Name() string

func (ActOrSatScoreActScore) VDLIsZero

func (x ActOrSatScoreActScore) VDLIsZero() bool

func (ActOrSatScoreActScore) VDLReflect

func (x ActOrSatScoreActScore) VDLReflect(__ActOrSatScoreReflect)

func (ActOrSatScoreActScore) VDLWrite

func (x ActOrSatScoreActScore) VDLWrite(enc vdl.Encoder) error

type ActOrSatScoreSatScore

type ActOrSatScoreSatScore struct{ Value uint16 }

ActOrSatScoreSatScore represents field SatScore of the ActOrSatScore union type.

func (ActOrSatScoreSatScore) Index

func (x ActOrSatScoreSatScore) Index() int

func (ActOrSatScoreSatScore) Interface

func (x ActOrSatScoreSatScore) Interface() interface{}

func (ActOrSatScoreSatScore) Name

func (x ActOrSatScoreSatScore) Name() string

func (ActOrSatScoreSatScore) VDLIsZero

func (x ActOrSatScoreSatScore) VDLIsZero() bool

func (ActOrSatScoreSatScore) VDLReflect

func (x ActOrSatScoreSatScore) VDLReflect(__ActOrSatScoreReflect)

func (ActOrSatScoreSatScore) VDLWrite

func (x ActOrSatScoreSatScore) VDLWrite(enc vdl.Encoder) error

type AddressInfo

type AddressInfo struct {
	Street string
	City   string
	State  string
	Zip    string
}

func (AddressInfo) VDLIsZero

func (x AddressInfo) VDLIsZero() bool

func (*AddressInfo) VDLRead

func (x *AddressInfo) VDLRead(dec vdl.Decoder) error

func (AddressInfo) VDLReflect

func (AddressInfo) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.AddressInfo"`
})

func (AddressInfo) VDLWrite

func (x AddressInfo) VDLWrite(enc vdl.Encoder) error

type AgencyReport

type AgencyReport interface {
	// Index returns the field index.
	Index() int
	// Interface returns the field value as an interface.
	Interface() interface{}
	// Name returns the field name.
	Name() string
	// VDLReflect describes the AgencyReport union type.
	VDLReflect(__AgencyReportReflect)
	VDLIsZero() bool
	VDLWrite(vdl.Encoder) error
}

AgencyReport represents any single field of the AgencyReport union type.

type AgencyReportEquifaxReport

type AgencyReportEquifaxReport struct{ Value EquifaxCreditReport }

AgencyReportEquifaxReport represents field EquifaxReport of the AgencyReport union type.

func (AgencyReportEquifaxReport) Index

func (x AgencyReportEquifaxReport) Index() int

func (AgencyReportEquifaxReport) Interface

func (x AgencyReportEquifaxReport) Interface() interface{}

func (AgencyReportEquifaxReport) Name

func (AgencyReportEquifaxReport) VDLIsZero

func (x AgencyReportEquifaxReport) VDLIsZero() bool

func (AgencyReportEquifaxReport) VDLReflect

func (x AgencyReportEquifaxReport) VDLReflect(__AgencyReportReflect)

func (AgencyReportEquifaxReport) VDLWrite

func (x AgencyReportEquifaxReport) VDLWrite(enc vdl.Encoder) error

type AgencyReportExperianReport

type AgencyReportExperianReport struct{ Value ExperianCreditReport }

AgencyReportExperianReport represents field ExperianReport of the AgencyReport union type.

func (AgencyReportExperianReport) Index

func (x AgencyReportExperianReport) Index() int

func (AgencyReportExperianReport) Interface

func (x AgencyReportExperianReport) Interface() interface{}

func (AgencyReportExperianReport) Name

func (AgencyReportExperianReport) VDLIsZero

func (x AgencyReportExperianReport) VDLIsZero() bool

func (AgencyReportExperianReport) VDLReflect

func (x AgencyReportExperianReport) VDLReflect(__AgencyReportReflect)

func (AgencyReportExperianReport) VDLWrite

func (x AgencyReportExperianReport) VDLWrite(enc vdl.Encoder) error

type AgencyReportTransUnionReport

type AgencyReportTransUnionReport struct{ Value TransUnionCreditReport }

AgencyReportTransUnionReport represents field TransUnionReport of the AgencyReport union type.

func (AgencyReportTransUnionReport) Index

func (AgencyReportTransUnionReport) Interface

func (x AgencyReportTransUnionReport) Interface() interface{}

func (AgencyReportTransUnionReport) Name

func (AgencyReportTransUnionReport) VDLIsZero

func (x AgencyReportTransUnionReport) VDLIsZero() bool

func (AgencyReportTransUnionReport) VDLReflect

func (x AgencyReportTransUnionReport) VDLReflect(__AgencyReportReflect)

func (AgencyReportTransUnionReport) VDLWrite

type AnythingGoes

type AnythingGoes struct {
	NameOfType string
	Anything   *vom.RawBytes
}

func (AnythingGoes) VDLIsZero

func (x AnythingGoes) VDLIsZero() bool

func (*AnythingGoes) VDLRead

func (x *AnythingGoes) VDLRead(dec vdl.Decoder) error

func (AnythingGoes) VDLReflect

func (AnythingGoes) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.AnythingGoes"`
})

func (AnythingGoes) VDLWrite

func (x AnythingGoes) VDLWrite(enc vdl.Encoder) error

type Array2String

type Array2String [2]string

func (Array2String) VDLIsZero

func (x Array2String) VDLIsZero() bool

func (*Array2String) VDLRead

func (x *Array2String) VDLRead(dec vdl.Decoder) error

func (Array2String) VDLReflect

func (Array2String) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Array2String"`
})

func (Array2String) VDLWrite

func (x Array2String) VDLWrite(enc vdl.Encoder) error

type BarType

type BarType struct {
	Baz BazType
}

func (BarType) VDLIsZero

func (x BarType) VDLIsZero() bool

func (*BarType) VDLRead

func (x *BarType) VDLRead(dec vdl.Decoder) error

func (BarType) VDLReflect

func (BarType) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.BarType"`
})

func (BarType) VDLWrite

func (x BarType) VDLWrite(enc vdl.Encoder) error

type BazType

type BazType struct {
	Name         string
	TitleOrValue TitleOrValueType
}

func (BazType) VDLIsZero

func (x BazType) VDLIsZero() bool

func (*BazType) VDLRead

func (x *BazType) VDLRead(dec vdl.Decoder) error

func (BazType) VDLReflect

func (BazType) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.BazType"`
})

func (BazType) VDLWrite

func (x BazType) VDLWrite(enc vdl.Encoder) error

type Composite

type Composite struct {
	Arr     Array2String
	ListInt []int32
	MySet   map[int32]struct{}
	Map     map[string]int32
}

func (Composite) VDLIsZero

func (x Composite) VDLIsZero() bool

func (*Composite) VDLRead

func (x *Composite) VDLRead(dec vdl.Decoder) error

func (Composite) VDLReflect

func (Composite) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Composite"`
})

func (Composite) VDLWrite

func (x Composite) VDLWrite(enc vdl.Encoder) error

type CreditAgency

type CreditAgency int
const (
	CreditAgencyEquifax CreditAgency = iota
	CreditAgencyExperian
	CreditAgencyTransUnion
)

func CreditAgencyFromString

func CreditAgencyFromString(label string) (x CreditAgency, err error)

CreditAgencyFromString creates a CreditAgency from a string label.

func (*CreditAgency) Set

func (x *CreditAgency) Set(label string) error

Set assigns label to x.

func (CreditAgency) String

func (x CreditAgency) String() string

String returns the string label of x.

func (CreditAgency) VDLIsZero

func (x CreditAgency) VDLIsZero() bool

func (*CreditAgency) VDLRead

func (x *CreditAgency) VDLRead(dec vdl.Decoder) error

func (CreditAgency) VDLReflect

func (CreditAgency) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.CreditAgency"`
	Enum struct{ Equifax, Experian, TransUnion string }
})

func (CreditAgency) VDLWrite

func (x CreditAgency) VDLWrite(enc vdl.Encoder) error

type CreditReport

type CreditReport struct {
	Agency CreditAgency
	Report AgencyReport
}

func (CreditReport) VDLIsZero

func (x CreditReport) VDLIsZero() bool

func (*CreditReport) VDLRead

func (x *CreditReport) VDLRead(dec vdl.Decoder) error

func (CreditReport) VDLReflect

func (CreditReport) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.CreditReport"`
})

func (CreditReport) VDLWrite

func (x CreditReport) VDLWrite(enc vdl.Encoder) error

type Customer

type Customer struct {
	Name    string
	Id      int64
	Active  bool
	Address AddressInfo
	Credit  CreditReport
}

func (Customer) VDLIsZero

func (x Customer) VDLIsZero() bool

func (*Customer) VDLRead

func (x *Customer) VDLRead(dec vdl.Decoder) error

func (Customer) VDLReflect

func (Customer) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Customer"`
})

func (Customer) VDLWrite

func (x Customer) VDLWrite(enc vdl.Encoder) error

type EquifaxCreditReport

type EquifaxCreditReport struct {
	Rating byte
}

func (EquifaxCreditReport) VDLIsZero

func (x EquifaxCreditReport) VDLIsZero() bool

func (*EquifaxCreditReport) VDLRead

func (x *EquifaxCreditReport) VDLRead(dec vdl.Decoder) error

func (EquifaxCreditReport) VDLReflect

func (EquifaxCreditReport) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.EquifaxCreditReport"`
})

func (EquifaxCreditReport) VDLWrite

func (x EquifaxCreditReport) VDLWrite(enc vdl.Encoder) error

type ExperianCreditReport

type ExperianCreditReport struct {
	Rating ExperianRating
}

func (ExperianCreditReport) VDLIsZero

func (x ExperianCreditReport) VDLIsZero() bool

func (*ExperianCreditReport) VDLRead

func (x *ExperianCreditReport) VDLRead(dec vdl.Decoder) error

func (ExperianCreditReport) VDLReflect

func (ExperianCreditReport) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.ExperianCreditReport"`
})

func (ExperianCreditReport) VDLWrite

func (x ExperianCreditReport) VDLWrite(enc vdl.Encoder) error

type ExperianRating

type ExperianRating int
const (
	ExperianRatingGood ExperianRating = iota
	ExperianRatingBad
)

func ExperianRatingFromString

func ExperianRatingFromString(label string) (x ExperianRating, err error)

ExperianRatingFromString creates a ExperianRating from a string label.

func (*ExperianRating) Set

func (x *ExperianRating) Set(label string) error

Set assigns label to x.

func (ExperianRating) String

func (x ExperianRating) String() string

String returns the string label of x.

func (ExperianRating) VDLIsZero

func (x ExperianRating) VDLIsZero() bool

func (*ExperianRating) VDLRead

func (x *ExperianRating) VDLRead(dec vdl.Decoder) error

func (ExperianRating) VDLReflect

func (ExperianRating) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.ExperianRating"`
	Enum struct{ Good, Bad string }
})

func (ExperianRating) VDLWrite

func (x ExperianRating) VDLWrite(enc vdl.Encoder) error

type FooType

type FooType struct {
	Bar BarType
}

func (FooType) VDLIsZero

func (x FooType) VDLIsZero() bool

func (*FooType) VDLRead

func (x *FooType) VDLRead(dec vdl.Decoder) error

func (FooType) VDLReflect

func (FooType) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.FooType"`
})

func (FooType) VDLWrite

func (x FooType) VDLWrite(enc vdl.Encoder) error

type Invoice

type Invoice struct {
	CustId     int64
	InvoiceNum int64
	Amount     int64
	ShipTo     AddressInfo
}

func (Invoice) VDLIsZero

func (x Invoice) VDLIsZero() bool

func (*Invoice) VDLRead

func (x *Invoice) VDLRead(dec vdl.Decoder) error

func (Invoice) VDLReflect

func (Invoice) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Invoice"`
})

func (Invoice) VDLWrite

func (x Invoice) VDLWrite(enc vdl.Encoder) error

type Numbers

type Numbers struct {
	B    byte
	Ui16 uint16
	Ui32 uint32
	Ui64 uint64
	I16  int16
	I32  int32
	I64  int64
	F32  float32
	F64  float64
}

func (Numbers) VDLIsZero

func (x Numbers) VDLIsZero() bool

func (*Numbers) VDLRead

func (x *Numbers) VDLRead(dec vdl.Decoder) error

func (Numbers) VDLReflect

func (Numbers) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Numbers"`
})

func (Numbers) VDLWrite

func (x Numbers) VDLWrite(enc vdl.Encoder) error

type Recursive

type Recursive struct {
	Any   *vom.RawBytes
	Maybe *Times
	Rec   map[Array2String]Recursive
}

func (Recursive) VDLIsZero

func (x Recursive) VDLIsZero() bool

func (*Recursive) VDLRead

func (x *Recursive) VDLRead(dec vdl.Decoder) error

func (Recursive) VDLReflect

func (Recursive) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Recursive"`
})

func (Recursive) VDLWrite

func (x Recursive) VDLWrite(enc vdl.Encoder) error

type Student

type Student struct {
	Name     string
	TestTime time.Time
	Score    ActOrSatScore
}

func (Student) VDLIsZero

func (x Student) VDLIsZero() bool

func (*Student) VDLRead

func (x *Student) VDLRead(dec vdl.Decoder) error

func (Student) VDLReflect

func (Student) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Student"`
})

func (Student) VDLWrite

func (x Student) VDLWrite(enc vdl.Encoder) error

type Times

type Times struct {
	Stamp    time.Time
	Interval time.Duration
}

func (Times) VDLIsZero

func (x Times) VDLIsZero() bool

func (*Times) VDLRead

func (x *Times) VDLRead(dec vdl.Decoder) error

func (Times) VDLReflect

func (Times) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Times"`
})

func (Times) VDLWrite

func (x Times) VDLWrite(enc vdl.Encoder) error

type TitleOrValueType

type TitleOrValueType interface {
	// Index returns the field index.
	Index() int
	// Interface returns the field value as an interface.
	Interface() interface{}
	// Name returns the field name.
	Name() string
	// VDLReflect describes the TitleOrValueType union type.
	VDLReflect(__TitleOrValueTypeReflect)
	VDLIsZero() bool
	VDLWrite(vdl.Encoder) error
}

TitleOrValueType represents any single field of the TitleOrValueType union type.

type TitleOrValueTypeTitle

type TitleOrValueTypeTitle struct{ Value string }

TitleOrValueTypeTitle represents field Title of the TitleOrValueType union type.

func (TitleOrValueTypeTitle) Index

func (x TitleOrValueTypeTitle) Index() int

func (TitleOrValueTypeTitle) Interface

func (x TitleOrValueTypeTitle) Interface() interface{}

func (TitleOrValueTypeTitle) Name

func (x TitleOrValueTypeTitle) Name() string

func (TitleOrValueTypeTitle) VDLIsZero

func (x TitleOrValueTypeTitle) VDLIsZero() bool

func (TitleOrValueTypeTitle) VDLReflect

func (x TitleOrValueTypeTitle) VDLReflect(__TitleOrValueTypeReflect)

func (TitleOrValueTypeTitle) VDLWrite

func (x TitleOrValueTypeTitle) VDLWrite(enc vdl.Encoder) error

type TitleOrValueTypeValue

type TitleOrValueTypeValue struct{ Value int64 }

TitleOrValueTypeValue represents field Value of the TitleOrValueType union type.

func (TitleOrValueTypeValue) Index

func (x TitleOrValueTypeValue) Index() int

func (TitleOrValueTypeValue) Interface

func (x TitleOrValueTypeValue) Interface() interface{}

func (TitleOrValueTypeValue) Name

func (x TitleOrValueTypeValue) Name() string

func (TitleOrValueTypeValue) VDLIsZero

func (x TitleOrValueTypeValue) VDLIsZero() bool

func (TitleOrValueTypeValue) VDLReflect

func (x TitleOrValueTypeValue) VDLReflect(__TitleOrValueTypeReflect)

func (TitleOrValueTypeValue) VDLWrite

func (x TitleOrValueTypeValue) VDLWrite(enc vdl.Encoder) error

type TransUnionCreditReport

type TransUnionCreditReport struct {
	Rating int16
}

func (TransUnionCreditReport) VDLIsZero

func (x TransUnionCreditReport) VDLIsZero() bool

func (*TransUnionCreditReport) VDLRead

func (x *TransUnionCreditReport) VDLRead(dec vdl.Decoder) error

func (TransUnionCreditReport) VDLReflect

func (TransUnionCreditReport) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.TransUnionCreditReport"`
})

func (TransUnionCreditReport) VDLWrite

func (x TransUnionCreditReport) VDLWrite(enc vdl.Encoder) error

Jump to

Keyboard shortcuts

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