-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
snapshot_fieldpath.pb.go
52 lines (49 loc) · 1.52 KB
/
snapshot_fieldpath.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
// Code generated by protoc-gen-go-fieldpath. DO NOT EDIT.
// source: github.com/containerd/containerd/api/events/snapshot.proto
package events
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SnapshotPrepare) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
case "key":
return string(m.Key), len(m.Key) > 0
case "parent":
return string(m.Parent), len(m.Parent) > 0
case "snapshotter":
return string(m.Snapshotter), len(m.Snapshotter) > 0
}
return "", false
}
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SnapshotCommit) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
case "key":
return string(m.Key), len(m.Key) > 0
case "name":
return string(m.Name), len(m.Name) > 0
case "snapshotter":
return string(m.Snapshotter), len(m.Snapshotter) > 0
}
return "", false
}
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SnapshotRemove) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
case "key":
return string(m.Key), len(m.Key) > 0
case "snapshotter":
return string(m.Snapshotter), len(m.Snapshotter) > 0
}
return "", false
}