-
Notifications
You must be signed in to change notification settings - Fork 3
/
models.pb.go
235 lines (200 loc) · 5.72 KB
/
models.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
// Code generated by protoc-gen-go.
// source: models.proto
// DO NOT EDIT!
package data
import proto "code.google.com/p/goprotobuf/proto"
import json "encoding/json"
import math "math"
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf
type Entry_Type int32
const (
Entry_CHORE Entry_Type = 0
Entry_FUN Entry_Type = 1
Entry_WORK Entry_Type = 2
)
var Entry_Type_name = map[int32]string{
0: "CHORE",
1: "FUN",
2: "WORK",
}
var Entry_Type_value = map[string]int32{
"CHORE": 0,
"FUN": 1,
"WORK": 2,
}
func (x Entry_Type) Enum() *Entry_Type {
p := new(Entry_Type)
*p = x
return p
}
func (x Entry_Type) String() string {
return proto.EnumName(Entry_Type_name, int32(x))
}
func (x Entry_Type) MarshalJSON() ([]byte, error) {
return json.Marshal(x.String())
}
func (x *Entry_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Entry_Type_value, data, "Entry_Type")
if err != nil {
return err
}
*x = Entry_Type(value)
return nil
}
type Project struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
Company *string `protobuf:"bytes,2,opt,name=company" json:"company,omitempty"`
Hide *bool `protobuf:"varint,3,opt,name=hide" json:"hide,omitempty"`
Sha *string `protobuf:"bytes,4,opt,name=sha" json:"sha,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (this *Project) Reset() { *this = Project{} }
func (this *Project) String() string { return proto.CompactTextString(this) }
func (*Project) ProtoMessage() {}
func (this *Project) GetName() string {
if this != nil && this.Name != nil {
return *this.Name
}
return ""
}
func (this *Project) GetCompany() string {
if this != nil && this.Company != nil {
return *this.Company
}
return ""
}
func (this *Project) GetHide() bool {
if this != nil && this.Hide != nil {
return *this.Hide
}
return false
}
func (this *Project) GetSha() string {
if this != nil && this.Sha != nil {
return *this.Sha
}
return ""
}
type Entry struct {
Id *string `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
Duration *int64 `protobuf:"varint,2,req,name=duration" json:"duration,omitempty"`
Content *string `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"`
Creator *Person `protobuf:"bytes,4,opt,name=creator" json:"creator,omitempty"`
Started *int64 `protobuf:"varint,5,opt,name=started" json:"started,omitempty"`
Ended *int64 `protobuf:"varint,6,opt,name=ended" json:"ended,omitempty"`
Type *Entry_Type `protobuf:"varint,7,opt,name=type,enum=data.Entry_Type,def=2" json:"type,omitempty"`
Project *Project `protobuf:"bytes,8,opt,name=project" json:"project,omitempty"`
Billable *bool `protobuf:"varint,9,opt,name=billable" json:"billable,omitempty"`
Tags []string `protobuf:"bytes,10,rep,name=tags" json:"tags,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (this *Entry) Reset() { *this = Entry{} }
func (this *Entry) String() string { return proto.CompactTextString(this) }
func (*Entry) ProtoMessage() {}
const Default_Entry_Type Entry_Type = Entry_WORK
func (this *Entry) GetId() string {
if this != nil && this.Id != nil {
return *this.Id
}
return ""
}
func (this *Entry) GetDuration() int64 {
if this != nil && this.Duration != nil {
return *this.Duration
}
return 0
}
func (this *Entry) GetContent() string {
if this != nil && this.Content != nil {
return *this.Content
}
return ""
}
func (this *Entry) GetCreator() *Person {
if this != nil {
return this.Creator
}
return nil
}
func (this *Entry) GetStarted() int64 {
if this != nil && this.Started != nil {
return *this.Started
}
return 0
}
func (this *Entry) GetEnded() int64 {
if this != nil && this.Ended != nil {
return *this.Ended
}
return 0
}
func (this *Entry) GetType() Entry_Type {
if this != nil && this.Type != nil {
return *this.Type
}
return Default_Entry_Type
}
func (this *Entry) GetProject() *Project {
if this != nil {
return this.Project
}
return nil
}
func (this *Entry) GetBillable() bool {
if this != nil && this.Billable != nil {
return *this.Billable
}
return false
}
func (this *Entry) GetTags() []string {
if this != nil {
return this.Tags
}
return nil
}
type Person struct {
Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"`
Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (this *Person) Reset() { *this = Person{} }
func (this *Person) String() string { return proto.CompactTextString(this) }
func (*Person) ProtoMessage() {}
func (this *Person) GetEmail() string {
if this != nil && this.Email != nil {
return *this.Email
}
return ""
}
func (this *Person) GetName() string {
if this != nil && this.Name != nil {
return *this.Name
}
return ""
}
type Timer struct {
Project *Project `protobuf:"bytes,1,req,name=project" json:"project,omitempty"`
Started *int64 `protobuf:"varint,2,req,name=started" json:"started,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (this *Timer) Reset() { *this = Timer{} }
func (this *Timer) String() string { return proto.CompactTextString(this) }
func (*Timer) ProtoMessage() {}
func (this *Timer) GetProject() *Project {
if this != nil {
return this.Project
}
return nil
}
func (this *Timer) GetStarted() int64 {
if this != nil && this.Started != nil {
return *this.Started
}
return 0
}
func init() {
proto.RegisterEnum("data.Entry_Type", Entry_Type_name, Entry_Type_value)
}