Documentation ¶
Overview ¶
Package demodb supports loading an example database into syncbase for experimentation and testing purposes.
Index ¶
- Variables
- func PopulateDemoDB(ctx *context.T, db syncbase.Database) error
- func VDLReadActOrSatScore(dec vdl.Decoder, x *ActOrSatScore) error
- func VDLReadAgencyReport(dec vdl.Decoder, x *AgencyReport) error
- func VDLReadTitleOrValueType(dec vdl.Decoder, x *TitleOrValueType) error
- type ActOrSatScore
- type ActOrSatScoreActScore
- func (x ActOrSatScoreActScore) Index() int
- func (x ActOrSatScoreActScore) Interface() interface{}
- func (x ActOrSatScoreActScore) Name() string
- func (x ActOrSatScoreActScore) VDLIsZero() bool
- func (x ActOrSatScoreActScore) VDLReflect(__ActOrSatScoreReflect)
- func (x ActOrSatScoreActScore) VDLWrite(enc vdl.Encoder) error
- type ActOrSatScoreSatScore
- func (x ActOrSatScoreSatScore) Index() int
- func (x ActOrSatScoreSatScore) Interface() interface{}
- func (x ActOrSatScoreSatScore) Name() string
- func (x ActOrSatScoreSatScore) VDLIsZero() bool
- func (x ActOrSatScoreSatScore) VDLReflect(__ActOrSatScoreReflect)
- func (x ActOrSatScoreSatScore) VDLWrite(enc vdl.Encoder) error
- type AddressInfo
- type AgencyReport
- type AgencyReportEquifaxReport
- func (x AgencyReportEquifaxReport) Index() int
- func (x AgencyReportEquifaxReport) Interface() interface{}
- func (x AgencyReportEquifaxReport) Name() string
- func (x AgencyReportEquifaxReport) VDLIsZero() bool
- func (x AgencyReportEquifaxReport) VDLReflect(__AgencyReportReflect)
- func (x AgencyReportEquifaxReport) VDLWrite(enc vdl.Encoder) error
- type AgencyReportExperianReport
- func (x AgencyReportExperianReport) Index() int
- func (x AgencyReportExperianReport) Interface() interface{}
- func (x AgencyReportExperianReport) Name() string
- func (x AgencyReportExperianReport) VDLIsZero() bool
- func (x AgencyReportExperianReport) VDLReflect(__AgencyReportReflect)
- func (x AgencyReportExperianReport) VDLWrite(enc vdl.Encoder) error
- type AgencyReportTransUnionReport
- func (x AgencyReportTransUnionReport) Index() int
- func (x AgencyReportTransUnionReport) Interface() interface{}
- func (x AgencyReportTransUnionReport) Name() string
- func (x AgencyReportTransUnionReport) VDLIsZero() bool
- func (x AgencyReportTransUnionReport) VDLReflect(__AgencyReportReflect)
- func (x AgencyReportTransUnionReport) VDLWrite(enc vdl.Encoder) error
- type AnythingGoes
- type Array2String
- type BarType
- type BazType
- type Composite
- type CreditAgency
- type CreditReport
- type Customer
- type EquifaxCreditReport
- type ExperianCreditReport
- type ExperianRating
- type FooType
- type Invoice
- type Numbers
- type Recursive
- type Student
- type Times
- type TitleOrValueType
- type TitleOrValueTypeTitle
- func (x TitleOrValueTypeTitle) Index() int
- func (x TitleOrValueTypeTitle) Interface() interface{}
- func (x TitleOrValueTypeTitle) Name() string
- func (x TitleOrValueTypeTitle) VDLIsZero() bool
- func (x TitleOrValueTypeTitle) VDLReflect(__TitleOrValueTypeReflect)
- func (x TitleOrValueTypeTitle) VDLWrite(enc vdl.Encoder) error
- type TitleOrValueTypeValue
- func (x TitleOrValueTypeValue) Index() int
- func (x TitleOrValueTypeValue) Interface() interface{}
- func (x TitleOrValueTypeValue) Name() string
- func (x TitleOrValueTypeValue) VDLIsZero() bool
- func (x TitleOrValueTypeValue) VDLReflect(__TitleOrValueTypeReflect)
- func (x TitleOrValueTypeValue) VDLWrite(enc vdl.Encoder) error
- type TransUnionCreditReport
Constants ¶
This section is empty.
Variables ¶
var CreditAgencyAll = [...]CreditAgency{CreditAgencyEquifax, CreditAgencyExperian, CreditAgencyTransUnion}
CreditAgencyAll holds all labels for CreditAgency.
var ExperianRatingAll = [...]ExperianRating{ExperianRatingGood, ExperianRatingBad}
ExperianRatingAll holds all labels for ExperianRating.
Functions ¶
func PopulateDemoDB ¶
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)
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)
type AddressInfo ¶
func (AddressInfo) VDLIsZero ¶
func (x AddressInfo) VDLIsZero() bool
func (AddressInfo) VDLReflect ¶
func (AddressInfo) VDLReflect(struct { Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.AddressInfo"` })
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 (x AgencyReportEquifaxReport) Name() string
func (AgencyReportEquifaxReport) VDLIsZero ¶
func (x AgencyReportEquifaxReport) VDLIsZero() bool
func (AgencyReportEquifaxReport) VDLReflect ¶
func (x AgencyReportEquifaxReport) VDLReflect(__AgencyReportReflect)
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 (x AgencyReportExperianReport) Name() string
func (AgencyReportExperianReport) VDLIsZero ¶
func (x AgencyReportExperianReport) VDLIsZero() bool
func (AgencyReportExperianReport) VDLReflect ¶
func (x AgencyReportExperianReport) VDLReflect(__AgencyReportReflect)
type AgencyReportTransUnionReport ¶
type AgencyReportTransUnionReport struct{ Value TransUnionCreditReport }
AgencyReportTransUnionReport represents field TransUnionReport of the AgencyReport union type.
func (AgencyReportTransUnionReport) Index ¶
func (x AgencyReportTransUnionReport) Index() int
func (AgencyReportTransUnionReport) Interface ¶
func (x AgencyReportTransUnionReport) Interface() interface{}
func (AgencyReportTransUnionReport) Name ¶
func (x AgencyReportTransUnionReport) Name() string
func (AgencyReportTransUnionReport) VDLIsZero ¶
func (x AgencyReportTransUnionReport) VDLIsZero() bool
func (AgencyReportTransUnionReport) VDLReflect ¶
func (x AgencyReportTransUnionReport) VDLReflect(__AgencyReportReflect)
type AnythingGoes ¶
func (AnythingGoes) VDLIsZero ¶
func (x AnythingGoes) VDLIsZero() bool
func (AnythingGoes) VDLReflect ¶
func (AnythingGoes) VDLReflect(struct { Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.AnythingGoes"` })
type Array2String ¶
type Array2String [2]string
func (Array2String) VDLIsZero ¶
func (x Array2String) VDLIsZero() bool
func (Array2String) VDLReflect ¶
func (Array2String) VDLReflect(struct { Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.Array2String"` })
type BazType ¶
type BazType struct { Name string TitleOrValue TitleOrValueType }
func (BazType) VDLReflect ¶
type Composite ¶
type Composite struct { Arr Array2String ListInt []int32 MySet map[int32]struct{} Map map[string]int32 }
func (Composite) VDLReflect ¶
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) String ¶
func (x CreditAgency) String() string
String returns the string label of x.
func (CreditAgency) VDLIsZero ¶
func (x CreditAgency) VDLIsZero() bool
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 } })
type CreditReport ¶
type CreditReport struct { Agency CreditAgency Report AgencyReport }
func (CreditReport) VDLIsZero ¶
func (x CreditReport) VDLIsZero() bool
func (CreditReport) VDLReflect ¶
func (CreditReport) VDLReflect(struct { Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.CreditReport"` })
type Customer ¶
type Customer struct { Name string Id int64 Active bool Address AddressInfo Credit CreditReport }
func (Customer) VDLReflect ¶
type EquifaxCreditReport ¶
type EquifaxCreditReport struct {
Rating byte
}
func (EquifaxCreditReport) VDLIsZero ¶
func (x EquifaxCreditReport) VDLIsZero() bool
func (EquifaxCreditReport) VDLReflect ¶
func (EquifaxCreditReport) VDLReflect(struct { Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.EquifaxCreditReport"` })
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"` })
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) VDLReflect ¶
func (ExperianRating) VDLReflect(struct { Name string `vdl:"v.io/x/ref/cmd/sb/internal/demodb.ExperianRating"` Enum struct{ Good, Bad string } })
type Invoice ¶
type Invoice struct { CustId int64 InvoiceNum int64 Amount int64 ShipTo AddressInfo }
func (Invoice) VDLReflect ¶
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) VDLReflect ¶
type Recursive ¶
type Recursive struct { Any *vom.RawBytes Maybe *Times Rec map[Array2String]Recursive }
func (Recursive) VDLReflect ¶
type Student ¶
type Student struct { Name string TestTime time.Time Score ActOrSatScore }
func (Student) VDLReflect ¶
type Times ¶
func (Times) VDLReflect ¶
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)
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)
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"` })