blob: eb32dcc8c9d61ed72f8a061991b3c723a91a870d [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package demodb
import "time"
type AddressInfo struct {
Street string
City string
State string
Zip string
}
type CreditAgency enum {
Equifax
Experian
TransUnion
}
type ExperianRating enum {
Good
Bad
}
type EquifaxCreditReport struct {
Rating byte
}
type ExperianCreditReport struct {
Rating ExperianRating
}
type TransUnionCreditReport struct {
Rating int16
}
type AgencyReport union {
EquifaxReport EquifaxCreditReport
ExperianReport ExperianCreditReport
TransUnionReport TransUnionCreditReport
}
type CreditReport struct {
Agency CreditAgency
Report AgencyReport
}
type Customer struct {
Name string
Id int64
Active bool
Address AddressInfo
Credit CreditReport
}
type Invoice struct {
CustId int64
InvoiceNum int64
Amount int64
ShipTo AddressInfo
}
type Numbers struct {
B byte
Ui16 uint16
Ui32 uint32
Ui64 uint64
I16 int16
I32 int32
I64 int64
F32 float32
F64 float64
C64 complex64
C128 complex128
}
type FooType struct {
Bar BarType
}
type BarType struct {
Baz BazType
}
type TitleOrValueType union {
Title string
Value int64
}
type BazType struct {
Name string
TitleOrValue TitleOrValueType
}
type Array2String [2]string
type Composite struct {
Arr Array2String
ListInt []int32
MySet set[int32]
Map map[string]int32
}
type Times struct {
Stamp time.Time
Interval time.Duration
}
type Recursive struct {
Any any
Maybe ?Times
Rec map[Array2String]Recursive
}
type ActOrSatScore union {
ActScore uint16
SatScore uint16
}
type Student struct {
Name string
TestTime time.Time
Score ActOrSatScore
}
type AnythingGoes struct {
NameOfType string
Anything any
}