File: content_fieldpath.pb.go

package info (click to toggle)
containerd 2.1.4~ds2-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,936 kB
  • sloc: sh: 1,883; makefile: 591
file content (30 lines) | stat: -rw-r--r-- 889 bytes parent folder | download
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
// Code generated by protoc-gen-go-fieldpath. DO NOT EDIT.
// source: github.com/containerd/containerd/api/events/content.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 *ContentCreate) Field(fieldpath []string) (string, bool) {
	if len(fieldpath) == 0 {
		return "", false
	}
	switch fieldpath[0] {
	// unhandled: size
	case "digest":
		return string(m.Digest), len(m.Digest) > 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 *ContentDelete) Field(fieldpath []string) (string, bool) {
	if len(fieldpath) == 0 {
		return "", false
	}
	switch fieldpath[0] {
	case "digest":
		return string(m.Digest), len(m.Digest) > 0
	}
	return "", false
}