| // 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 |
| } |