-
Notifications
You must be signed in to change notification settings - Fork 31
/
route.pb.go
170 lines (149 loc) · 4.71 KB
/
route.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
// Code generated by protoc-gen-go.
// source: route.proto
// DO NOT EDIT!
package models
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Route struct {
Uuid *string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
// Types that are valid to be assigned to Target:
// *Route_File
// *Route_PageUuid
Target IsRoute_Target `protobuf_oneof:"target"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Route) Reset() { *m = Route{} }
func (m *Route) String() string { return proto.CompactTextString(m) }
func (*Route) ProtoMessage() {}
func (*Route) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} }
type IsRoute_Target interface {
IsRoute_Target()
}
type Route_File struct {
File string `protobuf:"bytes,10,opt,name=file,oneof"`
}
type Route_PageUuid struct {
PageUuid string `protobuf:"bytes,11,opt,name=page_uuid,json=pageUuid,oneof"`
}
func (*Route_File) IsRoute_Target() {}
func (*Route_PageUuid) IsRoute_Target() {}
func (m *Route) GetTarget() IsRoute_Target {
if m != nil {
return m.Target
}
return nil
}
func (m *Route) GetUuid() string {
if m != nil && m.Uuid != nil {
return *m.Uuid
}
return ""
}
func (m *Route) GetPath() string {
if m != nil && m.Path != nil {
return *m.Path
}
return ""
}
func (m *Route) GetFile() string {
if x, ok := m.GetTarget().(*Route_File); ok {
return x.File
}
return ""
}
func (m *Route) GetPageUuid() string {
if x, ok := m.GetTarget().(*Route_PageUuid); ok {
return x.PageUuid
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Route) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Route_OneofMarshaler, _Route_OneofUnmarshaler, _Route_OneofSizer, []interface{}{
(*Route_File)(nil),
(*Route_PageUuid)(nil),
}
}
func _Route_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Route)
// target
switch x := m.Target.(type) {
case *Route_File:
b.EncodeVarint(10<<3 | proto.WireBytes)
b.EncodeStringBytes(x.File)
case *Route_PageUuid:
b.EncodeVarint(11<<3 | proto.WireBytes)
b.EncodeStringBytes(x.PageUuid)
case nil:
default:
return fmt.Errorf("Route.Target has unexpected type %T", x)
}
return nil
}
func _Route_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Route)
switch tag {
case 10: // target.file
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Target = &Route_File{x}
return true, err
case 11: // target.page_uuid
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Target = &Route_PageUuid{x}
return true, err
default:
return false, nil
}
}
func _Route_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Route)
// target
switch x := m.Target.(type) {
case *Route_File:
n += proto.SizeVarint(10<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.File)))
n += len(x.File)
case *Route_PageUuid:
n += proto.SizeVarint(11<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.PageUuid)))
n += len(x.PageUuid)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*Route)(nil), "ketchup.models.Route")
}
func (m *Route) SetUuid(v *string) {
m.Uuid = v
}
func (m *Route) SetPath(v *string) {
m.Path = v
}
func init() { proto.RegisterFile("route.proto", fileDescriptor7) }
var fileDescriptor7 = []byte{
// 136 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0xca, 0x2f, 0x2d,
0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcb, 0x4e, 0x2d, 0x49, 0xce, 0x28, 0x2d,
0xd0, 0xcb, 0xcd, 0x4f, 0x49, 0xcd, 0x29, 0x56, 0xca, 0xe3, 0x62, 0x0d, 0x02, 0x49, 0x0b, 0x09,
0x71, 0xb1, 0x94, 0x96, 0x66, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x20,
0xb1, 0x82, 0xc4, 0x92, 0x0c, 0x09, 0x26, 0x88, 0x18, 0x88, 0x2d, 0x24, 0xc2, 0xc5, 0x92, 0x96,
0x99, 0x93, 0x2a, 0xc1, 0x05, 0x12, 0xf3, 0x60, 0x08, 0x02, 0xf3, 0x84, 0x64, 0xb9, 0x38, 0x0b,
0x12, 0xd3, 0x53, 0xe3, 0xc1, 0x46, 0x70, 0x43, 0xa5, 0x38, 0x40, 0x42, 0xa1, 0xa5, 0x99, 0x29,
0x4e, 0x1c, 0x5c, 0x6c, 0x25, 0x89, 0x45, 0xe9, 0xa9, 0x25, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff,
0xf4, 0xd6, 0x08, 0xaa, 0x8d, 0x00, 0x00, 0x00,
}