...
1
2
3
4
5 package teststructs
6
7 import (
8 "time"
9
10 pb "github.com/google/go-cmp/cmp/internal/testprotos"
11 )
12
13
14
15
58
59 type Cartel struct {
60 Headquarter
61 source string
62 creationDate time.Time
63 boss string
64 lastCrimeDate time.Time
65 poisons []*Poison
66 }
67
68 func (p Cartel) Source() string { return p.source }
69 func (p Cartel) CreationDate() time.Time { return p.creationDate }
70 func (p Cartel) Boss() string { return p.boss }
71 func (p Cartel) LastCrimeDate() time.Time { return p.lastCrimeDate }
72 func (p Cartel) Poisons() []*Poison { return p.poisons }
73
74 func (p *Cartel) SetSource(x string) { p.source = x }
75 func (p *Cartel) SetCreationDate(x time.Time) { p.creationDate = x }
76 func (p *Cartel) SetBoss(x string) { p.boss = x }
77 func (p *Cartel) SetLastCrimeDate(x time.Time) { p.lastCrimeDate = x }
78 func (p *Cartel) SetPoisons(x []*Poison) { p.poisons = x }
79
80 type Headquarter struct {
81 id uint64
82 location string
83 subDivisions []string
84 incorporatedDate time.Time
85 metaData *pb.MetaData
86 privateMessage []byte
87 publicMessage []byte
88 horseBack string
89 rattle string
90 convulsion bool
91 expansion uint64
92 status pb.HoneyStatus
93 restrictions pb.Restrictions
94 creationTime time.Time
95 }
96
97 func (hq Headquarter) ID() uint64 { return hq.id }
98 func (hq Headquarter) Location() string { return hq.location }
99 func (hq Headquarter) SubDivisions() []string { return hq.subDivisions }
100 func (hq Headquarter) IncorporatedDate() time.Time { return hq.incorporatedDate }
101 func (hq Headquarter) MetaData() *pb.MetaData { return hq.metaData }
102 func (hq Headquarter) PrivateMessage() []byte { return hq.privateMessage }
103 func (hq Headquarter) PublicMessage() []byte { return hq.publicMessage }
104 func (hq Headquarter) HorseBack() string { return hq.horseBack }
105 func (hq Headquarter) Rattle() string { return hq.rattle }
106 func (hq Headquarter) Convulsion() bool { return hq.convulsion }
107 func (hq Headquarter) Expansion() uint64 { return hq.expansion }
108 func (hq Headquarter) Status() pb.HoneyStatus { return hq.status }
109 func (hq Headquarter) Restrictions() pb.Restrictions { return hq.restrictions }
110 func (hq Headquarter) CreationTime() time.Time { return hq.creationTime }
111
112 func (hq *Headquarter) SetID(x uint64) { hq.id = x }
113 func (hq *Headquarter) SetLocation(x string) { hq.location = x }
114 func (hq *Headquarter) SetSubDivisions(x []string) { hq.subDivisions = x }
115 func (hq *Headquarter) SetIncorporatedDate(x time.Time) { hq.incorporatedDate = x }
116 func (hq *Headquarter) SetMetaData(x *pb.MetaData) { hq.metaData = x }
117 func (hq *Headquarter) SetPrivateMessage(x []byte) { hq.privateMessage = x }
118 func (hq *Headquarter) SetPublicMessage(x []byte) { hq.publicMessage = x }
119 func (hq *Headquarter) SetHorseBack(x string) { hq.horseBack = x }
120 func (hq *Headquarter) SetRattle(x string) { hq.rattle = x }
121 func (hq *Headquarter) SetConvulsion(x bool) { hq.convulsion = x }
122 func (hq *Headquarter) SetExpansion(x uint64) { hq.expansion = x }
123 func (hq *Headquarter) SetStatus(x pb.HoneyStatus) { hq.status = x }
124 func (hq *Headquarter) SetRestrictions(x pb.Restrictions) { hq.restrictions = x }
125 func (hq *Headquarter) SetCreationTime(x time.Time) { hq.creationTime = x }
126
127 type Poison struct {
128 poisonType pb.PoisonType
129 expiration time.Time
130 manufacturer string
131 potency int
132 }
133
134 func (p Poison) PoisonType() pb.PoisonType { return p.poisonType }
135 func (p Poison) Expiration() time.Time { return p.expiration }
136 func (p Poison) Manufacturer() string { return p.manufacturer }
137 func (p Poison) Potency() int { return p.potency }
138
139 func (p *Poison) SetPoisonType(x pb.PoisonType) { p.poisonType = x }
140 func (p *Poison) SetExpiration(x time.Time) { p.expiration = x }
141 func (p *Poison) SetManufacturer(x string) { p.manufacturer = x }
142 func (p *Poison) SetPotency(x int) { p.potency = x }
143
View as plain text