summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-08-22 09:12:40 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-24 19:19:43 +0000
commit714dbbda9e1f3ec98d75a07ed4c5442ea6540680 (patch)
tree286da76261791b375441a6d3999f1348c7d1e66e
parentbd080b45305a311542527443e9108c1cfdff3c93 (diff)
downloadpodman-714dbbda9e1f3ec98d75a07ed4c5442ea6540680.tar.gz
podman-714dbbda9e1f3ec98d75a07ed4c5442ea6540680.tar.bz2
podman-714dbbda9e1f3ec98d75a07ed4c5442ea6540680.zip
Swap from FFJSON to easyjson
FFJSON has serialization differences versus stock Go - namely, it does not respect the MarshalText() and UnmarshalText() methods, particularly on []byte, which causes incompatability with pre-FFJSON containers which contained DNS servers. EasyJSON does not have these issues, and might even be slightly faster. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1322 Approved by: mheon
-rw-r--r--Dockerfile6
-rw-r--r--Dockerfile.CentOS6
-rw-r--r--Dockerfile.Fedora6
-rw-r--r--Makefile24
-rw-r--r--libpod/container.go3
-rw-r--r--libpod/container_easyjson.go7594
-rw-r--r--libpod/container_ffjson.go5454
-rw-r--r--libpod/pod.go5
-rw-r--r--libpod/pod_easyjson.go574
-rw-r--r--libpod/pod_ffjson.go2681
10 files changed, 8198 insertions, 8155 deletions
diff --git a/Dockerfile b/Dockerfile
index 48988def4..878d2c0b9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -104,11 +104,11 @@ RUN set -x \
&& export GOPATH=/go \
&& go get github.com/onsi/gomega/...
-# Install ffjson
+# Install easyjson
RUN set -x \
&& export GOPATH=/go \
- && go get github.com/pquerna/ffjson \
- && install -D -m 755 "$GOPATH"/bin/ffjson /usr/bin/
+ && go get -u github.com/mailru/easyjson/... \
+ && install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/
# Install cni config
#RUN make install.cni
diff --git a/Dockerfile.CentOS b/Dockerfile.CentOS
index 368f9255c..80ade88bb 100644
--- a/Dockerfile.CentOS
+++ b/Dockerfile.CentOS
@@ -61,11 +61,11 @@ RUN set -x \
&& export GOPATH=/go \
&& go get github.com/onsi/gomega/...
-# Install ffjson
+# Install easyjson
RUN set -x \
&& export GOPATH=/go \
- && go get github.com/pquerna/ffjson \
- && install -D -m 755 "$GOPATH"/bin/ffjson /usr/bin/
+ && go get -u github.com/mailru/easyjson/... \
+ && install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/
# Install conmon
ENV CRIO_COMMIT 662dbb31b5d4f5ed54511a47cde7190c61c28677
diff --git a/Dockerfile.Fedora b/Dockerfile.Fedora
index 74bae9eb0..f544fc532 100644
--- a/Dockerfile.Fedora
+++ b/Dockerfile.Fedora
@@ -63,11 +63,11 @@ RUN set -x \
&& export GOPATH=/go \
&& go get github.com/onsi/gomega/...
-# Install ffjson
+# Install easyjson
RUN set -x \
&& export GOPATH=/go \
- && go get github.com/pquerna/ffjson \
- && install -D -m 755 "$GOPATH"/bin/ffjson /usr/bin/
+ && go get -u github.com/mailru/easyjson/... \
+ && install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/
# Install conmon
ENV CRIO_COMMIT 662dbb31b5d4f5ed54511a47cde7190c61c28677
diff --git a/Makefile b/Makefile
index 25a4f40ea..e69e9e26b 100644
--- a/Makefile
+++ b/Makefile
@@ -135,6 +135,8 @@ clean:
cmd/podman/varlink/iopodman.go \
libpod/container_ffjson.go \
libpod/pod_ffjson.go \
+ libpod/container_easyjson.go \
+ libpod/pod_easyjson.go \
$(MANPAGES) ||:
ifdef HAS_PYTHON3
$(MAKE) -C contrib/python/podman clean
@@ -183,7 +185,7 @@ clientintegration:
vagrant-check:
BOX=$(BOX) sh ./vagrant.sh
-binaries: varlink_generate ffjson_generate podman python
+binaries: varlink_generate easyjson_generate podman python
test-binaries: test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp
@@ -262,7 +264,7 @@ uninstall:
.PHONY: install.tools
-install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ffjson
+install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.easyjson
.install.gitvalidation: .gopathok
if [ ! -x "$(GOBIN)/git-validation" ]; then \
@@ -283,9 +285,9 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
$(GO) get -u github.com/cpuguy83/go-md2man; \
fi
-.install.ffjson: .gopathok
+.install.easyjson: .gopathok
if [ ! -x "$(GOBIN)/ffjson" ]; then\
- $(GO) get -u github.com/pquerna/ffjson; \
+ $(GO) get -u github.com/mailru/easyjson/...; \
fi
.install.ostree: .gopathok
@@ -299,15 +301,15 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
varlink_generate: .gopathok cmd/podman/varlink/iopodman.go
varlink_api_generate: .gopathok API.md
-ffjson_generate: .gopathok libpod/container_ffjson.go libpod/pod_ffjson.go
+easyjson_generate: .gopathok libpod/container_easyjson.go libpod/pod_easyjson.go
-libpod/container_ffjson.go: libpod/container.go
- rm -f libpod/container_ffjson.go
- ffjson $(GOPKGDIR)/libpod/container.go
+libpod/container_easyjson.go: libpod/container.go
+ rm -f libpod/container_easyjson.go
+ cd "$(GOPKGDIR)" && easyjson ./libpod/container.go
-libpod/pod_ffjson.go: libpod/pod.go
- rm -f libpod/pod_ffjson.go
- ffjson $(GOPKGDIR)/libpod/pod.go
+libpod/pod_easyjson.go: libpod/pod.go
+ rm -f libpod/pod_easyjson.go
+ cd "$(GOPKGDIR)" && easyjson ./libpod/pod.go
.PHONY: install.libseccomp.sudo
install.libseccomp.sudo:
diff --git a/libpod/container.go b/libpod/container.go
index ea6cd2ac4..e748cb84d 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -123,6 +123,7 @@ type Container struct {
// containerState contains the current state of the container
// It is stored on disk in a tmpfs and recreated on reboot
+// easyjson:json
type containerState struct {
// The current state of the running container
State ContainerStatus `json:"state"`
@@ -183,6 +184,7 @@ type containerState struct {
}
// ExecSession contains information on an active exec session
+// easyjson:json
type ExecSession struct {
ID string `json:"id"`
Command []string `json:"command"`
@@ -192,6 +194,7 @@ type ExecSession struct {
// ContainerConfig contains all information that was used to create the
// container. It may not be changed once created.
// It is stored, read-only, on disk
+// easyjson:json
type ContainerConfig struct {
Spec *spec.Spec `json:"spec"`
ID string `json:"id"`
diff --git a/libpod/container_easyjson.go b/libpod/container_easyjson.go
new file mode 100644
index 000000000..d4294e9b5
--- /dev/null
+++ b/libpod/container_easyjson.go
@@ -0,0 +1,7594 @@
+// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
+
+package libpod
+
+import (
+ json "encoding/json"
+ types "github.com/containernetworking/cni/pkg/types"
+ current "github.com/containernetworking/cni/pkg/types/current"
+ storage "github.com/containers/storage"
+ idtools "github.com/containers/storage/pkg/idtools"
+ ocicni "github.com/cri-o/ocicni/pkg/ocicni"
+ easyjson "github.com/mailru/easyjson"
+ jlexer "github.com/mailru/easyjson/jlexer"
+ jwriter "github.com/mailru/easyjson/jwriter"
+ specs_go "github.com/opencontainers/runtime-spec/specs-go"
+ net "net"
+ os "os"
+)
+
+// suppress unused package warning
+var (
+ _ *json.RawMessage
+ _ *jlexer.Lexer
+ _ *jwriter.Writer
+ _ easyjson.Marshaler
+)
+
+func easyjson1dbef17bDecodeGithubComContainersLibpodLibpod(in *jlexer.Lexer, out *containerState) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "state":
+ out.State = ContainerStatus(in.Int())
+ case "configPath":
+ out.ConfigPath = string(in.String())
+ case "runDir":
+ out.RunDir = string(in.String())
+ case "destinationRunDir":
+ out.DestinationRunDir = string(in.String())
+ case "mounted":
+ out.Mounted = bool(in.Bool())
+ case "mountPoint":
+ out.Mountpoint = string(in.String())
+ case "realMountPoint":
+ out.RealMountpoint = string(in.String())
+ case "startedTime":
+ if data := in.Raw(); in.Ok() {
+ in.AddError((out.StartedTime).UnmarshalJSON(data))
+ }
+ case "finishedTime":
+ if data := in.Raw(); in.Ok() {
+ in.AddError((out.FinishedTime).UnmarshalJSON(data))
+ }
+ case "exitCode":
+ out.ExitCode = int32(in.Int32())
+ case "exited":
+ out.Exited = bool(in.Bool())
+ case "oomKilled":
+ out.OOMKilled = bool(in.Bool())
+ case "pid":
+ out.PID = int(in.Int())
+ case "execSessions":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.ExecSessions = make(map[string]*ExecSession)
+ } else {
+ out.ExecSessions = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v1 *ExecSession
+ if in.IsNull() {
+ in.Skip()
+ v1 = nil
+ } else {
+ if v1 == nil {
+ v1 = new(ExecSession)
+ }
+ (*v1).UnmarshalEasyJSON(in)
+ }
+ (out.ExecSessions)[key] = v1
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ case "networkResults":
+ if in.IsNull() {
+ in.Skip()
+ out.NetworkStatus = nil
+ } else {
+ in.Delim('[')
+ if out.NetworkStatus == nil {
+ if !in.IsDelim(']') {
+ out.NetworkStatus = make([]*current.Result, 0, 8)
+ } else {
+ out.NetworkStatus = []*current.Result{}
+ }
+ } else {
+ out.NetworkStatus = (out.NetworkStatus)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v2 *current.Result
+ if in.IsNull() {
+ in.Skip()
+ v2 = nil
+ } else {
+ if v2 == nil {
+ v2 = new(current.Result)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent(in, &*v2)
+ }
+ out.NetworkStatus = append(out.NetworkStatus, v2)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "bindMounts":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.BindMounts = make(map[string]string)
+ } else {
+ out.BindMounts = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v3 string
+ v3 = string(in.String())
+ (out.BindMounts)[key] = v3
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ case "userNSRoot":
+ out.UserNSRoot = string(in.String())
+ case "extensionStageHooks":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.ExtensionStageHooks = make(map[string][]specs_go.Hook)
+ } else {
+ out.ExtensionStageHooks = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v4 []specs_go.Hook
+ if in.IsNull() {
+ in.Skip()
+ v4 = nil
+ } else {
+ in.Delim('[')
+ if v4 == nil {
+ if !in.IsDelim(']') {
+ v4 = make([]specs_go.Hook, 0, 1)
+ } else {
+ v4 = []specs_go.Hook{}
+ }
+ } else {
+ v4 = (v4)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v5 specs_go.Hook
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(in, &v5)
+ v4 = append(v4, v5)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ (out.ExtensionStageHooks)[key] = v4
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodLibpod(out *jwriter.Writer, in containerState) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"state\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(in.State))
+ }
+ if in.ConfigPath != "" {
+ const prefix string = ",\"configPath\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ConfigPath))
+ }
+ if in.RunDir != "" {
+ const prefix string = ",\"runDir\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.RunDir))
+ }
+ if in.DestinationRunDir != "" {
+ const prefix string = ",\"destinationRunDir\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.DestinationRunDir))
+ }
+ if in.Mounted {
+ const prefix string = ",\"mounted\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Mounted))
+ }
+ if in.Mountpoint != "" {
+ const prefix string = ",\"mountPoint\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Mountpoint))
+ }
+ if in.RealMountpoint != "" {
+ const prefix string = ",\"realMountPoint\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.RealMountpoint))
+ }
+ if true {
+ const prefix string = ",\"startedTime\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Raw((in.StartedTime).MarshalJSON())
+ }
+ if true {
+ const prefix string = ",\"finishedTime\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Raw((in.FinishedTime).MarshalJSON())
+ }
+ if in.ExitCode != 0 {
+ const prefix string = ",\"exitCode\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int32(int32(in.ExitCode))
+ }
+ if in.Exited {
+ const prefix string = ",\"exited\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Exited))
+ }
+ if in.OOMKilled {
+ const prefix string = ",\"oomKilled\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.OOMKilled))
+ }
+ if in.PID != 0 {
+ const prefix string = ",\"pid\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(in.PID))
+ }
+ if len(in.ExecSessions) != 0 {
+ const prefix string = ",\"execSessions\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('{')
+ v6First := true
+ for v6Name, v6Value := range in.ExecSessions {
+ if v6First {
+ v6First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v6Name))
+ out.RawByte(':')
+ if v6Value == nil {
+ out.RawString("null")
+ } else {
+ (*v6Value).MarshalEasyJSON(out)
+ }
+ }
+ out.RawByte('}')
+ }
+ }
+ if len(in.NetworkStatus) != 0 {
+ const prefix string = ",\"networkResults\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v7, v8 := range in.NetworkStatus {
+ if v7 > 0 {
+ out.RawByte(',')
+ }
+ if v8 == nil {
+ out.RawString("null")
+ } else {
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent(out, *v8)
+ }
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.BindMounts) != 0 {
+ const prefix string = ",\"bindMounts\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('{')
+ v9First := true
+ for v9Name, v9Value := range in.BindMounts {
+ if v9First {
+ v9First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v9Name))
+ out.RawByte(':')
+ out.String(string(v9Value))
+ }
+ out.RawByte('}')
+ }
+ }
+ if in.UserNSRoot != "" {
+ const prefix string = ",\"userNSRoot\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.UserNSRoot))
+ }
+ if len(in.ExtensionStageHooks) != 0 {
+ const prefix string = ",\"extensionStageHooks\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('{')
+ v10First := true
+ for v10Name, v10Value := range in.ExtensionStageHooks {
+ if v10First {
+ v10First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v10Name))
+ out.RawByte(':')
+ if v10Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v11, v12 := range v10Value {
+ if v11 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(out, v12)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+ }
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v containerState) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjson1dbef17bEncodeGithubComContainersLibpodLibpod(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v containerState) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjson1dbef17bEncodeGithubComContainersLibpodLibpod(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *containerState) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjson1dbef17bDecodeGithubComContainersLibpodLibpod(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *containerState) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjson1dbef17bDecodeGithubComContainersLibpodLibpod(l, v)
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(in *jlexer.Lexer, out *specs_go.Hook) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "path":
+ out.Path = string(in.String())
+ case "args":
+ if in.IsNull() {
+ in.Skip()
+ out.Args = nil
+ } else {
+ in.Delim('[')
+ if out.Args == nil {
+ if !in.IsDelim(']') {
+ out.Args = make([]string, 0, 4)
+ } else {
+ out.Args = []string{}
+ }
+ } else {
+ out.Args = (out.Args)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v13 string
+ v13 = string(in.String())
+ out.Args = append(out.Args, v13)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "env":
+ if in.IsNull() {
+ in.Skip()
+ out.Env = nil
+ } else {
+ in.Delim('[')
+ if out.Env == nil {
+ if !in.IsDelim(']') {
+ out.Env = make([]string, 0, 4)
+ } else {
+ out.Env = []string{}
+ }
+ } else {
+ out.Env = (out.Env)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v14 string
+ v14 = string(in.String())
+ out.Env = append(out.Env, v14)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "timeout":
+ if in.IsNull() {
+ in.Skip()
+ out.Timeout = nil
+ } else {
+ if out.Timeout == nil {
+ out.Timeout = new(int)
+ }
+ *out.Timeout = int(in.Int())
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(out *jwriter.Writer, in specs_go.Hook) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"path\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Path))
+ }
+ if len(in.Args) != 0 {
+ const prefix string = ",\"args\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v15, v16 := range in.Args {
+ if v15 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v16))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Env) != 0 {
+ const prefix string = ",\"env\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v17, v18 := range in.Env {
+ if v17 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v18))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Timeout != nil {
+ const prefix string = ",\"timeout\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(*in.Timeout))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent(in *jlexer.Lexer, out *current.Result) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "cniVersion":
+ out.CNIVersion = string(in.String())
+ case "interfaces":
+ if in.IsNull() {
+ in.Skip()
+ out.Interfaces = nil
+ } else {
+ in.Delim('[')
+ if out.Interfaces == nil {
+ if !in.IsDelim(']') {
+ out.Interfaces = make([]*current.Interface, 0, 8)
+ } else {
+ out.Interfaces = []*current.Interface{}
+ }
+ } else {
+ out.Interfaces = (out.Interfaces)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v19 *current.Interface
+ if in.IsNull() {
+ in.Skip()
+ v19 = nil
+ } else {
+ if v19 == nil {
+ v19 = new(current.Interface)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent1(in, &*v19)
+ }
+ out.Interfaces = append(out.Interfaces, v19)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "ips":
+ if in.IsNull() {
+ in.Skip()
+ out.IPs = nil
+ } else {
+ in.Delim('[')
+ if out.IPs == nil {
+ if !in.IsDelim(']') {
+ out.IPs = make([]*current.IPConfig, 0, 8)
+ } else {
+ out.IPs = []*current.IPConfig{}
+ }
+ } else {
+ out.IPs = (out.IPs)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v20 *current.IPConfig
+ if in.IsNull() {
+ in.Skip()
+ v20 = nil
+ } else {
+ if v20 == nil {
+ v20 = new(current.IPConfig)
+ }
+ if data := in.Raw(); in.Ok() {
+ in.AddError((*v20).UnmarshalJSON(data))
+ }
+ }
+ out.IPs = append(out.IPs, v20)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "routes":
+ if in.IsNull() {
+ in.Skip()
+ out.Routes = nil
+ } else {
+ in.Delim('[')
+ if out.Routes == nil {
+ if !in.IsDelim(']') {
+ out.Routes = make([]*types.Route, 0, 8)
+ } else {
+ out.Routes = []*types.Route{}
+ }
+ } else {
+ out.Routes = (out.Routes)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v21 *types.Route
+ if in.IsNull() {
+ in.Skip()
+ v21 = nil
+ } else {
+ if v21 == nil {
+ v21 = new(types.Route)
+ }
+ if data := in.Raw(); in.Ok() {
+ in.AddError((*v21).UnmarshalJSON(data))
+ }
+ }
+ out.Routes = append(out.Routes, v21)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "dns":
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypes(in, &out.DNS)
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent(out *jwriter.Writer, in current.Result) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.CNIVersion != "" {
+ const prefix string = ",\"cniVersion\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CNIVersion))
+ }
+ if len(in.Interfaces) != 0 {
+ const prefix string = ",\"interfaces\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v22, v23 := range in.Interfaces {
+ if v22 > 0 {
+ out.RawByte(',')
+ }
+ if v23 == nil {
+ out.RawString("null")
+ } else {
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent1(out, *v23)
+ }
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.IPs) != 0 {
+ const prefix string = ",\"ips\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v24, v25 := range in.IPs {
+ if v24 > 0 {
+ out.RawByte(',')
+ }
+ if v25 == nil {
+ out.RawString("null")
+ } else {
+ out.Raw((*v25).MarshalJSON())
+ }
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Routes) != 0 {
+ const prefix string = ",\"routes\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v26, v27 := range in.Routes {
+ if v26 > 0 {
+ out.RawByte(',')
+ }
+ if v27 == nil {
+ out.RawString("null")
+ } else {
+ out.Raw((*v27).MarshalJSON())
+ }
+ }
+ out.RawByte(']')
+ }
+ }
+ if true {
+ const prefix string = ",\"dns\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypes(out, in.DNS)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypes(in *jlexer.Lexer, out *types.DNS) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "nameservers":
+ if in.IsNull() {
+ in.Skip()
+ out.Nameservers = nil
+ } else {
+ in.Delim('[')
+ if out.Nameservers == nil {
+ if !in.IsDelim(']') {
+ out.Nameservers = make([]string, 0, 4)
+ } else {
+ out.Nameservers = []string{}
+ }
+ } else {
+ out.Nameservers = (out.Nameservers)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v28 string
+ v28 = string(in.String())
+ out.Nameservers = append(out.Nameservers, v28)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "domain":
+ out.Domain = string(in.String())
+ case "search":
+ if in.IsNull() {
+ in.Skip()
+ out.Search = nil
+ } else {
+ in.Delim('[')
+ if out.Search == nil {
+ if !in.IsDelim(']') {
+ out.Search = make([]string, 0, 4)
+ } else {
+ out.Search = []string{}
+ }
+ } else {
+ out.Search = (out.Search)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v29 string
+ v29 = string(in.String())
+ out.Search = append(out.Search, v29)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "options":
+ if in.IsNull() {
+ in.Skip()
+ out.Options = nil
+ } else {
+ in.Delim('[')
+ if out.Options == nil {
+ if !in.IsDelim(']') {
+ out.Options = make([]string, 0, 4)
+ } else {
+ out.Options = []string{}
+ }
+ } else {
+ out.Options = (out.Options)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v30 string
+ v30 = string(in.String())
+ out.Options = append(out.Options, v30)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypes(out *jwriter.Writer, in types.DNS) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.Nameservers) != 0 {
+ const prefix string = ",\"nameservers\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v31, v32 := range in.Nameservers {
+ if v31 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v32))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Domain != "" {
+ const prefix string = ",\"domain\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Domain))
+ }
+ if len(in.Search) != 0 {
+ const prefix string = ",\"search\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v33, v34 := range in.Search {
+ if v33 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v34))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Options) != 0 {
+ const prefix string = ",\"options\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v35, v36 := range in.Options {
+ if v35 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v36))
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent1(in *jlexer.Lexer, out *current.Interface) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "name":
+ out.Name = string(in.String())
+ case "mac":
+ out.Mac = string(in.String())
+ case "sandbox":
+ out.Sandbox = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainernetworkingCniPkgTypesCurrent1(out *jwriter.Writer, in current.Interface) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"name\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Name))
+ }
+ if in.Mac != "" {
+ const prefix string = ",\"mac\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Mac))
+ }
+ if in.Sandbox != "" {
+ const prefix string = ",\"sandbox\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Sandbox))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodLibpod1(in *jlexer.Lexer, out *ExecSession) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "id":
+ out.ID = string(in.String())
+ case "command":
+ if in.IsNull() {
+ in.Skip()
+ out.Command = nil
+ } else {
+ in.Delim('[')
+ if out.Command == nil {
+ if !in.IsDelim(']') {
+ out.Command = make([]string, 0, 4)
+ } else {
+ out.Command = []string{}
+ }
+ } else {
+ out.Command = (out.Command)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v37 string
+ v37 = string(in.String())
+ out.Command = append(out.Command, v37)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "pid":
+ out.PID = int(in.Int())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodLibpod1(out *jwriter.Writer, in ExecSession) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"id\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ID))
+ }
+ {
+ const prefix string = ",\"command\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Command == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v38, v39 := range in.Command {
+ if v38 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v39))
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"pid\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(in.PID))
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v ExecSession) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjson1dbef17bEncodeGithubComContainersLibpodLibpod1(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v ExecSession) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjson1dbef17bEncodeGithubComContainersLibpodLibpod1(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *ExecSession) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjson1dbef17bDecodeGithubComContainersLibpodLibpod1(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *ExecSession) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjson1dbef17bDecodeGithubComContainersLibpodLibpod1(l, v)
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodLibpod2(in *jlexer.Lexer, out *ContainerConfig) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "spec":
+ if in.IsNull() {
+ in.Skip()
+ out.Spec = nil
+ } else {
+ if out.Spec == nil {
+ out.Spec = new(specs_go.Spec)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo1(in, &*out.Spec)
+ }
+ case "id":
+ out.ID = string(in.String())
+ case "name":
+ out.Name = string(in.String())
+ case "pod":
+ out.Pod = string(in.String())
+ case "namespace":
+ out.Namespace = string(in.String())
+ case "idMappingsOptions":
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainersStorage(in, &out.IDMappings)
+ case "rootfsImageID":
+ out.RootfsImageID = string(in.String())
+ case "rootfsImageName":
+ out.RootfsImageName = string(in.String())
+ case "rootfs":
+ out.Rootfs = string(in.String())
+ case "imageVolumes":
+ out.ImageVolumes = bool(in.Bool())
+ case "ShmDir":
+ out.ShmDir = string(in.String())
+ case "shmSize":
+ out.ShmSize = int64(in.Int64())
+ case "staticDir":
+ out.StaticDir = string(in.String())
+ case "mounts":
+ if in.IsNull() {
+ in.Skip()
+ out.Mounts = nil
+ } else {
+ in.Delim('[')
+ if out.Mounts == nil {
+ if !in.IsDelim(']') {
+ out.Mounts = make([]string, 0, 4)
+ } else {
+ out.Mounts = []string{}
+ }
+ } else {
+ out.Mounts = (out.Mounts)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v40 string
+ v40 = string(in.String())
+ out.Mounts = append(out.Mounts, v40)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "privileged":
+ out.Privileged = bool(in.Bool())
+ case "ProcessLabel":
+ out.ProcessLabel = string(in.String())
+ case "MountLabel":
+ out.MountLabel = string(in.String())
+ case "user":
+ out.User = string(in.String())
+ case "groups":
+ if in.IsNull() {
+ in.Skip()
+ out.Groups = nil
+ } else {
+ in.Delim('[')
+ if out.Groups == nil {
+ if !in.IsDelim(']') {
+ out.Groups = make([]string, 0, 4)
+ } else {
+ out.Groups = []string{}
+ }
+ } else {
+ out.Groups = (out.Groups)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v41 string
+ v41 = string(in.String())
+ out.Groups = append(out.Groups, v41)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "ipcNsCtr":
+ out.IPCNsCtr = string(in.String())
+ case "mountNsCtr":
+ out.MountNsCtr = string(in.String())
+ case "netNsCtr":
+ out.NetNsCtr = string(in.String())
+ case "pidNsCtr":
+ out.PIDNsCtr = string(in.String())
+ case "userNsCtr":
+ out.UserNsCtr = string(in.String())
+ case "utsNsCtr":
+ out.UTSNsCtr = string(in.String())
+ case "cgroupNsCtr":
+ out.CgroupNsCtr = string(in.String())
+ case "Dependencies":
+ if in.IsNull() {
+ in.Skip()
+ out.Dependencies = nil
+ } else {
+ in.Delim('[')
+ if out.Dependencies == nil {
+ if !in.IsDelim(']') {
+ out.Dependencies = make([]string, 0, 4)
+ } else {
+ out.Dependencies = []string{}
+ }
+ } else {
+ out.Dependencies = (out.Dependencies)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v42 string
+ v42 = string(in.String())
+ out.Dependencies = append(out.Dependencies, v42)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "createNetNS":
+ out.CreateNetNS = bool(in.Bool())
+ case "portMappings":
+ if in.IsNull() {
+ in.Skip()
+ out.PortMappings = nil
+ } else {
+ in.Delim('[')
+ if out.PortMappings == nil {
+ if !in.IsDelim(']') {
+ out.PortMappings = make([]ocicni.PortMapping, 0, 1)
+ } else {
+ out.PortMappings = []ocicni.PortMapping{}
+ }
+ } else {
+ out.PortMappings = (out.PortMappings)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v43 ocicni.PortMapping
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComCriOOcicniPkgOcicni(in, &v43)
+ out.PortMappings = append(out.PortMappings, v43)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "dnsServer":
+ if in.IsNull() {
+ in.Skip()
+ out.DNSServer = nil
+ } else {
+ in.Delim('[')
+ if out.DNSServer == nil {
+ if !in.IsDelim(']') {
+ out.DNSServer = make([]net.IP, 0, 2)
+ } else {
+ out.DNSServer = []net.IP{}
+ }
+ } else {
+ out.DNSServer = (out.DNSServer)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v44 net.IP
+ if data := in.UnsafeBytes(); in.Ok() {
+ in.AddError((v44).UnmarshalText(data))
+ }
+ out.DNSServer = append(out.DNSServer, v44)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "dnsSearch":
+ if in.IsNull() {
+ in.Skip()
+ out.DNSSearch = nil
+ } else {
+ in.Delim('[')
+ if out.DNSSearch == nil {
+ if !in.IsDelim(']') {
+ out.DNSSearch = make([]string, 0, 4)
+ } else {
+ out.DNSSearch = []string{}
+ }
+ } else {
+ out.DNSSearch = (out.DNSSearch)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v45 string
+ v45 = string(in.String())
+ out.DNSSearch = append(out.DNSSearch, v45)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "dnsOption":
+ if in.IsNull() {
+ in.Skip()
+ out.DNSOption = nil
+ } else {
+ in.Delim('[')
+ if out.DNSOption == nil {
+ if !in.IsDelim(']') {
+ out.DNSOption = make([]string, 0, 4)
+ } else {
+ out.DNSOption = []string{}
+ }
+ } else {
+ out.DNSOption = (out.DNSOption)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v46 string
+ v46 = string(in.String())
+ out.DNSOption = append(out.DNSOption, v46)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "hostsAdd":
+ if in.IsNull() {
+ in.Skip()
+ out.HostAdd = nil
+ } else {
+ in.Delim('[')
+ if out.HostAdd == nil {
+ if !in.IsDelim(']') {
+ out.HostAdd = make([]string, 0, 4)
+ } else {
+ out.HostAdd = []string{}
+ }
+ } else {
+ out.HostAdd = (out.HostAdd)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v47 string
+ v47 = string(in.String())
+ out.HostAdd = append(out.HostAdd, v47)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "networks":
+ if in.IsNull() {
+ in.Skip()
+ out.Networks = nil
+ } else {
+ in.Delim('[')
+ if out.Networks == nil {
+ if !in.IsDelim(']') {
+ out.Networks = make([]string, 0, 4)
+ } else {
+ out.Networks = []string{}
+ }
+ } else {
+ out.Networks = (out.Networks)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v48 string
+ v48 = string(in.String())
+ out.Networks = append(out.Networks, v48)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "userVolumes":
+ if in.IsNull() {
+ in.Skip()
+ out.UserVolumes = nil
+ } else {
+ in.Delim('[')
+ if out.UserVolumes == nil {
+ if !in.IsDelim(']') {
+ out.UserVolumes = make([]string, 0, 4)
+ } else {
+ out.UserVolumes = []string{}
+ }
+ } else {
+ out.UserVolumes = (out.UserVolumes)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v49 string
+ v49 = string(in.String())
+ out.UserVolumes = append(out.UserVolumes, v49)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "entrypoint":
+ if in.IsNull() {
+ in.Skip()
+ out.Entrypoint = nil
+ } else {
+ in.Delim('[')
+ if out.Entrypoint == nil {
+ if !in.IsDelim(']') {
+ out.Entrypoint = make([]string, 0, 4)
+ } else {
+ out.Entrypoint = []string{}
+ }
+ } else {
+ out.Entrypoint = (out.Entrypoint)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v50 string
+ v50 = string(in.String())
+ out.Entrypoint = append(out.Entrypoint, v50)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "command":
+ if in.IsNull() {
+ in.Skip()
+ out.Command = nil
+ } else {
+ in.Delim('[')
+ if out.Command == nil {
+ if !in.IsDelim(']') {
+ out.Command = make([]string, 0, 4)
+ } else {
+ out.Command = []string{}
+ }
+ } else {
+ out.Command = (out.Command)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v51 string
+ v51 = string(in.String())
+ out.Command = append(out.Command, v51)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "stdin":
+ out.Stdin = bool(in.Bool())
+ case "labels":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.Labels = make(map[string]string)
+ } else {
+ out.Labels = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v52 string
+ v52 = string(in.String())
+ (out.Labels)[key] = v52
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ case "stopSignal":
+ out.StopSignal = uint(in.Uint())
+ case "stopTimeout":
+ out.StopTimeout = uint(in.Uint())
+ case "createdTime":
+ if data := in.Raw(); in.Ok() {
+ in.AddError((out.CreatedTime).UnmarshalJSON(data))
+ }
+ case "cgroupParent":
+ out.CgroupParent = string(in.String())
+ case "logPath":
+ out.LogPath = string(in.String())
+ case "conmonPidFile":
+ out.ConmonPidFile = string(in.String())
+ case "postConfigureNetNS":
+ out.PostConfigureNetNS = bool(in.Bool())
+ case "exitCommand":
+ if in.IsNull() {
+ in.Skip()
+ out.ExitCommand = nil
+ } else {
+ in.Delim('[')
+ if out.ExitCommand == nil {
+ if !in.IsDelim(']') {
+ out.ExitCommand = make([]string, 0, 4)
+ } else {
+ out.ExitCommand = []string{}
+ }
+ } else {
+ out.ExitCommand = (out.ExitCommand)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v53 string
+ v53 = string(in.String())
+ out.ExitCommand = append(out.ExitCommand, v53)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "LocalVolumes":
+ if in.IsNull() {
+ in.Skip()
+ out.LocalVolumes = nil
+ } else {
+ in.Delim('[')
+ if out.LocalVolumes == nil {
+ if !in.IsDelim(']') {
+ out.LocalVolumes = make([]string, 0, 4)
+ } else {
+ out.LocalVolumes = []string{}
+ }
+ } else {
+ out.LocalVolumes = (out.LocalVolumes)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v54 string
+ v54 = string(in.String())
+ out.LocalVolumes = append(out.LocalVolumes, v54)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodLibpod2(out *jwriter.Writer, in ContainerConfig) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"spec\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Spec == nil {
+ out.RawString("null")
+ } else {
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo1(out, *in.Spec)
+ }
+ }
+ {
+ const prefix string = ",\"id\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ID))
+ }
+ {
+ const prefix string = ",\"name\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Name))
+ }
+ if in.Pod != "" {
+ const prefix string = ",\"pod\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Pod))
+ }
+ if in.Namespace != "" {
+ const prefix string = ",\"namespace\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Namespace))
+ }
+ if true {
+ const prefix string = ",\"idMappingsOptions\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainersStorage(out, in.IDMappings)
+ }
+ if in.RootfsImageID != "" {
+ const prefix string = ",\"rootfsImageID\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.RootfsImageID))
+ }
+ if in.RootfsImageName != "" {
+ const prefix string = ",\"rootfsImageName\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.RootfsImageName))
+ }
+ if in.Rootfs != "" {
+ const prefix string = ",\"rootfs\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Rootfs))
+ }
+ {
+ const prefix string = ",\"imageVolumes\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.ImageVolumes))
+ }
+ if in.ShmDir != "" {
+ const prefix string = ",\"ShmDir\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ShmDir))
+ }
+ {
+ const prefix string = ",\"shmSize\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.ShmSize))
+ }
+ {
+ const prefix string = ",\"staticDir\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.StaticDir))
+ }
+ if len(in.Mounts) != 0 {
+ const prefix string = ",\"mounts\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v55, v56 := range in.Mounts {
+ if v55 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v56))
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"privileged\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Privileged))
+ }
+ if in.ProcessLabel != "" {
+ const prefix string = ",\"ProcessLabel\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ProcessLabel))
+ }
+ if in.MountLabel != "" {
+ const prefix string = ",\"MountLabel\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.MountLabel))
+ }
+ if in.User != "" {
+ const prefix string = ",\"user\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.User))
+ }
+ if len(in.Groups) != 0 {
+ const prefix string = ",\"groups\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v57, v58 := range in.Groups {
+ if v57 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v58))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.IPCNsCtr != "" {
+ const prefix string = ",\"ipcNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.IPCNsCtr))
+ }
+ if in.MountNsCtr != "" {
+ const prefix string = ",\"mountNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.MountNsCtr))
+ }
+ if in.NetNsCtr != "" {
+ const prefix string = ",\"netNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.NetNsCtr))
+ }
+ if in.PIDNsCtr != "" {
+ const prefix string = ",\"pidNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.PIDNsCtr))
+ }
+ if in.UserNsCtr != "" {
+ const prefix string = ",\"userNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.UserNsCtr))
+ }
+ if in.UTSNsCtr != "" {
+ const prefix string = ",\"utsNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.UTSNsCtr))
+ }
+ if in.CgroupNsCtr != "" {
+ const prefix string = ",\"cgroupNsCtr\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CgroupNsCtr))
+ }
+ {
+ const prefix string = ",\"Dependencies\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Dependencies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v59, v60 := range in.Dependencies {
+ if v59 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v60))
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"createNetNS\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.CreateNetNS))
+ }
+ if len(in.PortMappings) != 0 {
+ const prefix string = ",\"portMappings\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v61, v62 := range in.PortMappings {
+ if v61 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComCriOOcicniPkgOcicni(out, v62)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.DNSServer) != 0 {
+ const prefix string = ",\"dnsServer\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v63, v64 := range in.DNSServer {
+ if v63 > 0 {
+ out.RawByte(',')
+ }
+ out.RawText((v64).MarshalText())
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.DNSSearch) != 0 {
+ const prefix string = ",\"dnsSearch\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v65, v66 := range in.DNSSearch {
+ if v65 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v66))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.DNSOption) != 0 {
+ const prefix string = ",\"dnsOption\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v67, v68 := range in.DNSOption {
+ if v67 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v68))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.HostAdd) != 0 {
+ const prefix string = ",\"hostsAdd\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v69, v70 := range in.HostAdd {
+ if v69 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v70))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Networks) != 0 {
+ const prefix string = ",\"networks\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v71, v72 := range in.Networks {
+ if v71 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v72))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.UserVolumes) != 0 {
+ const prefix string = ",\"userVolumes\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v73, v74 := range in.UserVolumes {
+ if v73 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v74))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Entrypoint) != 0 {
+ const prefix string = ",\"entrypoint\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v75, v76 := range in.Entrypoint {
+ if v75 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v76))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Command) != 0 {
+ const prefix string = ",\"command\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v77, v78 := range in.Command {
+ if v77 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v78))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Stdin {
+ const prefix string = ",\"stdin\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Stdin))
+ }
+ if len(in.Labels) != 0 {
+ const prefix string = ",\"labels\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('{')
+ v79First := true
+ for v79Name, v79Value := range in.Labels {
+ if v79First {
+ v79First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v79Name))
+ out.RawByte(':')
+ out.String(string(v79Value))
+ }
+ out.RawByte('}')
+ }
+ }
+ if in.StopSignal != 0 {
+ const prefix string = ",\"stopSignal\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint(uint(in.StopSignal))
+ }
+ if in.StopTimeout != 0 {
+ const prefix string = ",\"stopTimeout\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint(uint(in.StopTimeout))
+ }
+ {
+ const prefix string = ",\"createdTime\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Raw((in.CreatedTime).MarshalJSON())
+ }
+ {
+ const prefix string = ",\"cgroupParent\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CgroupParent))
+ }
+ {
+ const prefix string = ",\"logPath\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.LogPath))
+ }
+ if in.ConmonPidFile != "" {
+ const prefix string = ",\"conmonPidFile\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ConmonPidFile))
+ }
+ {
+ const prefix string = ",\"postConfigureNetNS\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.PostConfigureNetNS))
+ }
+ if len(in.ExitCommand) != 0 {
+ const prefix string = ",\"exitCommand\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v80, v81 := range in.ExitCommand {
+ if v80 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v81))
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"LocalVolumes\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.LocalVolumes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v82, v83 := range in.LocalVolumes {
+ if v82 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v83))
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v ContainerConfig) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjson1dbef17bEncodeGithubComContainersLibpodLibpod2(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v ContainerConfig) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjson1dbef17bEncodeGithubComContainersLibpodLibpod2(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *ContainerConfig) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjson1dbef17bDecodeGithubComContainersLibpodLibpod2(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *ContainerConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjson1dbef17bDecodeGithubComContainersLibpodLibpod2(l, v)
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComCriOOcicniPkgOcicni(in *jlexer.Lexer, out *ocicni.PortMapping) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "hostPort":
+ out.HostPort = int32(in.Int32())
+ case "containerPort":
+ out.ContainerPort = int32(in.Int32())
+ case "protocol":
+ out.Protocol = string(in.String())
+ case "hostIP":
+ out.HostIP = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComCriOOcicniPkgOcicni(out *jwriter.Writer, in ocicni.PortMapping) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"hostPort\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int32(int32(in.HostPort))
+ }
+ {
+ const prefix string = ",\"containerPort\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int32(int32(in.ContainerPort))
+ }
+ {
+ const prefix string = ",\"protocol\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Protocol))
+ }
+ {
+ const prefix string = ",\"hostIP\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.HostIP))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainersStorage(in *jlexer.Lexer, out *storage.IDMappingOptions) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "HostUIDMapping":
+ out.HostUIDMapping = bool(in.Bool())
+ case "HostGIDMapping":
+ out.HostGIDMapping = bool(in.Bool())
+ case "UIDMap":
+ if in.IsNull() {
+ in.Skip()
+ out.UIDMap = nil
+ } else {
+ in.Delim('[')
+ if out.UIDMap == nil {
+ if !in.IsDelim(']') {
+ out.UIDMap = make([]idtools.IDMap, 0, 2)
+ } else {
+ out.UIDMap = []idtools.IDMap{}
+ }
+ } else {
+ out.UIDMap = (out.UIDMap)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v84 idtools.IDMap
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainersStoragePkgIdtools(in, &v84)
+ out.UIDMap = append(out.UIDMap, v84)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "GIDMap":
+ if in.IsNull() {
+ in.Skip()
+ out.GIDMap = nil
+ } else {
+ in.Delim('[')
+ if out.GIDMap == nil {
+ if !in.IsDelim(']') {
+ out.GIDMap = make([]idtools.IDMap, 0, 2)
+ } else {
+ out.GIDMap = []idtools.IDMap{}
+ }
+ } else {
+ out.GIDMap = (out.GIDMap)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v85 idtools.IDMap
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainersStoragePkgIdtools(in, &v85)
+ out.GIDMap = append(out.GIDMap, v85)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainersStorage(out *jwriter.Writer, in storage.IDMappingOptions) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"HostUIDMapping\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.HostUIDMapping))
+ }
+ {
+ const prefix string = ",\"HostGIDMapping\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.HostGIDMapping))
+ }
+ {
+ const prefix string = ",\"UIDMap\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.UIDMap == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v86, v87 := range in.UIDMap {
+ if v86 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainersStoragePkgIdtools(out, v87)
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"GIDMap\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.GIDMap == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v88, v89 := range in.GIDMap {
+ if v88 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainersStoragePkgIdtools(out, v89)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComContainersStoragePkgIdtools(in *jlexer.Lexer, out *idtools.IDMap) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "container_id":
+ out.ContainerID = int(in.Int())
+ case "host_id":
+ out.HostID = int(in.Int())
+ case "size":
+ out.Size = int(in.Int())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComContainersStoragePkgIdtools(out *jwriter.Writer, in idtools.IDMap) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"container_id\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(in.ContainerID))
+ }
+ {
+ const prefix string = ",\"host_id\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(in.HostID))
+ }
+ {
+ const prefix string = ",\"size\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(in.Size))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo1(in *jlexer.Lexer, out *specs_go.Spec) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "ociVersion":
+ out.Version = string(in.String())
+ case "process":
+ if in.IsNull() {
+ in.Skip()
+ out.Process = nil
+ } else {
+ if out.Process == nil {
+ out.Process = new(specs_go.Process)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo2(in, &*out.Process)
+ }
+ case "root":
+ if in.IsNull() {
+ in.Skip()
+ out.Root = nil
+ } else {
+ if out.Root == nil {
+ out.Root = new(specs_go.Root)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo3(in, &*out.Root)
+ }
+ case "hostname":
+ out.Hostname = string(in.String())
+ case "mounts":
+ if in.IsNull() {
+ in.Skip()
+ out.Mounts = nil
+ } else {
+ in.Delim('[')
+ if out.Mounts == nil {
+ if !in.IsDelim(']') {
+ out.Mounts = make([]specs_go.Mount, 0, 1)
+ } else {
+ out.Mounts = []specs_go.Mount{}
+ }
+ } else {
+ out.Mounts = (out.Mounts)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v90 specs_go.Mount
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo4(in, &v90)
+ out.Mounts = append(out.Mounts, v90)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "hooks":
+ if in.IsNull() {
+ in.Skip()
+ out.Hooks = nil
+ } else {
+ if out.Hooks == nil {
+ out.Hooks = new(specs_go.Hooks)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo5(in, &*out.Hooks)
+ }
+ case "annotations":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.Annotations = make(map[string]string)
+ } else {
+ out.Annotations = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v91 string
+ v91 = string(in.String())
+ (out.Annotations)[key] = v91
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ case "linux":
+ if in.IsNull() {
+ in.Skip()
+ out.Linux = nil
+ } else {
+ if out.Linux == nil {
+ out.Linux = new(specs_go.Linux)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo6(in, &*out.Linux)
+ }
+ case "solaris":
+ if in.IsNull() {
+ in.Skip()
+ out.Solaris = nil
+ } else {
+ if out.Solaris == nil {
+ out.Solaris = new(specs_go.Solaris)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo7(in, &*out.Solaris)
+ }
+ case "windows":
+ if in.IsNull() {
+ in.Skip()
+ out.Windows = nil
+ } else {
+ if out.Windows == nil {
+ out.Windows = new(specs_go.Windows)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo8(in, &*out.Windows)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo1(out *jwriter.Writer, in specs_go.Spec) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"ociVersion\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Version))
+ }
+ if in.Process != nil {
+ const prefix string = ",\"process\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo2(out, *in.Process)
+ }
+ if in.Root != nil {
+ const prefix string = ",\"root\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo3(out, *in.Root)
+ }
+ if in.Hostname != "" {
+ const prefix string = ",\"hostname\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Hostname))
+ }
+ if len(in.Mounts) != 0 {
+ const prefix string = ",\"mounts\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v92, v93 := range in.Mounts {
+ if v92 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo4(out, v93)
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Hooks != nil {
+ const prefix string = ",\"hooks\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo5(out, *in.Hooks)
+ }
+ if len(in.Annotations) != 0 {
+ const prefix string = ",\"annotations\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('{')
+ v94First := true
+ for v94Name, v94Value := range in.Annotations {
+ if v94First {
+ v94First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v94Name))
+ out.RawByte(':')
+ out.String(string(v94Value))
+ }
+ out.RawByte('}')
+ }
+ }
+ if in.Linux != nil {
+ const prefix string = ",\"linux\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo6(out, *in.Linux)
+ }
+ if in.Solaris != nil {
+ const prefix string = ",\"solaris\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo7(out, *in.Solaris)
+ }
+ if in.Windows != nil {
+ const prefix string = ",\"windows\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo8(out, *in.Windows)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo8(in *jlexer.Lexer, out *specs_go.Windows) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "layerFolders":
+ if in.IsNull() {
+ in.Skip()
+ out.LayerFolders = nil
+ } else {
+ in.Delim('[')
+ if out.LayerFolders == nil {
+ if !in.IsDelim(']') {
+ out.LayerFolders = make([]string, 0, 4)
+ } else {
+ out.LayerFolders = []string{}
+ }
+ } else {
+ out.LayerFolders = (out.LayerFolders)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v95 string
+ v95 = string(in.String())
+ out.LayerFolders = append(out.LayerFolders, v95)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "resources":
+ if in.IsNull() {
+ in.Skip()
+ out.Resources = nil
+ } else {
+ if out.Resources == nil {
+ out.Resources = new(specs_go.WindowsResources)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo9(in, &*out.Resources)
+ }
+ case "credentialSpec":
+ if m, ok := out.CredentialSpec.(easyjson.Unmarshaler); ok {
+ m.UnmarshalEasyJSON(in)
+ } else if m, ok := out.CredentialSpec.(json.Unmarshaler); ok {
+ _ = m.UnmarshalJSON(in.Raw())
+ } else {
+ out.CredentialSpec = in.Interface()
+ }
+ case "servicing":
+ out.Servicing = bool(in.Bool())
+ case "ignoreFlushesDuringBoot":
+ out.IgnoreFlushesDuringBoot = bool(in.Bool())
+ case "hyperv":
+ if in.IsNull() {
+ in.Skip()
+ out.HyperV = nil
+ } else {
+ if out.HyperV == nil {
+ out.HyperV = new(specs_go.WindowsHyperV)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo10(in, &*out.HyperV)
+ }
+ case "network":
+ if in.IsNull() {
+ in.Skip()
+ out.Network = nil
+ } else {
+ if out.Network == nil {
+ out.Network = new(specs_go.WindowsNetwork)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo11(in, &*out.Network)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo8(out *jwriter.Writer, in specs_go.Windows) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"layerFolders\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.LayerFolders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v96, v97 := range in.LayerFolders {
+ if v96 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v97))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Resources != nil {
+ const prefix string = ",\"resources\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo9(out, *in.Resources)
+ }
+ if in.CredentialSpec != nil {
+ const prefix string = ",\"credentialSpec\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if m, ok := in.CredentialSpec.(easyjson.Marshaler); ok {
+ m.MarshalEasyJSON(out)
+ } else if m, ok := in.CredentialSpec.(json.Marshaler); ok {
+ out.Raw(m.MarshalJSON())
+ } else {
+ out.Raw(json.Marshal(in.CredentialSpec))
+ }
+ }
+ if in.Servicing {
+ const prefix string = ",\"servicing\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Servicing))
+ }
+ if in.IgnoreFlushesDuringBoot {
+ const prefix string = ",\"ignoreFlushesDuringBoot\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.IgnoreFlushesDuringBoot))
+ }
+ if in.HyperV != nil {
+ const prefix string = ",\"hyperv\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo10(out, *in.HyperV)
+ }
+ if in.Network != nil {
+ const prefix string = ",\"network\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo11(out, *in.Network)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo11(in *jlexer.Lexer, out *specs_go.WindowsNetwork) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "endpointList":
+ if in.IsNull() {
+ in.Skip()
+ out.EndpointList = nil
+ } else {
+ in.Delim('[')
+ if out.EndpointList == nil {
+ if !in.IsDelim(']') {
+ out.EndpointList = make([]string, 0, 4)
+ } else {
+ out.EndpointList = []string{}
+ }
+ } else {
+ out.EndpointList = (out.EndpointList)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v98 string
+ v98 = string(in.String())
+ out.EndpointList = append(out.EndpointList, v98)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "allowUnqualifiedDNSQuery":
+ out.AllowUnqualifiedDNSQuery = bool(in.Bool())
+ case "DNSSearchList":
+ if in.IsNull() {
+ in.Skip()
+ out.DNSSearchList = nil
+ } else {
+ in.Delim('[')
+ if out.DNSSearchList == nil {
+ if !in.IsDelim(']') {
+ out.DNSSearchList = make([]string, 0, 4)
+ } else {
+ out.DNSSearchList = []string{}
+ }
+ } else {
+ out.DNSSearchList = (out.DNSSearchList)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v99 string
+ v99 = string(in.String())
+ out.DNSSearchList = append(out.DNSSearchList, v99)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "networkSharedContainerName":
+ out.NetworkSharedContainerName = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo11(out *jwriter.Writer, in specs_go.WindowsNetwork) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.EndpointList) != 0 {
+ const prefix string = ",\"endpointList\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v100, v101 := range in.EndpointList {
+ if v100 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v101))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.AllowUnqualifiedDNSQuery {
+ const prefix string = ",\"allowUnqualifiedDNSQuery\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.AllowUnqualifiedDNSQuery))
+ }
+ if len(in.DNSSearchList) != 0 {
+ const prefix string = ",\"DNSSearchList\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v102, v103 := range in.DNSSearchList {
+ if v102 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v103))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.NetworkSharedContainerName != "" {
+ const prefix string = ",\"networkSharedContainerName\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.NetworkSharedContainerName))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo10(in *jlexer.Lexer, out *specs_go.WindowsHyperV) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "utilityVMPath":
+ out.UtilityVMPath = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo10(out *jwriter.Writer, in specs_go.WindowsHyperV) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.UtilityVMPath != "" {
+ const prefix string = ",\"utilityVMPath\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.UtilityVMPath))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo9(in *jlexer.Lexer, out *specs_go.WindowsResources) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "memory":
+ if in.IsNull() {
+ in.Skip()
+ out.Memory = nil
+ } else {
+ if out.Memory == nil {
+ out.Memory = new(specs_go.WindowsMemoryResources)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo12(in, &*out.Memory)
+ }
+ case "cpu":
+ if in.IsNull() {
+ in.Skip()
+ out.CPU = nil
+ } else {
+ if out.CPU == nil {
+ out.CPU = new(specs_go.WindowsCPUResources)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo13(in, &*out.CPU)
+ }
+ case "storage":
+ if in.IsNull() {
+ in.Skip()
+ out.Storage = nil
+ } else {
+ if out.Storage == nil {
+ out.Storage = new(specs_go.WindowsStorageResources)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo14(in, &*out.Storage)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo9(out *jwriter.Writer, in specs_go.WindowsResources) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Memory != nil {
+ const prefix string = ",\"memory\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo12(out, *in.Memory)
+ }
+ if in.CPU != nil {
+ const prefix string = ",\"cpu\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo13(out, *in.CPU)
+ }
+ if in.Storage != nil {
+ const prefix string = ",\"storage\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo14(out, *in.Storage)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo14(in *jlexer.Lexer, out *specs_go.WindowsStorageResources) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "iops":
+ if in.IsNull() {
+ in.Skip()
+ out.Iops = nil
+ } else {
+ if out.Iops == nil {
+ out.Iops = new(uint64)
+ }
+ *out.Iops = uint64(in.Uint64())
+ }
+ case "bps":
+ if in.IsNull() {
+ in.Skip()
+ out.Bps = nil
+ } else {
+ if out.Bps == nil {
+ out.Bps = new(uint64)
+ }
+ *out.Bps = uint64(in.Uint64())
+ }
+ case "sandboxSize":
+ if in.IsNull() {
+ in.Skip()
+ out.SandboxSize = nil
+ } else {
+ if out.SandboxSize == nil {
+ out.SandboxSize = new(uint64)
+ }
+ *out.SandboxSize = uint64(in.Uint64())
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo14(out *jwriter.Writer, in specs_go.WindowsStorageResources) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Iops != nil {
+ const prefix string = ",\"iops\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Iops))
+ }
+ if in.Bps != nil {
+ const prefix string = ",\"bps\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Bps))
+ }
+ if in.SandboxSize != nil {
+ const prefix string = ",\"sandboxSize\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.SandboxSize))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo13(in *jlexer.Lexer, out *specs_go.WindowsCPUResources) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "count":
+ if in.IsNull() {
+ in.Skip()
+ out.Count = nil
+ } else {
+ if out.Count == nil {
+ out.Count = new(uint64)
+ }
+ *out.Count = uint64(in.Uint64())
+ }
+ case "shares":
+ if in.IsNull() {
+ in.Skip()
+ out.Shares = nil
+ } else {
+ if out.Shares == nil {
+ out.Shares = new(uint16)
+ }
+ *out.Shares = uint16(in.Uint16())
+ }
+ case "maximum":
+ if in.IsNull() {
+ in.Skip()
+ out.Maximum = nil
+ } else {
+ if out.Maximum == nil {
+ out.Maximum = new(uint16)
+ }
+ *out.Maximum = uint16(in.Uint16())
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo13(out *jwriter.Writer, in specs_go.WindowsCPUResources) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Count != nil {
+ const prefix string = ",\"count\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Count))
+ }
+ if in.Shares != nil {
+ const prefix string = ",\"shares\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint16(uint16(*in.Shares))
+ }
+ if in.Maximum != nil {
+ const prefix string = ",\"maximum\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint16(uint16(*in.Maximum))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo12(in *jlexer.Lexer, out *specs_go.WindowsMemoryResources) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "limit":
+ if in.IsNull() {
+ in.Skip()
+ out.Limit = nil
+ } else {
+ if out.Limit == nil {
+ out.Limit = new(uint64)
+ }
+ *out.Limit = uint64(in.Uint64())
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo12(out *jwriter.Writer, in specs_go.WindowsMemoryResources) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Limit != nil {
+ const prefix string = ",\"limit\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Limit))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo7(in *jlexer.Lexer, out *specs_go.Solaris) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "milestone":
+ out.Milestone = string(in.String())
+ case "limitpriv":
+ out.LimitPriv = string(in.String())
+ case "maxShmMemory":
+ out.MaxShmMemory = string(in.String())
+ case "anet":
+ if in.IsNull() {
+ in.Skip()
+ out.Anet = nil
+ } else {
+ in.Delim('[')
+ if out.Anet == nil {
+ if !in.IsDelim(']') {
+ out.Anet = make([]specs_go.SolarisAnet, 0, 1)
+ } else {
+ out.Anet = []specs_go.SolarisAnet{}
+ }
+ } else {
+ out.Anet = (out.Anet)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v104 specs_go.SolarisAnet
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo15(in, &v104)
+ out.Anet = append(out.Anet, v104)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "cappedCPU":
+ if in.IsNull() {
+ in.Skip()
+ out.CappedCPU = nil
+ } else {
+ if out.CappedCPU == nil {
+ out.CappedCPU = new(specs_go.SolarisCappedCPU)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo16(in, &*out.CappedCPU)
+ }
+ case "cappedMemory":
+ if in.IsNull() {
+ in.Skip()
+ out.CappedMemory = nil
+ } else {
+ if out.CappedMemory == nil {
+ out.CappedMemory = new(specs_go.SolarisCappedMemory)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo17(in, &*out.CappedMemory)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo7(out *jwriter.Writer, in specs_go.Solaris) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Milestone != "" {
+ const prefix string = ",\"milestone\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Milestone))
+ }
+ if in.LimitPriv != "" {
+ const prefix string = ",\"limitpriv\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.LimitPriv))
+ }
+ if in.MaxShmMemory != "" {
+ const prefix string = ",\"maxShmMemory\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.MaxShmMemory))
+ }
+ if len(in.Anet) != 0 {
+ const prefix string = ",\"anet\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v105, v106 := range in.Anet {
+ if v105 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo15(out, v106)
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.CappedCPU != nil {
+ const prefix string = ",\"cappedCPU\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo16(out, *in.CappedCPU)
+ }
+ if in.CappedMemory != nil {
+ const prefix string = ",\"cappedMemory\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo17(out, *in.CappedMemory)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo17(in *jlexer.Lexer, out *specs_go.SolarisCappedMemory) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "physical":
+ out.Physical = string(in.String())
+ case "swap":
+ out.Swap = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo17(out *jwriter.Writer, in specs_go.SolarisCappedMemory) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Physical != "" {
+ const prefix string = ",\"physical\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Physical))
+ }
+ if in.Swap != "" {
+ const prefix string = ",\"swap\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Swap))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo16(in *jlexer.Lexer, out *specs_go.SolarisCappedCPU) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "ncpus":
+ out.Ncpus = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo16(out *jwriter.Writer, in specs_go.SolarisCappedCPU) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Ncpus != "" {
+ const prefix string = ",\"ncpus\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Ncpus))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo15(in *jlexer.Lexer, out *specs_go.SolarisAnet) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "linkname":
+ out.Linkname = string(in.String())
+ case "lowerLink":
+ out.Lowerlink = string(in.String())
+ case "allowedAddress":
+ out.Allowedaddr = string(in.String())
+ case "configureAllowedAddress":
+ out.Configallowedaddr = string(in.String())
+ case "defrouter":
+ out.Defrouter = string(in.String())
+ case "linkProtection":
+ out.Linkprotection = string(in.String())
+ case "macAddress":
+ out.Macaddress = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo15(out *jwriter.Writer, in specs_go.SolarisAnet) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Linkname != "" {
+ const prefix string = ",\"linkname\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Linkname))
+ }
+ if in.Lowerlink != "" {
+ const prefix string = ",\"lowerLink\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Lowerlink))
+ }
+ if in.Allowedaddr != "" {
+ const prefix string = ",\"allowedAddress\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Allowedaddr))
+ }
+ if in.Configallowedaddr != "" {
+ const prefix string = ",\"configureAllowedAddress\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Configallowedaddr))
+ }
+ if in.Defrouter != "" {
+ const prefix string = ",\"defrouter\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Defrouter))
+ }
+ if in.Linkprotection != "" {
+ const prefix string = ",\"linkProtection\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Linkprotection))
+ }
+ if in.Macaddress != "" {
+ const prefix string = ",\"macAddress\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Macaddress))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo6(in *jlexer.Lexer, out *specs_go.Linux) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "uidMappings":
+ if in.IsNull() {
+ in.Skip()
+ out.UIDMappings = nil
+ } else {
+ in.Delim('[')
+ if out.UIDMappings == nil {
+ if !in.IsDelim(']') {
+ out.UIDMappings = make([]specs_go.LinuxIDMapping, 0, 5)
+ } else {
+ out.UIDMappings = []specs_go.LinuxIDMapping{}
+ }
+ } else {
+ out.UIDMappings = (out.UIDMappings)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v107 specs_go.LinuxIDMapping
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo18(in, &v107)
+ out.UIDMappings = append(out.UIDMappings, v107)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "gidMappings":
+ if in.IsNull() {
+ in.Skip()
+ out.GIDMappings = nil
+ } else {
+ in.Delim('[')
+ if out.GIDMappings == nil {
+ if !in.IsDelim(']') {
+ out.GIDMappings = make([]specs_go.LinuxIDMapping, 0, 5)
+ } else {
+ out.GIDMappings = []specs_go.LinuxIDMapping{}
+ }
+ } else {
+ out.GIDMappings = (out.GIDMappings)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v108 specs_go.LinuxIDMapping
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo18(in, &v108)
+ out.GIDMappings = append(out.GIDMappings, v108)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "sysctl":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.Sysctl = make(map[string]string)
+ } else {
+ out.Sysctl = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v109 string
+ v109 = string(in.String())
+ (out.Sysctl)[key] = v109
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ case "resources":
+ if in.IsNull() {
+ in.Skip()
+ out.Resources = nil
+ } else {
+ if out.Resources == nil {
+ out.Resources = new(specs_go.LinuxResources)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo19(in, &*out.Resources)
+ }
+ case "cgroupsPath":
+ out.CgroupsPath = string(in.String())
+ case "namespaces":
+ if in.IsNull() {
+ in.Skip()
+ out.Namespaces = nil
+ } else {
+ in.Delim('[')
+ if out.Namespaces == nil {
+ if !in.IsDelim(']') {
+ out.Namespaces = make([]specs_go.LinuxNamespace, 0, 2)
+ } else {
+ out.Namespaces = []specs_go.LinuxNamespace{}
+ }
+ } else {
+ out.Namespaces = (out.Namespaces)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v110 specs_go.LinuxNamespace
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo20(in, &v110)
+ out.Namespaces = append(out.Namespaces, v110)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "devices":
+ if in.IsNull() {
+ in.Skip()
+ out.Devices = nil
+ } else {
+ in.Delim('[')
+ if out.Devices == nil {
+ if !in.IsDelim(']') {
+ out.Devices = make([]specs_go.LinuxDevice, 0, 1)
+ } else {
+ out.Devices = []specs_go.LinuxDevice{}
+ }
+ } else {
+ out.Devices = (out.Devices)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v111 specs_go.LinuxDevice
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo21(in, &v111)
+ out.Devices = append(out.Devices, v111)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "seccomp":
+ if in.IsNull() {
+ in.Skip()
+ out.Seccomp = nil
+ } else {
+ if out.Seccomp == nil {
+ out.Seccomp = new(specs_go.LinuxSeccomp)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo22(in, &*out.Seccomp)
+ }
+ case "rootfsPropagation":
+ out.RootfsPropagation = string(in.String())
+ case "maskedPaths":
+ if in.IsNull() {
+ in.Skip()
+ out.MaskedPaths = nil
+ } else {
+ in.Delim('[')
+ if out.MaskedPaths == nil {
+ if !in.IsDelim(']') {
+ out.MaskedPaths = make([]string, 0, 4)
+ } else {
+ out.MaskedPaths = []string{}
+ }
+ } else {
+ out.MaskedPaths = (out.MaskedPaths)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v112 string
+ v112 = string(in.String())
+ out.MaskedPaths = append(out.MaskedPaths, v112)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "readonlyPaths":
+ if in.IsNull() {
+ in.Skip()
+ out.ReadonlyPaths = nil
+ } else {
+ in.Delim('[')
+ if out.ReadonlyPaths == nil {
+ if !in.IsDelim(']') {
+ out.ReadonlyPaths = make([]string, 0, 4)
+ } else {
+ out.ReadonlyPaths = []string{}
+ }
+ } else {
+ out.ReadonlyPaths = (out.ReadonlyPaths)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v113 string
+ v113 = string(in.String())
+ out.ReadonlyPaths = append(out.ReadonlyPaths, v113)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "mountLabel":
+ out.MountLabel = string(in.String())
+ case "intelRdt":
+ if in.IsNull() {
+ in.Skip()
+ out.IntelRdt = nil
+ } else {
+ if out.IntelRdt == nil {
+ out.IntelRdt = new(specs_go.LinuxIntelRdt)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo23(in, &*out.IntelRdt)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo6(out *jwriter.Writer, in specs_go.Linux) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.UIDMappings) != 0 {
+ const prefix string = ",\"uidMappings\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v114, v115 := range in.UIDMappings {
+ if v114 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo18(out, v115)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.GIDMappings) != 0 {
+ const prefix string = ",\"gidMappings\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v116, v117 := range in.GIDMappings {
+ if v116 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo18(out, v117)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Sysctl) != 0 {
+ const prefix string = ",\"sysctl\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('{')
+ v118First := true
+ for v118Name, v118Value := range in.Sysctl {
+ if v118First {
+ v118First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v118Name))
+ out.RawByte(':')
+ out.String(string(v118Value))
+ }
+ out.RawByte('}')
+ }
+ }
+ if in.Resources != nil {
+ const prefix string = ",\"resources\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo19(out, *in.Resources)
+ }
+ if in.CgroupsPath != "" {
+ const prefix string = ",\"cgroupsPath\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CgroupsPath))
+ }
+ if len(in.Namespaces) != 0 {
+ const prefix string = ",\"namespaces\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v119, v120 := range in.Namespaces {
+ if v119 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo20(out, v120)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Devices) != 0 {
+ const prefix string = ",\"devices\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v121, v122 := range in.Devices {
+ if v121 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo21(out, v122)
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Seccomp != nil {
+ const prefix string = ",\"seccomp\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo22(out, *in.Seccomp)
+ }
+ if in.RootfsPropagation != "" {
+ const prefix string = ",\"rootfsPropagation\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.RootfsPropagation))
+ }
+ if len(in.MaskedPaths) != 0 {
+ const prefix string = ",\"maskedPaths\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v123, v124 := range in.MaskedPaths {
+ if v123 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v124))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.ReadonlyPaths) != 0 {
+ const prefix string = ",\"readonlyPaths\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v125, v126 := range in.ReadonlyPaths {
+ if v125 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v126))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.MountLabel != "" {
+ const prefix string = ",\"mountLabel\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.MountLabel))
+ }
+ if in.IntelRdt != nil {
+ const prefix string = ",\"intelRdt\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo23(out, *in.IntelRdt)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo23(in *jlexer.Lexer, out *specs_go.LinuxIntelRdt) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "l3CacheSchema":
+ out.L3CacheSchema = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo23(out *jwriter.Writer, in specs_go.LinuxIntelRdt) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.L3CacheSchema != "" {
+ const prefix string = ",\"l3CacheSchema\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.L3CacheSchema))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo22(in *jlexer.Lexer, out *specs_go.LinuxSeccomp) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "defaultAction":
+ out.DefaultAction = specs_go.LinuxSeccompAction(in.String())
+ case "architectures":
+ if in.IsNull() {
+ in.Skip()
+ out.Architectures = nil
+ } else {
+ in.Delim('[')
+ if out.Architectures == nil {
+ if !in.IsDelim(']') {
+ out.Architectures = make([]specs_go.Arch, 0, 4)
+ } else {
+ out.Architectures = []specs_go.Arch{}
+ }
+ } else {
+ out.Architectures = (out.Architectures)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v127 specs_go.Arch
+ v127 = specs_go.Arch(in.String())
+ out.Architectures = append(out.Architectures, v127)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "syscalls":
+ if in.IsNull() {
+ in.Skip()
+ out.Syscalls = nil
+ } else {
+ in.Delim('[')
+ if out.Syscalls == nil {
+ if !in.IsDelim(']') {
+ out.Syscalls = make([]specs_go.LinuxSyscall, 0, 1)
+ } else {
+ out.Syscalls = []specs_go.LinuxSyscall{}
+ }
+ } else {
+ out.Syscalls = (out.Syscalls)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v128 specs_go.LinuxSyscall
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo24(in, &v128)
+ out.Syscalls = append(out.Syscalls, v128)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo22(out *jwriter.Writer, in specs_go.LinuxSeccomp) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"defaultAction\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.DefaultAction))
+ }
+ if len(in.Architectures) != 0 {
+ const prefix string = ",\"architectures\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v129, v130 := range in.Architectures {
+ if v129 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v130))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Syscalls) != 0 {
+ const prefix string = ",\"syscalls\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v131, v132 := range in.Syscalls {
+ if v131 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo24(out, v132)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo24(in *jlexer.Lexer, out *specs_go.LinuxSyscall) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "names":
+ if in.IsNull() {
+ in.Skip()
+ out.Names = nil
+ } else {
+ in.Delim('[')
+ if out.Names == nil {
+ if !in.IsDelim(']') {
+ out.Names = make([]string, 0, 4)
+ } else {
+ out.Names = []string{}
+ }
+ } else {
+ out.Names = (out.Names)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v133 string
+ v133 = string(in.String())
+ out.Names = append(out.Names, v133)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "action":
+ out.Action = specs_go.LinuxSeccompAction(in.String())
+ case "args":
+ if in.IsNull() {
+ in.Skip()
+ out.Args = nil
+ } else {
+ in.Delim('[')
+ if out.Args == nil {
+ if !in.IsDelim(']') {
+ out.Args = make([]specs_go.LinuxSeccompArg, 0, 1)
+ } else {
+ out.Args = []specs_go.LinuxSeccompArg{}
+ }
+ } else {
+ out.Args = (out.Args)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v134 specs_go.LinuxSeccompArg
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo25(in, &v134)
+ out.Args = append(out.Args, v134)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo24(out *jwriter.Writer, in specs_go.LinuxSyscall) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"names\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Names == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v135, v136 := range in.Names {
+ if v135 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v136))
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"action\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Action))
+ }
+ if len(in.Args) != 0 {
+ const prefix string = ",\"args\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v137, v138 := range in.Args {
+ if v137 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo25(out, v138)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo25(in *jlexer.Lexer, out *specs_go.LinuxSeccompArg) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "index":
+ out.Index = uint(in.Uint())
+ case "value":
+ out.Value = uint64(in.Uint64())
+ case "valueTwo":
+ out.ValueTwo = uint64(in.Uint64())
+ case "op":
+ out.Op = specs_go.LinuxSeccompOperator(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo25(out *jwriter.Writer, in specs_go.LinuxSeccompArg) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"index\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint(uint(in.Index))
+ }
+ {
+ const prefix string = ",\"value\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(in.Value))
+ }
+ if in.ValueTwo != 0 {
+ const prefix string = ",\"valueTwo\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(in.ValueTwo))
+ }
+ {
+ const prefix string = ",\"op\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Op))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo21(in *jlexer.Lexer, out *specs_go.LinuxDevice) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "path":
+ out.Path = string(in.String())
+ case "type":
+ out.Type = string(in.String())
+ case "major":
+ out.Major = int64(in.Int64())
+ case "minor":
+ out.Minor = int64(in.Int64())
+ case "fileMode":
+ if in.IsNull() {
+ in.Skip()
+ out.FileMode = nil
+ } else {
+ if out.FileMode == nil {
+ out.FileMode = new(os.FileMode)
+ }
+ *out.FileMode = os.FileMode(in.Uint32())
+ }
+ case "uid":
+ if in.IsNull() {
+ in.Skip()
+ out.UID = nil
+ } else {
+ if out.UID == nil {
+ out.UID = new(uint32)
+ }
+ *out.UID = uint32(in.Uint32())
+ }
+ case "gid":
+ if in.IsNull() {
+ in.Skip()
+ out.GID = nil
+ } else {
+ if out.GID == nil {
+ out.GID = new(uint32)
+ }
+ *out.GID = uint32(in.Uint32())
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo21(out *jwriter.Writer, in specs_go.LinuxDevice) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"path\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Path))
+ }
+ {
+ const prefix string = ",\"type\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Type))
+ }
+ {
+ const prefix string = ",\"major\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Major))
+ }
+ {
+ const prefix string = ",\"minor\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Minor))
+ }
+ if in.FileMode != nil {
+ const prefix string = ",\"fileMode\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(*in.FileMode))
+ }
+ if in.UID != nil {
+ const prefix string = ",\"uid\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(*in.UID))
+ }
+ if in.GID != nil {
+ const prefix string = ",\"gid\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(*in.GID))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo20(in *jlexer.Lexer, out *specs_go.LinuxNamespace) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "type":
+ out.Type = specs_go.LinuxNamespaceType(in.String())
+ case "path":
+ out.Path = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo20(out *jwriter.Writer, in specs_go.LinuxNamespace) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"type\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Type))
+ }
+ if in.Path != "" {
+ const prefix string = ",\"path\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Path))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo19(in *jlexer.Lexer, out *specs_go.LinuxResources) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "devices":
+ if in.IsNull() {
+ in.Skip()
+ out.Devices = nil
+ } else {
+ in.Delim('[')
+ if out.Devices == nil {
+ if !in.IsDelim(']') {
+ out.Devices = make([]specs_go.LinuxDeviceCgroup, 0, 1)
+ } else {
+ out.Devices = []specs_go.LinuxDeviceCgroup{}
+ }
+ } else {
+ out.Devices = (out.Devices)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v139 specs_go.LinuxDeviceCgroup
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo26(in, &v139)
+ out.Devices = append(out.Devices, v139)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "memory":
+ if in.IsNull() {
+ in.Skip()
+ out.Memory = nil
+ } else {
+ if out.Memory == nil {
+ out.Memory = new(specs_go.LinuxMemory)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo27(in, &*out.Memory)
+ }
+ case "cpu":
+ if in.IsNull() {
+ in.Skip()
+ out.CPU = nil
+ } else {
+ if out.CPU == nil {
+ out.CPU = new(specs_go.LinuxCPU)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo28(in, &*out.CPU)
+ }
+ case "pids":
+ if in.IsNull() {
+ in.Skip()
+ out.Pids = nil
+ } else {
+ if out.Pids == nil {
+ out.Pids = new(specs_go.LinuxPids)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo29(in, &*out.Pids)
+ }
+ case "blockIO":
+ if in.IsNull() {
+ in.Skip()
+ out.BlockIO = nil
+ } else {
+ if out.BlockIO == nil {
+ out.BlockIO = new(specs_go.LinuxBlockIO)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo30(in, &*out.BlockIO)
+ }
+ case "hugepageLimits":
+ if in.IsNull() {
+ in.Skip()
+ out.HugepageLimits = nil
+ } else {
+ in.Delim('[')
+ if out.HugepageLimits == nil {
+ if !in.IsDelim(']') {
+ out.HugepageLimits = make([]specs_go.LinuxHugepageLimit, 0, 2)
+ } else {
+ out.HugepageLimits = []specs_go.LinuxHugepageLimit{}
+ }
+ } else {
+ out.HugepageLimits = (out.HugepageLimits)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v140 specs_go.LinuxHugepageLimit
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo31(in, &v140)
+ out.HugepageLimits = append(out.HugepageLimits, v140)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "network":
+ if in.IsNull() {
+ in.Skip()
+ out.Network = nil
+ } else {
+ if out.Network == nil {
+ out.Network = new(specs_go.LinuxNetwork)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo32(in, &*out.Network)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo19(out *jwriter.Writer, in specs_go.LinuxResources) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.Devices) != 0 {
+ const prefix string = ",\"devices\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v141, v142 := range in.Devices {
+ if v141 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo26(out, v142)
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Memory != nil {
+ const prefix string = ",\"memory\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo27(out, *in.Memory)
+ }
+ if in.CPU != nil {
+ const prefix string = ",\"cpu\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo28(out, *in.CPU)
+ }
+ if in.Pids != nil {
+ const prefix string = ",\"pids\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo29(out, *in.Pids)
+ }
+ if in.BlockIO != nil {
+ const prefix string = ",\"blockIO\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo30(out, *in.BlockIO)
+ }
+ if len(in.HugepageLimits) != 0 {
+ const prefix string = ",\"hugepageLimits\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v143, v144 := range in.HugepageLimits {
+ if v143 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo31(out, v144)
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Network != nil {
+ const prefix string = ",\"network\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo32(out, *in.Network)
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo32(in *jlexer.Lexer, out *specs_go.LinuxNetwork) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "classID":
+ if in.IsNull() {
+ in.Skip()
+ out.ClassID = nil
+ } else {
+ if out.ClassID == nil {
+ out.ClassID = new(uint32)
+ }
+ *out.ClassID = uint32(in.Uint32())
+ }
+ case "priorities":
+ if in.IsNull() {
+ in.Skip()
+ out.Priorities = nil
+ } else {
+ in.Delim('[')
+ if out.Priorities == nil {
+ if !in.IsDelim(']') {
+ out.Priorities = make([]specs_go.LinuxInterfacePriority, 0, 2)
+ } else {
+ out.Priorities = []specs_go.LinuxInterfacePriority{}
+ }
+ } else {
+ out.Priorities = (out.Priorities)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v145 specs_go.LinuxInterfacePriority
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo33(in, &v145)
+ out.Priorities = append(out.Priorities, v145)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo32(out *jwriter.Writer, in specs_go.LinuxNetwork) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.ClassID != nil {
+ const prefix string = ",\"classID\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(*in.ClassID))
+ }
+ if len(in.Priorities) != 0 {
+ const prefix string = ",\"priorities\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v146, v147 := range in.Priorities {
+ if v146 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo33(out, v147)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo33(in *jlexer.Lexer, out *specs_go.LinuxInterfacePriority) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "name":
+ out.Name = string(in.String())
+ case "priority":
+ out.Priority = uint32(in.Uint32())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo33(out *jwriter.Writer, in specs_go.LinuxInterfacePriority) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"name\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Name))
+ }
+ {
+ const prefix string = ",\"priority\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(in.Priority))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo31(in *jlexer.Lexer, out *specs_go.LinuxHugepageLimit) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "pageSize":
+ out.Pagesize = string(in.String())
+ case "limit":
+ out.Limit = uint64(in.Uint64())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo31(out *jwriter.Writer, in specs_go.LinuxHugepageLimit) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"pageSize\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Pagesize))
+ }
+ {
+ const prefix string = ",\"limit\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(in.Limit))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo30(in *jlexer.Lexer, out *specs_go.LinuxBlockIO) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "weight":
+ if in.IsNull() {
+ in.Skip()
+ out.Weight = nil
+ } else {
+ if out.Weight == nil {
+ out.Weight = new(uint16)
+ }
+ *out.Weight = uint16(in.Uint16())
+ }
+ case "leafWeight":
+ if in.IsNull() {
+ in.Skip()
+ out.LeafWeight = nil
+ } else {
+ if out.LeafWeight == nil {
+ out.LeafWeight = new(uint16)
+ }
+ *out.LeafWeight = uint16(in.Uint16())
+ }
+ case "weightDevice":
+ if in.IsNull() {
+ in.Skip()
+ out.WeightDevice = nil
+ } else {
+ in.Delim('[')
+ if out.WeightDevice == nil {
+ if !in.IsDelim(']') {
+ out.WeightDevice = make([]specs_go.LinuxWeightDevice, 0, 2)
+ } else {
+ out.WeightDevice = []specs_go.LinuxWeightDevice{}
+ }
+ } else {
+ out.WeightDevice = (out.WeightDevice)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v148 specs_go.LinuxWeightDevice
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo34(in, &v148)
+ out.WeightDevice = append(out.WeightDevice, v148)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "throttleReadBpsDevice":
+ if in.IsNull() {
+ in.Skip()
+ out.ThrottleReadBpsDevice = nil
+ } else {
+ in.Delim('[')
+ if out.ThrottleReadBpsDevice == nil {
+ if !in.IsDelim(']') {
+ out.ThrottleReadBpsDevice = make([]specs_go.LinuxThrottleDevice, 0, 2)
+ } else {
+ out.ThrottleReadBpsDevice = []specs_go.LinuxThrottleDevice{}
+ }
+ } else {
+ out.ThrottleReadBpsDevice = (out.ThrottleReadBpsDevice)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v149 specs_go.LinuxThrottleDevice
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(in, &v149)
+ out.ThrottleReadBpsDevice = append(out.ThrottleReadBpsDevice, v149)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "throttleWriteBpsDevice":
+ if in.IsNull() {
+ in.Skip()
+ out.ThrottleWriteBpsDevice = nil
+ } else {
+ in.Delim('[')
+ if out.ThrottleWriteBpsDevice == nil {
+ if !in.IsDelim(']') {
+ out.ThrottleWriteBpsDevice = make([]specs_go.LinuxThrottleDevice, 0, 2)
+ } else {
+ out.ThrottleWriteBpsDevice = []specs_go.LinuxThrottleDevice{}
+ }
+ } else {
+ out.ThrottleWriteBpsDevice = (out.ThrottleWriteBpsDevice)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v150 specs_go.LinuxThrottleDevice
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(in, &v150)
+ out.ThrottleWriteBpsDevice = append(out.ThrottleWriteBpsDevice, v150)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "throttleReadIOPSDevice":
+ if in.IsNull() {
+ in.Skip()
+ out.ThrottleReadIOPSDevice = nil
+ } else {
+ in.Delim('[')
+ if out.ThrottleReadIOPSDevice == nil {
+ if !in.IsDelim(']') {
+ out.ThrottleReadIOPSDevice = make([]specs_go.LinuxThrottleDevice, 0, 2)
+ } else {
+ out.ThrottleReadIOPSDevice = []specs_go.LinuxThrottleDevice{}
+ }
+ } else {
+ out.ThrottleReadIOPSDevice = (out.ThrottleReadIOPSDevice)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v151 specs_go.LinuxThrottleDevice
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(in, &v151)
+ out.ThrottleReadIOPSDevice = append(out.ThrottleReadIOPSDevice, v151)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "throttleWriteIOPSDevice":
+ if in.IsNull() {
+ in.Skip()
+ out.ThrottleWriteIOPSDevice = nil
+ } else {
+ in.Delim('[')
+ if out.ThrottleWriteIOPSDevice == nil {
+ if !in.IsDelim(']') {
+ out.ThrottleWriteIOPSDevice = make([]specs_go.LinuxThrottleDevice, 0, 2)
+ } else {
+ out.ThrottleWriteIOPSDevice = []specs_go.LinuxThrottleDevice{}
+ }
+ } else {
+ out.ThrottleWriteIOPSDevice = (out.ThrottleWriteIOPSDevice)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v152 specs_go.LinuxThrottleDevice
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(in, &v152)
+ out.ThrottleWriteIOPSDevice = append(out.ThrottleWriteIOPSDevice, v152)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo30(out *jwriter.Writer, in specs_go.LinuxBlockIO) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Weight != nil {
+ const prefix string = ",\"weight\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint16(uint16(*in.Weight))
+ }
+ if in.LeafWeight != nil {
+ const prefix string = ",\"leafWeight\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint16(uint16(*in.LeafWeight))
+ }
+ if len(in.WeightDevice) != 0 {
+ const prefix string = ",\"weightDevice\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v153, v154 := range in.WeightDevice {
+ if v153 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo34(out, v154)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.ThrottleReadBpsDevice) != 0 {
+ const prefix string = ",\"throttleReadBpsDevice\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v155, v156 := range in.ThrottleReadBpsDevice {
+ if v155 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(out, v156)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.ThrottleWriteBpsDevice) != 0 {
+ const prefix string = ",\"throttleWriteBpsDevice\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v157, v158 := range in.ThrottleWriteBpsDevice {
+ if v157 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(out, v158)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.ThrottleReadIOPSDevice) != 0 {
+ const prefix string = ",\"throttleReadIOPSDevice\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v159, v160 := range in.ThrottleReadIOPSDevice {
+ if v159 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(out, v160)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.ThrottleWriteIOPSDevice) != 0 {
+ const prefix string = ",\"throttleWriteIOPSDevice\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v161, v162 := range in.ThrottleWriteIOPSDevice {
+ if v161 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(out, v162)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(in *jlexer.Lexer, out *specs_go.LinuxThrottleDevice) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "rate":
+ out.Rate = uint64(in.Uint64())
+ case "major":
+ out.Major = int64(in.Int64())
+ case "minor":
+ out.Minor = int64(in.Int64())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo35(out *jwriter.Writer, in specs_go.LinuxThrottleDevice) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"rate\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(in.Rate))
+ }
+ {
+ const prefix string = ",\"major\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Major))
+ }
+ {
+ const prefix string = ",\"minor\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Minor))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo34(in *jlexer.Lexer, out *specs_go.LinuxWeightDevice) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "weight":
+ if in.IsNull() {
+ in.Skip()
+ out.Weight = nil
+ } else {
+ if out.Weight == nil {
+ out.Weight = new(uint16)
+ }
+ *out.Weight = uint16(in.Uint16())
+ }
+ case "leafWeight":
+ if in.IsNull() {
+ in.Skip()
+ out.LeafWeight = nil
+ } else {
+ if out.LeafWeight == nil {
+ out.LeafWeight = new(uint16)
+ }
+ *out.LeafWeight = uint16(in.Uint16())
+ }
+ case "major":
+ out.Major = int64(in.Int64())
+ case "minor":
+ out.Minor = int64(in.Int64())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo34(out *jwriter.Writer, in specs_go.LinuxWeightDevice) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Weight != nil {
+ const prefix string = ",\"weight\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint16(uint16(*in.Weight))
+ }
+ if in.LeafWeight != nil {
+ const prefix string = ",\"leafWeight\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint16(uint16(*in.LeafWeight))
+ }
+ {
+ const prefix string = ",\"major\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Major))
+ }
+ {
+ const prefix string = ",\"minor\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Minor))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo29(in *jlexer.Lexer, out *specs_go.LinuxPids) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "limit":
+ out.Limit = int64(in.Int64())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo29(out *jwriter.Writer, in specs_go.LinuxPids) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"limit\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(in.Limit))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo28(in *jlexer.Lexer, out *specs_go.LinuxCPU) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "shares":
+ if in.IsNull() {
+ in.Skip()
+ out.Shares = nil
+ } else {
+ if out.Shares == nil {
+ out.Shares = new(uint64)
+ }
+ *out.Shares = uint64(in.Uint64())
+ }
+ case "quota":
+ if in.IsNull() {
+ in.Skip()
+ out.Quota = nil
+ } else {
+ if out.Quota == nil {
+ out.Quota = new(int64)
+ }
+ *out.Quota = int64(in.Int64())
+ }
+ case "period":
+ if in.IsNull() {
+ in.Skip()
+ out.Period = nil
+ } else {
+ if out.Period == nil {
+ out.Period = new(uint64)
+ }
+ *out.Period = uint64(in.Uint64())
+ }
+ case "realtimeRuntime":
+ if in.IsNull() {
+ in.Skip()
+ out.RealtimeRuntime = nil
+ } else {
+ if out.RealtimeRuntime == nil {
+ out.RealtimeRuntime = new(int64)
+ }
+ *out.RealtimeRuntime = int64(in.Int64())
+ }
+ case "realtimePeriod":
+ if in.IsNull() {
+ in.Skip()
+ out.RealtimePeriod = nil
+ } else {
+ if out.RealtimePeriod == nil {
+ out.RealtimePeriod = new(uint64)
+ }
+ *out.RealtimePeriod = uint64(in.Uint64())
+ }
+ case "cpus":
+ out.Cpus = string(in.String())
+ case "mems":
+ out.Mems = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo28(out *jwriter.Writer, in specs_go.LinuxCPU) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Shares != nil {
+ const prefix string = ",\"shares\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Shares))
+ }
+ if in.Quota != nil {
+ const prefix string = ",\"quota\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Quota))
+ }
+ if in.Period != nil {
+ const prefix string = ",\"period\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Period))
+ }
+ if in.RealtimeRuntime != nil {
+ const prefix string = ",\"realtimeRuntime\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.RealtimeRuntime))
+ }
+ if in.RealtimePeriod != nil {
+ const prefix string = ",\"realtimePeriod\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.RealtimePeriod))
+ }
+ if in.Cpus != "" {
+ const prefix string = ",\"cpus\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Cpus))
+ }
+ if in.Mems != "" {
+ const prefix string = ",\"mems\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Mems))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo27(in *jlexer.Lexer, out *specs_go.LinuxMemory) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "limit":
+ if in.IsNull() {
+ in.Skip()
+ out.Limit = nil
+ } else {
+ if out.Limit == nil {
+ out.Limit = new(int64)
+ }
+ *out.Limit = int64(in.Int64())
+ }
+ case "reservation":
+ if in.IsNull() {
+ in.Skip()
+ out.Reservation = nil
+ } else {
+ if out.Reservation == nil {
+ out.Reservation = new(int64)
+ }
+ *out.Reservation = int64(in.Int64())
+ }
+ case "swap":
+ if in.IsNull() {
+ in.Skip()
+ out.Swap = nil
+ } else {
+ if out.Swap == nil {
+ out.Swap = new(int64)
+ }
+ *out.Swap = int64(in.Int64())
+ }
+ case "kernel":
+ if in.IsNull() {
+ in.Skip()
+ out.Kernel = nil
+ } else {
+ if out.Kernel == nil {
+ out.Kernel = new(int64)
+ }
+ *out.Kernel = int64(in.Int64())
+ }
+ case "kernelTCP":
+ if in.IsNull() {
+ in.Skip()
+ out.KernelTCP = nil
+ } else {
+ if out.KernelTCP == nil {
+ out.KernelTCP = new(int64)
+ }
+ *out.KernelTCP = int64(in.Int64())
+ }
+ case "swappiness":
+ if in.IsNull() {
+ in.Skip()
+ out.Swappiness = nil
+ } else {
+ if out.Swappiness == nil {
+ out.Swappiness = new(uint64)
+ }
+ *out.Swappiness = uint64(in.Uint64())
+ }
+ case "disableOOMKiller":
+ if in.IsNull() {
+ in.Skip()
+ out.DisableOOMKiller = nil
+ } else {
+ if out.DisableOOMKiller == nil {
+ out.DisableOOMKiller = new(bool)
+ }
+ *out.DisableOOMKiller = bool(in.Bool())
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo27(out *jwriter.Writer, in specs_go.LinuxMemory) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Limit != nil {
+ const prefix string = ",\"limit\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Limit))
+ }
+ if in.Reservation != nil {
+ const prefix string = ",\"reservation\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Reservation))
+ }
+ if in.Swap != nil {
+ const prefix string = ",\"swap\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Swap))
+ }
+ if in.Kernel != nil {
+ const prefix string = ",\"kernel\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Kernel))
+ }
+ if in.KernelTCP != nil {
+ const prefix string = ",\"kernelTCP\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.KernelTCP))
+ }
+ if in.Swappiness != nil {
+ const prefix string = ",\"swappiness\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(*in.Swappiness))
+ }
+ if in.DisableOOMKiller != nil {
+ const prefix string = ",\"disableOOMKiller\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(*in.DisableOOMKiller))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo26(in *jlexer.Lexer, out *specs_go.LinuxDeviceCgroup) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "allow":
+ out.Allow = bool(in.Bool())
+ case "type":
+ out.Type = string(in.String())
+ case "major":
+ if in.IsNull() {
+ in.Skip()
+ out.Major = nil
+ } else {
+ if out.Major == nil {
+ out.Major = new(int64)
+ }
+ *out.Major = int64(in.Int64())
+ }
+ case "minor":
+ if in.IsNull() {
+ in.Skip()
+ out.Minor = nil
+ } else {
+ if out.Minor == nil {
+ out.Minor = new(int64)
+ }
+ *out.Minor = int64(in.Int64())
+ }
+ case "access":
+ out.Access = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo26(out *jwriter.Writer, in specs_go.LinuxDeviceCgroup) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"allow\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Allow))
+ }
+ if in.Type != "" {
+ const prefix string = ",\"type\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Type))
+ }
+ if in.Major != nil {
+ const prefix string = ",\"major\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Major))
+ }
+ if in.Minor != nil {
+ const prefix string = ",\"minor\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int64(int64(*in.Minor))
+ }
+ if in.Access != "" {
+ const prefix string = ",\"access\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Access))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo18(in *jlexer.Lexer, out *specs_go.LinuxIDMapping) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "hostID":
+ out.HostID = uint32(in.Uint32())
+ case "containerID":
+ out.ContainerID = uint32(in.Uint32())
+ case "size":
+ out.Size = uint32(in.Uint32())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo18(out *jwriter.Writer, in specs_go.LinuxIDMapping) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"hostID\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(in.HostID))
+ }
+ {
+ const prefix string = ",\"containerID\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(in.ContainerID))
+ }
+ {
+ const prefix string = ",\"size\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(in.Size))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo5(in *jlexer.Lexer, out *specs_go.Hooks) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "prestart":
+ if in.IsNull() {
+ in.Skip()
+ out.Prestart = nil
+ } else {
+ in.Delim('[')
+ if out.Prestart == nil {
+ if !in.IsDelim(']') {
+ out.Prestart = make([]specs_go.Hook, 0, 1)
+ } else {
+ out.Prestart = []specs_go.Hook{}
+ }
+ } else {
+ out.Prestart = (out.Prestart)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v163 specs_go.Hook
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(in, &v163)
+ out.Prestart = append(out.Prestart, v163)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "poststart":
+ if in.IsNull() {
+ in.Skip()
+ out.Poststart = nil
+ } else {
+ in.Delim('[')
+ if out.Poststart == nil {
+ if !in.IsDelim(']') {
+ out.Poststart = make([]specs_go.Hook, 0, 1)
+ } else {
+ out.Poststart = []specs_go.Hook{}
+ }
+ } else {
+ out.Poststart = (out.Poststart)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v164 specs_go.Hook
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(in, &v164)
+ out.Poststart = append(out.Poststart, v164)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "poststop":
+ if in.IsNull() {
+ in.Skip()
+ out.Poststop = nil
+ } else {
+ in.Delim('[')
+ if out.Poststop == nil {
+ if !in.IsDelim(']') {
+ out.Poststop = make([]specs_go.Hook, 0, 1)
+ } else {
+ out.Poststop = []specs_go.Hook{}
+ }
+ } else {
+ out.Poststop = (out.Poststop)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v165 specs_go.Hook
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(in, &v165)
+ out.Poststop = append(out.Poststop, v165)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo5(out *jwriter.Writer, in specs_go.Hooks) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.Prestart) != 0 {
+ const prefix string = ",\"prestart\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v166, v167 := range in.Prestart {
+ if v166 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(out, v167)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Poststart) != 0 {
+ const prefix string = ",\"poststart\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v168, v169 := range in.Poststart {
+ if v168 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(out, v169)
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Poststop) != 0 {
+ const prefix string = ",\"poststop\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v170, v171 := range in.Poststop {
+ if v170 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo(out, v171)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo4(in *jlexer.Lexer, out *specs_go.Mount) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "destination":
+ out.Destination = string(in.String())
+ case "type":
+ out.Type = string(in.String())
+ case "source":
+ out.Source = string(in.String())
+ case "options":
+ if in.IsNull() {
+ in.Skip()
+ out.Options = nil
+ } else {
+ in.Delim('[')
+ if out.Options == nil {
+ if !in.IsDelim(']') {
+ out.Options = make([]string, 0, 4)
+ } else {
+ out.Options = []string{}
+ }
+ } else {
+ out.Options = (out.Options)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v172 string
+ v172 = string(in.String())
+ out.Options = append(out.Options, v172)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo4(out *jwriter.Writer, in specs_go.Mount) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"destination\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Destination))
+ }
+ if in.Type != "" {
+ const prefix string = ",\"type\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Type))
+ }
+ if in.Source != "" {
+ const prefix string = ",\"source\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Source))
+ }
+ if len(in.Options) != 0 {
+ const prefix string = ",\"options\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v173, v174 := range in.Options {
+ if v173 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v174))
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo3(in *jlexer.Lexer, out *specs_go.Root) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "path":
+ out.Path = string(in.String())
+ case "readonly":
+ out.Readonly = bool(in.Bool())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo3(out *jwriter.Writer, in specs_go.Root) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"path\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Path))
+ }
+ if in.Readonly {
+ const prefix string = ",\"readonly\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Readonly))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo2(in *jlexer.Lexer, out *specs_go.Process) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "terminal":
+ out.Terminal = bool(in.Bool())
+ case "consoleSize":
+ if in.IsNull() {
+ in.Skip()
+ out.ConsoleSize = nil
+ } else {
+ if out.ConsoleSize == nil {
+ out.ConsoleSize = new(specs_go.Box)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo36(in, &*out.ConsoleSize)
+ }
+ case "user":
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo37(in, &out.User)
+ case "args":
+ if in.IsNull() {
+ in.Skip()
+ out.Args = nil
+ } else {
+ in.Delim('[')
+ if out.Args == nil {
+ if !in.IsDelim(']') {
+ out.Args = make([]string, 0, 4)
+ } else {
+ out.Args = []string{}
+ }
+ } else {
+ out.Args = (out.Args)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v175 string
+ v175 = string(in.String())
+ out.Args = append(out.Args, v175)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "env":
+ if in.IsNull() {
+ in.Skip()
+ out.Env = nil
+ } else {
+ in.Delim('[')
+ if out.Env == nil {
+ if !in.IsDelim(']') {
+ out.Env = make([]string, 0, 4)
+ } else {
+ out.Env = []string{}
+ }
+ } else {
+ out.Env = (out.Env)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v176 string
+ v176 = string(in.String())
+ out.Env = append(out.Env, v176)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "cwd":
+ out.Cwd = string(in.String())
+ case "capabilities":
+ if in.IsNull() {
+ in.Skip()
+ out.Capabilities = nil
+ } else {
+ if out.Capabilities == nil {
+ out.Capabilities = new(specs_go.LinuxCapabilities)
+ }
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo38(in, &*out.Capabilities)
+ }
+ case "rlimits":
+ if in.IsNull() {
+ in.Skip()
+ out.Rlimits = nil
+ } else {
+ in.Delim('[')
+ if out.Rlimits == nil {
+ if !in.IsDelim(']') {
+ out.Rlimits = make([]specs_go.POSIXRlimit, 0, 2)
+ } else {
+ out.Rlimits = []specs_go.POSIXRlimit{}
+ }
+ } else {
+ out.Rlimits = (out.Rlimits)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v177 specs_go.POSIXRlimit
+ easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo39(in, &v177)
+ out.Rlimits = append(out.Rlimits, v177)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "noNewPrivileges":
+ out.NoNewPrivileges = bool(in.Bool())
+ case "apparmorProfile":
+ out.ApparmorProfile = string(in.String())
+ case "oomScoreAdj":
+ if in.IsNull() {
+ in.Skip()
+ out.OOMScoreAdj = nil
+ } else {
+ if out.OOMScoreAdj == nil {
+ out.OOMScoreAdj = new(int)
+ }
+ *out.OOMScoreAdj = int(in.Int())
+ }
+ case "selinuxLabel":
+ out.SelinuxLabel = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo2(out *jwriter.Writer, in specs_go.Process) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Terminal {
+ const prefix string = ",\"terminal\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Terminal))
+ }
+ if in.ConsoleSize != nil {
+ const prefix string = ",\"consoleSize\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo36(out, *in.ConsoleSize)
+ }
+ {
+ const prefix string = ",\"user\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo37(out, in.User)
+ }
+ {
+ const prefix string = ",\"args\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Args == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v178, v179 := range in.Args {
+ if v178 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v179))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Env) != 0 {
+ const prefix string = ",\"env\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v180, v181 := range in.Env {
+ if v180 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v181))
+ }
+ out.RawByte(']')
+ }
+ }
+ {
+ const prefix string = ",\"cwd\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Cwd))
+ }
+ if in.Capabilities != nil {
+ const prefix string = ",\"capabilities\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo38(out, *in.Capabilities)
+ }
+ if len(in.Rlimits) != 0 {
+ const prefix string = ",\"rlimits\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v182, v183 := range in.Rlimits {
+ if v182 > 0 {
+ out.RawByte(',')
+ }
+ easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo39(out, v183)
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.NoNewPrivileges {
+ const prefix string = ",\"noNewPrivileges\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.NoNewPrivileges))
+ }
+ if in.ApparmorProfile != "" {
+ const prefix string = ",\"apparmorProfile\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ApparmorProfile))
+ }
+ if in.OOMScoreAdj != nil {
+ const prefix string = ",\"oomScoreAdj\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Int(int(*in.OOMScoreAdj))
+ }
+ if in.SelinuxLabel != "" {
+ const prefix string = ",\"selinuxLabel\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.SelinuxLabel))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo39(in *jlexer.Lexer, out *specs_go.POSIXRlimit) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "type":
+ out.Type = string(in.String())
+ case "hard":
+ out.Hard = uint64(in.Uint64())
+ case "soft":
+ out.Soft = uint64(in.Uint64())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo39(out *jwriter.Writer, in specs_go.POSIXRlimit) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"type\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Type))
+ }
+ {
+ const prefix string = ",\"hard\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(in.Hard))
+ }
+ {
+ const prefix string = ",\"soft\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint64(uint64(in.Soft))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo38(in *jlexer.Lexer, out *specs_go.LinuxCapabilities) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "bounding":
+ if in.IsNull() {
+ in.Skip()
+ out.Bounding = nil
+ } else {
+ in.Delim('[')
+ if out.Bounding == nil {
+ if !in.IsDelim(']') {
+ out.Bounding = make([]string, 0, 4)
+ } else {
+ out.Bounding = []string{}
+ }
+ } else {
+ out.Bounding = (out.Bounding)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v184 string
+ v184 = string(in.String())
+ out.Bounding = append(out.Bounding, v184)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "effective":
+ if in.IsNull() {
+ in.Skip()
+ out.Effective = nil
+ } else {
+ in.Delim('[')
+ if out.Effective == nil {
+ if !in.IsDelim(']') {
+ out.Effective = make([]string, 0, 4)
+ } else {
+ out.Effective = []string{}
+ }
+ } else {
+ out.Effective = (out.Effective)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v185 string
+ v185 = string(in.String())
+ out.Effective = append(out.Effective, v185)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "inheritable":
+ if in.IsNull() {
+ in.Skip()
+ out.Inheritable = nil
+ } else {
+ in.Delim('[')
+ if out.Inheritable == nil {
+ if !in.IsDelim(']') {
+ out.Inheritable = make([]string, 0, 4)
+ } else {
+ out.Inheritable = []string{}
+ }
+ } else {
+ out.Inheritable = (out.Inheritable)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v186 string
+ v186 = string(in.String())
+ out.Inheritable = append(out.Inheritable, v186)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "permitted":
+ if in.IsNull() {
+ in.Skip()
+ out.Permitted = nil
+ } else {
+ in.Delim('[')
+ if out.Permitted == nil {
+ if !in.IsDelim(']') {
+ out.Permitted = make([]string, 0, 4)
+ } else {
+ out.Permitted = []string{}
+ }
+ } else {
+ out.Permitted = (out.Permitted)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v187 string
+ v187 = string(in.String())
+ out.Permitted = append(out.Permitted, v187)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "ambient":
+ if in.IsNull() {
+ in.Skip()
+ out.Ambient = nil
+ } else {
+ in.Delim('[')
+ if out.Ambient == nil {
+ if !in.IsDelim(']') {
+ out.Ambient = make([]string, 0, 4)
+ } else {
+ out.Ambient = []string{}
+ }
+ } else {
+ out.Ambient = (out.Ambient)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v188 string
+ v188 = string(in.String())
+ out.Ambient = append(out.Ambient, v188)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo38(out *jwriter.Writer, in specs_go.LinuxCapabilities) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.Bounding) != 0 {
+ const prefix string = ",\"bounding\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v189, v190 := range in.Bounding {
+ if v189 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v190))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Effective) != 0 {
+ const prefix string = ",\"effective\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v191, v192 := range in.Effective {
+ if v191 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v192))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Inheritable) != 0 {
+ const prefix string = ",\"inheritable\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v193, v194 := range in.Inheritable {
+ if v193 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v194))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Permitted) != 0 {
+ const prefix string = ",\"permitted\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v195, v196 := range in.Permitted {
+ if v195 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v196))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.Ambient) != 0 {
+ const prefix string = ",\"ambient\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v197, v198 := range in.Ambient {
+ if v197 > 0 {
+ out.RawByte(',')
+ }
+ out.String(string(v198))
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo37(in *jlexer.Lexer, out *specs_go.User) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "uid":
+ out.UID = uint32(in.Uint32())
+ case "gid":
+ out.GID = uint32(in.Uint32())
+ case "additionalGids":
+ if in.IsNull() {
+ in.Skip()
+ out.AdditionalGids = nil
+ } else {
+ in.Delim('[')
+ if out.AdditionalGids == nil {
+ if !in.IsDelim(']') {
+ out.AdditionalGids = make([]uint32, 0, 16)
+ } else {
+ out.AdditionalGids = []uint32{}
+ }
+ } else {
+ out.AdditionalGids = (out.AdditionalGids)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v199 uint32
+ v199 = uint32(in.Uint32())
+ out.AdditionalGids = append(out.AdditionalGids, v199)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ case "username":
+ out.Username = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo37(out *jwriter.Writer, in specs_go.User) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"uid\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(in.UID))
+ }
+ {
+ const prefix string = ",\"gid\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint32(uint32(in.GID))
+ }
+ if len(in.AdditionalGids) != 0 {
+ const prefix string = ",\"additionalGids\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v200, v201 := range in.AdditionalGids {
+ if v200 > 0 {
+ out.RawByte(',')
+ }
+ out.Uint32(uint32(v201))
+ }
+ out.RawByte(']')
+ }
+ }
+ if in.Username != "" {
+ const prefix string = ",\"username\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Username))
+ }
+ out.RawByte('}')
+}
+func easyjson1dbef17bDecodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo36(in *jlexer.Lexer, out *specs_go.Box) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "height":
+ out.Height = uint(in.Uint())
+ case "width":
+ out.Width = uint(in.Uint())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjson1dbef17bEncodeGithubComContainersLibpodVendorGithubComOpencontainersRuntimeSpecSpecsGo36(out *jwriter.Writer, in specs_go.Box) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"height\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint(uint(in.Height))
+ }
+ {
+ const prefix string = ",\"width\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Uint(uint(in.Width))
+ }
+ out.RawByte('}')
+}
diff --git a/libpod/container_ffjson.go b/libpod/container_ffjson.go
deleted file mode 100644
index 22d6ed2a9..000000000
--- a/libpod/container_ffjson.go
+++ /dev/null
@@ -1,5454 +0,0 @@
-// Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
-// source: /home/pehunt/go/src/github.com/containers/libpod/libpod/container.go
-
-package libpod
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "errors"
- "fmt"
- "github.com/containernetworking/cni/pkg/types/current"
- "github.com/cri-o/ocicni/pkg/ocicni"
- "github.com/opencontainers/runtime-spec/specs-go"
- fflib "github.com/pquerna/ffjson/fflib/v1"
- "net"
- "reflect"
-)
-
-// MarshalJSON marshal bytes to json - template
-func (j *ContainerConfig) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *ContainerConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if j.Spec != nil {
- /* Struct fall back. type=specs.Spec kind=struct */
- buf.WriteString(`{"spec":`)
- err = buf.Encode(j.Spec)
- if err != nil {
- return err
- }
- } else {
- buf.WriteString(`{"spec":null`)
- }
- buf.WriteString(`,"id":`)
- fflib.WriteJsonString(buf, string(j.ID))
- buf.WriteString(`,"name":`)
- fflib.WriteJsonString(buf, string(j.Name))
- buf.WriteByte(',')
- if len(j.Pod) != 0 {
- buf.WriteString(`"pod":`)
- fflib.WriteJsonString(buf, string(j.Pod))
- buf.WriteByte(',')
- }
- if len(j.Namespace) != 0 {
- buf.WriteString(`"namespace":`)
- fflib.WriteJsonString(buf, string(j.Namespace))
- buf.WriteByte(',')
- }
- if true {
- /* Struct fall back. type=storage.IDMappingOptions kind=struct */
- buf.WriteString(`"idMappingsOptions":`)
- err = buf.Encode(&j.IDMappings)
- if err != nil {
- return err
- }
- buf.WriteByte(',')
- }
- if len(j.RootfsImageID) != 0 {
- buf.WriteString(`"rootfsImageID":`)
- fflib.WriteJsonString(buf, string(j.RootfsImageID))
- buf.WriteByte(',')
- }
- if len(j.RootfsImageName) != 0 {
- buf.WriteString(`"rootfsImageName":`)
- fflib.WriteJsonString(buf, string(j.RootfsImageName))
- buf.WriteByte(',')
- }
- if len(j.Rootfs) != 0 {
- buf.WriteString(`"rootfs":`)
- fflib.WriteJsonString(buf, string(j.Rootfs))
- buf.WriteByte(',')
- }
- if j.ImageVolumes {
- buf.WriteString(`"imageVolumes":true`)
- } else {
- buf.WriteString(`"imageVolumes":false`)
- }
- buf.WriteByte(',')
- if len(j.ShmDir) != 0 {
- buf.WriteString(`"ShmDir":`)
- fflib.WriteJsonString(buf, string(j.ShmDir))
- buf.WriteByte(',')
- }
- buf.WriteString(`"shmSize":`)
- fflib.FormatBits2(buf, uint64(j.ShmSize), 10, j.ShmSize < 0)
- buf.WriteString(`,"staticDir":`)
- fflib.WriteJsonString(buf, string(j.StaticDir))
- buf.WriteByte(',')
- if len(j.Mounts) != 0 {
- buf.WriteString(`"mounts":`)
- if j.Mounts != nil {
- buf.WriteString(`[`)
- for i, v := range j.Mounts {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if j.Privileged {
- buf.WriteString(`"privileged":true`)
- } else {
- buf.WriteString(`"privileged":false`)
- }
- buf.WriteByte(',')
- if len(j.ProcessLabel) != 0 {
- buf.WriteString(`"ProcessLabel":`)
- fflib.WriteJsonString(buf, string(j.ProcessLabel))
- buf.WriteByte(',')
- }
- if len(j.MountLabel) != 0 {
- buf.WriteString(`"MountLabel":`)
- fflib.WriteJsonString(buf, string(j.MountLabel))
- buf.WriteByte(',')
- }
- if len(j.User) != 0 {
- buf.WriteString(`"user":`)
- fflib.WriteJsonString(buf, string(j.User))
- buf.WriteByte(',')
- }
- if len(j.Groups) != 0 {
- buf.WriteString(`"groups":`)
- if j.Groups != nil {
- buf.WriteString(`[`)
- for i, v := range j.Groups {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.IPCNsCtr) != 0 {
- buf.WriteString(`"ipcNsCtr":`)
- fflib.WriteJsonString(buf, string(j.IPCNsCtr))
- buf.WriteByte(',')
- }
- if len(j.MountNsCtr) != 0 {
- buf.WriteString(`"mountNsCtr":`)
- fflib.WriteJsonString(buf, string(j.MountNsCtr))
- buf.WriteByte(',')
- }
- if len(j.NetNsCtr) != 0 {
- buf.WriteString(`"netNsCtr":`)
- fflib.WriteJsonString(buf, string(j.NetNsCtr))
- buf.WriteByte(',')
- }
- if len(j.PIDNsCtr) != 0 {
- buf.WriteString(`"pidNsCtr":`)
- fflib.WriteJsonString(buf, string(j.PIDNsCtr))
- buf.WriteByte(',')
- }
- if len(j.UserNsCtr) != 0 {
- buf.WriteString(`"userNsCtr":`)
- fflib.WriteJsonString(buf, string(j.UserNsCtr))
- buf.WriteByte(',')
- }
- if len(j.UTSNsCtr) != 0 {
- buf.WriteString(`"utsNsCtr":`)
- fflib.WriteJsonString(buf, string(j.UTSNsCtr))
- buf.WriteByte(',')
- }
- if len(j.CgroupNsCtr) != 0 {
- buf.WriteString(`"cgroupNsCtr":`)
- fflib.WriteJsonString(buf, string(j.CgroupNsCtr))
- buf.WriteByte(',')
- }
- buf.WriteString(`"Dependencies":`)
- if j.Dependencies != nil {
- buf.WriteString(`[`)
- for i, v := range j.Dependencies {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- if j.CreateNetNS {
- buf.WriteString(`,"createNetNS":true`)
- } else {
- buf.WriteString(`,"createNetNS":false`)
- }
- buf.WriteByte(',')
- if len(j.PortMappings) != 0 {
- buf.WriteString(`"portMappings":`)
- if j.PortMappings != nil {
- buf.WriteString(`[`)
- for i, v := range j.PortMappings {
- if i != 0 {
- buf.WriteString(`,`)
- }
- /* Struct fall back. type=ocicni.PortMapping kind=struct */
- err = buf.Encode(&v)
- if err != nil {
- return err
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.DNSServer) != 0 {
- buf.WriteString(`"dnsServer":`)
- if j.DNSServer != nil {
- buf.WriteString(`[`)
- for i, v := range j.DNSServer {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- buf.WriteString(`"`)
- {
- enc := base64.NewEncoder(base64.StdEncoding, buf)
- enc.Write(reflect.Indirect(reflect.ValueOf(v)).Bytes())
- enc.Close()
- }
- buf.WriteString(`"`)
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.DNSSearch) != 0 {
- buf.WriteString(`"dnsSearch":`)
- if j.DNSSearch != nil {
- buf.WriteString(`[`)
- for i, v := range j.DNSSearch {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.DNSOption) != 0 {
- buf.WriteString(`"dnsOption":`)
- if j.DNSOption != nil {
- buf.WriteString(`[`)
- for i, v := range j.DNSOption {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.HostAdd) != 0 {
- buf.WriteString(`"hostsAdd":`)
- if j.HostAdd != nil {
- buf.WriteString(`[`)
- for i, v := range j.HostAdd {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.Networks) != 0 {
- buf.WriteString(`"networks":`)
- if j.Networks != nil {
- buf.WriteString(`[`)
- for i, v := range j.Networks {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.UserVolumes) != 0 {
- buf.WriteString(`"userVolumes":`)
- if j.UserVolumes != nil {
- buf.WriteString(`[`)
- for i, v := range j.UserVolumes {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.Entrypoint) != 0 {
- buf.WriteString(`"entrypoint":`)
- if j.Entrypoint != nil {
- buf.WriteString(`[`)
- for i, v := range j.Entrypoint {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.Command) != 0 {
- buf.WriteString(`"command":`)
- if j.Command != nil {
- buf.WriteString(`[`)
- for i, v := range j.Command {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if j.Stdin != false {
- if j.Stdin {
- buf.WriteString(`"stdin":true`)
- } else {
- buf.WriteString(`"stdin":false`)
- }
- buf.WriteByte(',')
- }
- if len(j.Labels) != 0 {
- if j.Labels == nil {
- buf.WriteString(`"labels":null`)
- } else {
- buf.WriteString(`"labels":{ `)
- for key, value := range j.Labels {
- fflib.WriteJsonString(buf, key)
- buf.WriteString(`:`)
- fflib.WriteJsonString(buf, string(value))
- buf.WriteByte(',')
- }
- buf.Rewind(1)
- buf.WriteByte('}')
- }
- buf.WriteByte(',')
- }
- if j.StopSignal != 0 {
- buf.WriteString(`"stopSignal":`)
- fflib.FormatBits2(buf, uint64(j.StopSignal), 10, false)
- buf.WriteByte(',')
- }
- if j.StopTimeout != 0 {
- buf.WriteString(`"stopTimeout":`)
- fflib.FormatBits2(buf, uint64(j.StopTimeout), 10, false)
- buf.WriteByte(',')
- }
- buf.WriteString(`"createdTime":`)
-
- {
-
- obj, err = j.CreatedTime.MarshalJSON()
- if err != nil {
- return err
- }
- buf.Write(obj)
-
- }
- buf.WriteString(`,"cgroupParent":`)
- fflib.WriteJsonString(buf, string(j.CgroupParent))
- buf.WriteString(`,"logPath":`)
- fflib.WriteJsonString(buf, string(j.LogPath))
- buf.WriteByte(',')
- if len(j.ConmonPidFile) != 0 {
- buf.WriteString(`"conmonPidFile":`)
- fflib.WriteJsonString(buf, string(j.ConmonPidFile))
- buf.WriteByte(',')
- }
- if j.PostConfigureNetNS {
- buf.WriteString(`"postConfigureNetNS":true`)
- } else {
- buf.WriteString(`"postConfigureNetNS":false`)
- }
- buf.WriteByte(',')
- if len(j.ExitCommand) != 0 {
- buf.WriteString(`"exitCommand":`)
- if j.ExitCommand != nil {
- buf.WriteString(`[`)
- for i, v := range j.ExitCommand {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- buf.WriteString(`"LocalVolumes":`)
- if j.LocalVolumes != nil {
- buf.WriteString(`[`)
- for i, v := range j.LocalVolumes {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- if j.IsInfra {
- buf.WriteString(`,"pause":true`)
- } else {
- buf.WriteString(`,"pause":false`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtContainerConfigbase = iota
- ffjtContainerConfignosuchkey
-
- ffjtContainerConfigSpec
-
- ffjtContainerConfigID
-
- ffjtContainerConfigName
-
- ffjtContainerConfigPod
-
- ffjtContainerConfigNamespace
-
- ffjtContainerConfigIDMappings
-
- ffjtContainerConfigRootfsImageID
-
- ffjtContainerConfigRootfsImageName
-
- ffjtContainerConfigRootfs
-
- ffjtContainerConfigImageVolumes
-
- ffjtContainerConfigShmDir
-
- ffjtContainerConfigShmSize
-
- ffjtContainerConfigStaticDir
-
- ffjtContainerConfigMounts
-
- ffjtContainerConfigPrivileged
-
- ffjtContainerConfigProcessLabel
-
- ffjtContainerConfigMountLabel
-
- ffjtContainerConfigUser
-
- ffjtContainerConfigGroups
-
- ffjtContainerConfigIPCNsCtr
-
- ffjtContainerConfigMountNsCtr
-
- ffjtContainerConfigNetNsCtr
-
- ffjtContainerConfigPIDNsCtr
-
- ffjtContainerConfigUserNsCtr
-
- ffjtContainerConfigUTSNsCtr
-
- ffjtContainerConfigCgroupNsCtr
-
- ffjtContainerConfigDependencies
-
- ffjtContainerConfigCreateNetNS
-
- ffjtContainerConfigPortMappings
-
- ffjtContainerConfigDNSServer
-
- ffjtContainerConfigDNSSearch
-
- ffjtContainerConfigDNSOption
-
- ffjtContainerConfigHostAdd
-
- ffjtContainerConfigNetworks
-
- ffjtContainerConfigUserVolumes
-
- ffjtContainerConfigEntrypoint
-
- ffjtContainerConfigCommand
-
- ffjtContainerConfigStdin
-
- ffjtContainerConfigLabels
-
- ffjtContainerConfigStopSignal
-
- ffjtContainerConfigStopTimeout
-
- ffjtContainerConfigCreatedTime
-
- ffjtContainerConfigCgroupParent
-
- ffjtContainerConfigLogPath
-
- ffjtContainerConfigConmonPidFile
-
- ffjtContainerConfigPostConfigureNetNS
-
- ffjtContainerConfigExitCommand
-
- ffjtContainerConfigLocalVolumes
-
- ffjtContainerConfigIsInfra
-)
-
-var ffjKeyContainerConfigSpec = []byte("spec")
-
-var ffjKeyContainerConfigID = []byte("id")
-
-var ffjKeyContainerConfigName = []byte("name")
-
-var ffjKeyContainerConfigPod = []byte("pod")
-
-var ffjKeyContainerConfigNamespace = []byte("namespace")
-
-var ffjKeyContainerConfigIDMappings = []byte("idMappingsOptions")
-
-var ffjKeyContainerConfigRootfsImageID = []byte("rootfsImageID")
-
-var ffjKeyContainerConfigRootfsImageName = []byte("rootfsImageName")
-
-var ffjKeyContainerConfigRootfs = []byte("rootfs")
-
-var ffjKeyContainerConfigImageVolumes = []byte("imageVolumes")
-
-var ffjKeyContainerConfigShmDir = []byte("ShmDir")
-
-var ffjKeyContainerConfigShmSize = []byte("shmSize")
-
-var ffjKeyContainerConfigStaticDir = []byte("staticDir")
-
-var ffjKeyContainerConfigMounts = []byte("mounts")
-
-var ffjKeyContainerConfigPrivileged = []byte("privileged")
-
-var ffjKeyContainerConfigProcessLabel = []byte("ProcessLabel")
-
-var ffjKeyContainerConfigMountLabel = []byte("MountLabel")
-
-var ffjKeyContainerConfigUser = []byte("user")
-
-var ffjKeyContainerConfigGroups = []byte("groups")
-
-var ffjKeyContainerConfigIPCNsCtr = []byte("ipcNsCtr")
-
-var ffjKeyContainerConfigMountNsCtr = []byte("mountNsCtr")
-
-var ffjKeyContainerConfigNetNsCtr = []byte("netNsCtr")
-
-var ffjKeyContainerConfigPIDNsCtr = []byte("pidNsCtr")
-
-var ffjKeyContainerConfigUserNsCtr = []byte("userNsCtr")
-
-var ffjKeyContainerConfigUTSNsCtr = []byte("utsNsCtr")
-
-var ffjKeyContainerConfigCgroupNsCtr = []byte("cgroupNsCtr")
-
-var ffjKeyContainerConfigDependencies = []byte("Dependencies")
-
-var ffjKeyContainerConfigCreateNetNS = []byte("createNetNS")
-
-var ffjKeyContainerConfigPortMappings = []byte("portMappings")
-
-var ffjKeyContainerConfigDNSServer = []byte("dnsServer")
-
-var ffjKeyContainerConfigDNSSearch = []byte("dnsSearch")
-
-var ffjKeyContainerConfigDNSOption = []byte("dnsOption")
-
-var ffjKeyContainerConfigHostAdd = []byte("hostsAdd")
-
-var ffjKeyContainerConfigNetworks = []byte("networks")
-
-var ffjKeyContainerConfigUserVolumes = []byte("userVolumes")
-
-var ffjKeyContainerConfigEntrypoint = []byte("entrypoint")
-
-var ffjKeyContainerConfigCommand = []byte("command")
-
-var ffjKeyContainerConfigStdin = []byte("stdin")
-
-var ffjKeyContainerConfigLabels = []byte("labels")
-
-var ffjKeyContainerConfigStopSignal = []byte("stopSignal")
-
-var ffjKeyContainerConfigStopTimeout = []byte("stopTimeout")
-
-var ffjKeyContainerConfigCreatedTime = []byte("createdTime")
-
-var ffjKeyContainerConfigCgroupParent = []byte("cgroupParent")
-
-var ffjKeyContainerConfigLogPath = []byte("logPath")
-
-var ffjKeyContainerConfigConmonPidFile = []byte("conmonPidFile")
-
-var ffjKeyContainerConfigPostConfigureNetNS = []byte("postConfigureNetNS")
-
-var ffjKeyContainerConfigExitCommand = []byte("exitCommand")
-
-var ffjKeyContainerConfigLocalVolumes = []byte("LocalVolumes")
-
-var ffjKeyContainerConfigIsInfra = []byte("pause")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *ContainerConfig) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *ContainerConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtContainerConfigbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtContainerConfignosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'D':
-
- if bytes.Equal(ffjKeyContainerConfigDependencies, kn) {
- currentKey = ffjtContainerConfigDependencies
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'L':
-
- if bytes.Equal(ffjKeyContainerConfigLocalVolumes, kn) {
- currentKey = ffjtContainerConfigLocalVolumes
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'M':
-
- if bytes.Equal(ffjKeyContainerConfigMountLabel, kn) {
- currentKey = ffjtContainerConfigMountLabel
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'P':
-
- if bytes.Equal(ffjKeyContainerConfigProcessLabel, kn) {
- currentKey = ffjtContainerConfigProcessLabel
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'S':
-
- if bytes.Equal(ffjKeyContainerConfigShmDir, kn) {
- currentKey = ffjtContainerConfigShmDir
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'c':
-
- if bytes.Equal(ffjKeyContainerConfigCgroupNsCtr, kn) {
- currentKey = ffjtContainerConfigCgroupNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigCreateNetNS, kn) {
- currentKey = ffjtContainerConfigCreateNetNS
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigCommand, kn) {
- currentKey = ffjtContainerConfigCommand
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigCreatedTime, kn) {
- currentKey = ffjtContainerConfigCreatedTime
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigCgroupParent, kn) {
- currentKey = ffjtContainerConfigCgroupParent
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigConmonPidFile, kn) {
- currentKey = ffjtContainerConfigConmonPidFile
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'd':
-
- if bytes.Equal(ffjKeyContainerConfigDNSServer, kn) {
- currentKey = ffjtContainerConfigDNSServer
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigDNSSearch, kn) {
- currentKey = ffjtContainerConfigDNSSearch
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigDNSOption, kn) {
- currentKey = ffjtContainerConfigDNSOption
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'e':
-
- if bytes.Equal(ffjKeyContainerConfigEntrypoint, kn) {
- currentKey = ffjtContainerConfigEntrypoint
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigExitCommand, kn) {
- currentKey = ffjtContainerConfigExitCommand
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'g':
-
- if bytes.Equal(ffjKeyContainerConfigGroups, kn) {
- currentKey = ffjtContainerConfigGroups
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'h':
-
- if bytes.Equal(ffjKeyContainerConfigHostAdd, kn) {
- currentKey = ffjtContainerConfigHostAdd
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffjKeyContainerConfigID, kn) {
- currentKey = ffjtContainerConfigID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigIDMappings, kn) {
- currentKey = ffjtContainerConfigIDMappings
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigImageVolumes, kn) {
- currentKey = ffjtContainerConfigImageVolumes
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigIPCNsCtr, kn) {
- currentKey = ffjtContainerConfigIPCNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'l':
-
- if bytes.Equal(ffjKeyContainerConfigLabels, kn) {
- currentKey = ffjtContainerConfigLabels
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigLogPath, kn) {
- currentKey = ffjtContainerConfigLogPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'm':
-
- if bytes.Equal(ffjKeyContainerConfigMounts, kn) {
- currentKey = ffjtContainerConfigMounts
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigMountNsCtr, kn) {
- currentKey = ffjtContainerConfigMountNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffjKeyContainerConfigName, kn) {
- currentKey = ffjtContainerConfigName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigNamespace, kn) {
- currentKey = ffjtContainerConfigNamespace
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigNetNsCtr, kn) {
- currentKey = ffjtContainerConfigNetNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigNetworks, kn) {
- currentKey = ffjtContainerConfigNetworks
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffjKeyContainerConfigPod, kn) {
- currentKey = ffjtContainerConfigPod
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigPrivileged, kn) {
- currentKey = ffjtContainerConfigPrivileged
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigPIDNsCtr, kn) {
- currentKey = ffjtContainerConfigPIDNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigPortMappings, kn) {
- currentKey = ffjtContainerConfigPortMappings
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigPostConfigureNetNS, kn) {
- currentKey = ffjtContainerConfigPostConfigureNetNS
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigIsInfra, kn) {
- currentKey = ffjtContainerConfigIsInfra
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffjKeyContainerConfigRootfsImageID, kn) {
- currentKey = ffjtContainerConfigRootfsImageID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigRootfsImageName, kn) {
- currentKey = ffjtContainerConfigRootfsImageName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigRootfs, kn) {
- currentKey = ffjtContainerConfigRootfs
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffjKeyContainerConfigSpec, kn) {
- currentKey = ffjtContainerConfigSpec
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigShmSize, kn) {
- currentKey = ffjtContainerConfigShmSize
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigStaticDir, kn) {
- currentKey = ffjtContainerConfigStaticDir
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigStdin, kn) {
- currentKey = ffjtContainerConfigStdin
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigStopSignal, kn) {
- currentKey = ffjtContainerConfigStopSignal
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigStopTimeout, kn) {
- currentKey = ffjtContainerConfigStopTimeout
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffjKeyContainerConfigUser, kn) {
- currentKey = ffjtContainerConfigUser
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigUserNsCtr, kn) {
- currentKey = ffjtContainerConfigUserNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigUTSNsCtr, kn) {
- currentKey = ffjtContainerConfigUTSNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyContainerConfigUserVolumes, kn) {
- currentKey = ffjtContainerConfigUserVolumes
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigIsInfra, kn) {
- currentKey = ffjtContainerConfigIsInfra
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigLocalVolumes, kn) {
- currentKey = ffjtContainerConfigLocalVolumes
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigExitCommand, kn) {
- currentKey = ffjtContainerConfigExitCommand
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigPostConfigureNetNS, kn) {
- currentKey = ffjtContainerConfigPostConfigureNetNS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigConmonPidFile, kn) {
- currentKey = ffjtContainerConfigConmonPidFile
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigLogPath, kn) {
- currentKey = ffjtContainerConfigLogPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigCgroupParent, kn) {
- currentKey = ffjtContainerConfigCgroupParent
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigCreatedTime, kn) {
- currentKey = ffjtContainerConfigCreatedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigStopTimeout, kn) {
- currentKey = ffjtContainerConfigStopTimeout
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigStopSignal, kn) {
- currentKey = ffjtContainerConfigStopSignal
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigLabels, kn) {
- currentKey = ffjtContainerConfigLabels
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigStdin, kn) {
- currentKey = ffjtContainerConfigStdin
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigCommand, kn) {
- currentKey = ffjtContainerConfigCommand
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigEntrypoint, kn) {
- currentKey = ffjtContainerConfigEntrypoint
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigUserVolumes, kn) {
- currentKey = ffjtContainerConfigUserVolumes
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigNetworks, kn) {
- currentKey = ffjtContainerConfigNetworks
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigHostAdd, kn) {
- currentKey = ffjtContainerConfigHostAdd
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigDNSOption, kn) {
- currentKey = ffjtContainerConfigDNSOption
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigDNSSearch, kn) {
- currentKey = ffjtContainerConfigDNSSearch
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigDNSServer, kn) {
- currentKey = ffjtContainerConfigDNSServer
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigPortMappings, kn) {
- currentKey = ffjtContainerConfigPortMappings
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigCreateNetNS, kn) {
- currentKey = ffjtContainerConfigCreateNetNS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigDependencies, kn) {
- currentKey = ffjtContainerConfigDependencies
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigCgroupNsCtr, kn) {
- currentKey = ffjtContainerConfigCgroupNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigUTSNsCtr, kn) {
- currentKey = ffjtContainerConfigUTSNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigUserNsCtr, kn) {
- currentKey = ffjtContainerConfigUserNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigPIDNsCtr, kn) {
- currentKey = ffjtContainerConfigPIDNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigNetNsCtr, kn) {
- currentKey = ffjtContainerConfigNetNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigMountNsCtr, kn) {
- currentKey = ffjtContainerConfigMountNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigIPCNsCtr, kn) {
- currentKey = ffjtContainerConfigIPCNsCtr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigGroups, kn) {
- currentKey = ffjtContainerConfigGroups
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigUser, kn) {
- currentKey = ffjtContainerConfigUser
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigMountLabel, kn) {
- currentKey = ffjtContainerConfigMountLabel
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigProcessLabel, kn) {
- currentKey = ffjtContainerConfigProcessLabel
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigPrivileged, kn) {
- currentKey = ffjtContainerConfigPrivileged
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigMounts, kn) {
- currentKey = ffjtContainerConfigMounts
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigStaticDir, kn) {
- currentKey = ffjtContainerConfigStaticDir
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigShmSize, kn) {
- currentKey = ffjtContainerConfigShmSize
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigShmDir, kn) {
- currentKey = ffjtContainerConfigShmDir
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigImageVolumes, kn) {
- currentKey = ffjtContainerConfigImageVolumes
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigRootfs, kn) {
- currentKey = ffjtContainerConfigRootfs
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigRootfsImageName, kn) {
- currentKey = ffjtContainerConfigRootfsImageName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigRootfsImageID, kn) {
- currentKey = ffjtContainerConfigRootfsImageID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigIDMappings, kn) {
- currentKey = ffjtContainerConfigIDMappings
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigNamespace, kn) {
- currentKey = ffjtContainerConfigNamespace
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigPod, kn) {
- currentKey = ffjtContainerConfigPod
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigName, kn) {
- currentKey = ffjtContainerConfigName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigID, kn) {
- currentKey = ffjtContainerConfigID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyContainerConfigSpec, kn) {
- currentKey = ffjtContainerConfigSpec
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtContainerConfignosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtContainerConfigSpec:
- goto handle_Spec
-
- case ffjtContainerConfigID:
- goto handle_ID
-
- case ffjtContainerConfigName:
- goto handle_Name
-
- case ffjtContainerConfigPod:
- goto handle_Pod
-
- case ffjtContainerConfigNamespace:
- goto handle_Namespace
-
- case ffjtContainerConfigIDMappings:
- goto handle_IDMappings
-
- case ffjtContainerConfigRootfsImageID:
- goto handle_RootfsImageID
-
- case ffjtContainerConfigRootfsImageName:
- goto handle_RootfsImageName
-
- case ffjtContainerConfigRootfs:
- goto handle_Rootfs
-
- case ffjtContainerConfigImageVolumes:
- goto handle_ImageVolumes
-
- case ffjtContainerConfigShmDir:
- goto handle_ShmDir
-
- case ffjtContainerConfigShmSize:
- goto handle_ShmSize
-
- case ffjtContainerConfigStaticDir:
- goto handle_StaticDir
-
- case ffjtContainerConfigMounts:
- goto handle_Mounts
-
- case ffjtContainerConfigPrivileged:
- goto handle_Privileged
-
- case ffjtContainerConfigProcessLabel:
- goto handle_ProcessLabel
-
- case ffjtContainerConfigMountLabel:
- goto handle_MountLabel
-
- case ffjtContainerConfigUser:
- goto handle_User
-
- case ffjtContainerConfigGroups:
- goto handle_Groups
-
- case ffjtContainerConfigIPCNsCtr:
- goto handle_IPCNsCtr
-
- case ffjtContainerConfigMountNsCtr:
- goto handle_MountNsCtr
-
- case ffjtContainerConfigNetNsCtr:
- goto handle_NetNsCtr
-
- case ffjtContainerConfigPIDNsCtr:
- goto handle_PIDNsCtr
-
- case ffjtContainerConfigUserNsCtr:
- goto handle_UserNsCtr
-
- case ffjtContainerConfigUTSNsCtr:
- goto handle_UTSNsCtr
-
- case ffjtContainerConfigCgroupNsCtr:
- goto handle_CgroupNsCtr
-
- case ffjtContainerConfigDependencies:
- goto handle_Dependencies
-
- case ffjtContainerConfigCreateNetNS:
- goto handle_CreateNetNS
-
- case ffjtContainerConfigPortMappings:
- goto handle_PortMappings
-
- case ffjtContainerConfigDNSServer:
- goto handle_DNSServer
-
- case ffjtContainerConfigDNSSearch:
- goto handle_DNSSearch
-
- case ffjtContainerConfigDNSOption:
- goto handle_DNSOption
-
- case ffjtContainerConfigHostAdd:
- goto handle_HostAdd
-
- case ffjtContainerConfigNetworks:
- goto handle_Networks
-
- case ffjtContainerConfigUserVolumes:
- goto handle_UserVolumes
-
- case ffjtContainerConfigEntrypoint:
- goto handle_Entrypoint
-
- case ffjtContainerConfigCommand:
- goto handle_Command
-
- case ffjtContainerConfigStdin:
- goto handle_Stdin
-
- case ffjtContainerConfigLabels:
- goto handle_Labels
-
- case ffjtContainerConfigStopSignal:
- goto handle_StopSignal
-
- case ffjtContainerConfigStopTimeout:
- goto handle_StopTimeout
-
- case ffjtContainerConfigCreatedTime:
- goto handle_CreatedTime
-
- case ffjtContainerConfigCgroupParent:
- goto handle_CgroupParent
-
- case ffjtContainerConfigLogPath:
- goto handle_LogPath
-
- case ffjtContainerConfigConmonPidFile:
- goto handle_ConmonPidFile
-
- case ffjtContainerConfigPostConfigureNetNS:
- goto handle_PostConfigureNetNS
-
- case ffjtContainerConfigExitCommand:
- goto handle_ExitCommand
-
- case ffjtContainerConfigLocalVolumes:
- goto handle_LocalVolumes
-
- case ffjtContainerConfigIsInfra:
- goto handle_IsInfra
-
- case ffjtContainerConfignosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Spec:
-
- /* handler: j.Spec type=specs.Spec kind=struct quoted=false*/
-
- {
- /* Falling back. type=specs.Spec kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &j.Spec)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ID:
-
- /* handler: j.ID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Name:
-
- /* handler: j.Name type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Name = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Pod:
-
- /* handler: j.Pod type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Pod = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Namespace:
-
- /* handler: j.Namespace type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Namespace = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IDMappings:
-
- /* handler: j.IDMappings type=storage.IDMappingOptions kind=struct quoted=false*/
-
- {
- /* Falling back. type=storage.IDMappingOptions kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &j.IDMappings)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RootfsImageID:
-
- /* handler: j.RootfsImageID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.RootfsImageID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RootfsImageName:
-
- /* handler: j.RootfsImageName type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.RootfsImageName = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Rootfs:
-
- /* handler: j.Rootfs type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Rootfs = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ImageVolumes:
-
- /* handler: j.ImageVolumes type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.ImageVolumes = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.ImageVolumes = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ShmDir:
-
- /* handler: j.ShmDir type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ShmDir = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ShmSize:
-
- /* handler: j.ShmSize type=int64 kind=int64 quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.ShmSize = int64(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_StaticDir:
-
- /* handler: j.StaticDir type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.StaticDir = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Mounts:
-
- /* handler: j.Mounts type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Mounts = nil
- } else {
-
- j.Mounts = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJMounts string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJMounts type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJMounts = string(string(outBuf))
-
- }
- }
-
- j.Mounts = append(j.Mounts, tmpJMounts)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Privileged:
-
- /* handler: j.Privileged type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.Privileged = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.Privileged = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProcessLabel:
-
- /* handler: j.ProcessLabel type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ProcessLabel = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_MountLabel:
-
- /* handler: j.MountLabel type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.MountLabel = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_User:
-
- /* handler: j.User type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.User = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Groups:
-
- /* handler: j.Groups type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Groups = nil
- } else {
-
- j.Groups = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJGroups string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJGroups type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJGroups = string(string(outBuf))
-
- }
- }
-
- j.Groups = append(j.Groups, tmpJGroups)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IPCNsCtr:
-
- /* handler: j.IPCNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.IPCNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_MountNsCtr:
-
- /* handler: j.MountNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.MountNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_NetNsCtr:
-
- /* handler: j.NetNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.NetNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_PIDNsCtr:
-
- /* handler: j.PIDNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.PIDNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UserNsCtr:
-
- /* handler: j.UserNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.UserNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UTSNsCtr:
-
- /* handler: j.UTSNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.UTSNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CgroupNsCtr:
-
- /* handler: j.CgroupNsCtr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.CgroupNsCtr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Dependencies:
-
- /* handler: j.Dependencies type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Dependencies = nil
- } else {
-
- j.Dependencies = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJDependencies string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJDependencies type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJDependencies = string(string(outBuf))
-
- }
- }
-
- j.Dependencies = append(j.Dependencies, tmpJDependencies)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreateNetNS:
-
- /* handler: j.CreateNetNS type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.CreateNetNS = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.CreateNetNS = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_PortMappings:
-
- /* handler: j.PortMappings type=[]ocicni.PortMapping kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.PortMappings = nil
- } else {
-
- j.PortMappings = []ocicni.PortMapping{}
-
- wantVal := true
-
- for {
-
- var tmpJPortMappings ocicni.PortMapping
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJPortMappings type=ocicni.PortMapping kind=struct quoted=false*/
-
- {
- /* Falling back. type=ocicni.PortMapping kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &tmpJPortMappings)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- j.PortMappings = append(j.PortMappings, tmpJPortMappings)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DNSServer:
-
- /* handler: j.DNSServer type=[]net.IP kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.DNSServer = nil
- } else {
-
- j.DNSServer = []net.IP{}
-
- wantVal := true
-
- for {
-
- var tmpJDNSServer net.IP
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJDNSServer type=net.IP kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for IP", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- tmpJDNSServer = nil
- } else {
- b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len()))
- n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes())
- if err != nil {
- return fs.WrapErr(err)
- }
-
- v := reflect.ValueOf(&tmpJDNSServer).Elem()
- v.SetBytes(b[0:n])
-
- }
- }
-
- j.DNSServer = append(j.DNSServer, tmpJDNSServer)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DNSSearch:
-
- /* handler: j.DNSSearch type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.DNSSearch = nil
- } else {
-
- j.DNSSearch = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJDNSSearch string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJDNSSearch type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJDNSSearch = string(string(outBuf))
-
- }
- }
-
- j.DNSSearch = append(j.DNSSearch, tmpJDNSSearch)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DNSOption:
-
- /* handler: j.DNSOption type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.DNSOption = nil
- } else {
-
- j.DNSOption = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJDNSOption string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJDNSOption type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJDNSOption = string(string(outBuf))
-
- }
- }
-
- j.DNSOption = append(j.DNSOption, tmpJDNSOption)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_HostAdd:
-
- /* handler: j.HostAdd type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.HostAdd = nil
- } else {
-
- j.HostAdd = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJHostAdd string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJHostAdd type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJHostAdd = string(string(outBuf))
-
- }
- }
-
- j.HostAdd = append(j.HostAdd, tmpJHostAdd)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Networks:
-
- /* handler: j.Networks type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Networks = nil
- } else {
-
- j.Networks = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJNetworks string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJNetworks type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJNetworks = string(string(outBuf))
-
- }
- }
-
- j.Networks = append(j.Networks, tmpJNetworks)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UserVolumes:
-
- /* handler: j.UserVolumes type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.UserVolumes = nil
- } else {
-
- j.UserVolumes = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJUserVolumes string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJUserVolumes type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJUserVolumes = string(string(outBuf))
-
- }
- }
-
- j.UserVolumes = append(j.UserVolumes, tmpJUserVolumes)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Entrypoint:
-
- /* handler: j.Entrypoint type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Entrypoint = nil
- } else {
-
- j.Entrypoint = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJEntrypoint string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJEntrypoint type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJEntrypoint = string(string(outBuf))
-
- }
- }
-
- j.Entrypoint = append(j.Entrypoint, tmpJEntrypoint)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Command:
-
- /* handler: j.Command type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Command = nil
- } else {
-
- j.Command = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJCommand string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJCommand type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJCommand = string(string(outBuf))
-
- }
- }
-
- j.Command = append(j.Command, tmpJCommand)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Stdin:
-
- /* handler: j.Stdin type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.Stdin = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.Stdin = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Labels:
-
- /* handler: j.Labels type=map[string]string kind=map quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_bracket && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Labels = nil
- } else {
-
- j.Labels = make(map[string]string, 0)
-
- wantVal := true
-
- for {
-
- var k string
-
- var tmpJLabels string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_bracket {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: k type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- k = string(string(outBuf))
-
- }
- }
-
- // Expect ':' after key
- tok = fs.Scan()
- if tok != fflib.FFTok_colon {
- return fs.WrapErr(fmt.Errorf("wanted colon token, but got token: %v", tok))
- }
-
- tok = fs.Scan()
- /* handler: tmpJLabels type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJLabels = string(string(outBuf))
-
- }
- }
-
- j.Labels[k] = tmpJLabels
-
- wantVal = false
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_StopSignal:
-
- /* handler: j.StopSignal type=uint kind=uint quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.StopSignal = uint(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_StopTimeout:
-
- /* handler: j.StopTimeout type=uint kind=uint quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.StopTimeout = uint(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreatedTime:
-
- /* handler: j.CreatedTime type=time.Time kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
-
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = j.CreatedTime.UnmarshalJSON(tbuf)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CgroupParent:
-
- /* handler: j.CgroupParent type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.CgroupParent = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_LogPath:
-
- /* handler: j.LogPath type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.LogPath = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ConmonPidFile:
-
- /* handler: j.ConmonPidFile type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ConmonPidFile = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_PostConfigureNetNS:
-
- /* handler: j.PostConfigureNetNS type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.PostConfigureNetNS = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.PostConfigureNetNS = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ExitCommand:
-
- /* handler: j.ExitCommand type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.ExitCommand = nil
- } else {
-
- j.ExitCommand = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJExitCommand string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJExitCommand type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJExitCommand = string(string(outBuf))
-
- }
- }
-
- j.ExitCommand = append(j.ExitCommand, tmpJExitCommand)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_LocalVolumes:
-
- /* handler: j.LocalVolumes type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.LocalVolumes = nil
- } else {
-
- j.LocalVolumes = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJLocalVolumes string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJLocalVolumes type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJLocalVolumes = string(string(outBuf))
-
- }
- }
-
- j.LocalVolumes = append(j.LocalVolumes, tmpJLocalVolumes)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IsInfra:
-
- /* handler: j.IsInfra type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.IsInfra = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.IsInfra = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *ExecSession) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *ExecSession) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"id":`)
- fflib.WriteJsonString(buf, string(j.ID))
- buf.WriteString(`,"command":`)
- if j.Command != nil {
- buf.WriteString(`[`)
- for i, v := range j.Command {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.WriteJsonString(buf, string(v))
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"pid":`)
- fflib.FormatBits2(buf, uint64(j.PID), 10, j.PID < 0)
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtExecSessionbase = iota
- ffjtExecSessionnosuchkey
-
- ffjtExecSessionID
-
- ffjtExecSessionCommand
-
- ffjtExecSessionPID
-)
-
-var ffjKeyExecSessionID = []byte("id")
-
-var ffjKeyExecSessionCommand = []byte("command")
-
-var ffjKeyExecSessionPID = []byte("pid")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *ExecSession) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *ExecSession) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtExecSessionbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtExecSessionnosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffjKeyExecSessionCommand, kn) {
- currentKey = ffjtExecSessionCommand
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffjKeyExecSessionID, kn) {
- currentKey = ffjtExecSessionID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffjKeyExecSessionPID, kn) {
- currentKey = ffjtExecSessionPID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyExecSessionPID, kn) {
- currentKey = ffjtExecSessionPID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyExecSessionCommand, kn) {
- currentKey = ffjtExecSessionCommand
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyExecSessionID, kn) {
- currentKey = ffjtExecSessionID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtExecSessionnosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtExecSessionID:
- goto handle_ID
-
- case ffjtExecSessionCommand:
- goto handle_Command
-
- case ffjtExecSessionPID:
- goto handle_PID
-
- case ffjtExecSessionnosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ID:
-
- /* handler: j.ID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Command:
-
- /* handler: j.Command type=[]string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Command = nil
- } else {
-
- j.Command = []string{}
-
- wantVal := true
-
- for {
-
- var tmpJCommand string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJCommand type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJCommand = string(string(outBuf))
-
- }
- }
-
- j.Command = append(j.Command, tmpJCommand)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_PID:
-
- /* handler: j.PID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.PID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *containerState) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *containerState) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{ "state":`)
- fflib.FormatBits2(buf, uint64(j.State), 10, j.State < 0)
- buf.WriteByte(',')
- if len(j.ConfigPath) != 0 {
- buf.WriteString(`"configPath":`)
- fflib.WriteJsonString(buf, string(j.ConfigPath))
- buf.WriteByte(',')
- }
- if len(j.RunDir) != 0 {
- buf.WriteString(`"runDir":`)
- fflib.WriteJsonString(buf, string(j.RunDir))
- buf.WriteByte(',')
- }
- if len(j.DestinationRunDir) != 0 {
- buf.WriteString(`"destinationRunDir":`)
- fflib.WriteJsonString(buf, string(j.DestinationRunDir))
- buf.WriteByte(',')
- }
- if j.Mounted != false {
- if j.Mounted {
- buf.WriteString(`"mounted":true`)
- } else {
- buf.WriteString(`"mounted":false`)
- }
- buf.WriteByte(',')
- }
- if len(j.Mountpoint) != 0 {
- buf.WriteString(`"mountPoint":`)
- fflib.WriteJsonString(buf, string(j.Mountpoint))
- buf.WriteByte(',')
- }
- if len(j.RealMountpoint) != 0 {
- buf.WriteString(`"realMountPoint":`)
- fflib.WriteJsonString(buf, string(j.RealMountpoint))
- buf.WriteByte(',')
- }
- if true {
- buf.WriteString(`"startedTime":`)
-
- {
-
- obj, err = j.StartedTime.MarshalJSON()
- if err != nil {
- return err
- }
- buf.Write(obj)
-
- }
- buf.WriteByte(',')
- }
- if true {
- buf.WriteString(`"finishedTime":`)
-
- {
-
- obj, err = j.FinishedTime.MarshalJSON()
- if err != nil {
- return err
- }
- buf.Write(obj)
-
- }
- buf.WriteByte(',')
- }
- if j.ExitCode != 0 {
- buf.WriteString(`"exitCode":`)
- fflib.FormatBits2(buf, uint64(j.ExitCode), 10, j.ExitCode < 0)
- buf.WriteByte(',')
- }
- if j.Exited != false {
- if j.Exited {
- buf.WriteString(`"exited":true`)
- } else {
- buf.WriteString(`"exited":false`)
- }
- buf.WriteByte(',')
- }
- if j.OOMKilled != false {
- if j.OOMKilled {
- buf.WriteString(`"oomKilled":true`)
- } else {
- buf.WriteString(`"oomKilled":false`)
- }
- buf.WriteByte(',')
- }
- if j.PID != 0 {
- buf.WriteString(`"pid":`)
- fflib.FormatBits2(buf, uint64(j.PID), 10, j.PID < 0)
- buf.WriteByte(',')
- }
- if len(j.ExecSessions) != 0 {
- buf.WriteString(`"execSessions":`)
- /* Falling back. type=map[string]*libpod.ExecSession kind=map */
- err = buf.Encode(j.ExecSessions)
- if err != nil {
- return err
- }
- buf.WriteByte(',')
- }
- if len(j.NetworkStatus) != 0 {
- buf.WriteString(`"networkResults":`)
- if j.NetworkStatus != nil {
- buf.WriteString(`[`)
- for i, v := range j.NetworkStatus {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- /* Struct fall back. type=current.Result kind=struct */
- err = buf.Encode(&v)
- if err != nil {
- return err
- }
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte(',')
- }
- if len(j.BindMounts) != 0 {
- if j.BindMounts == nil {
- buf.WriteString(`"bindMounts":null`)
- } else {
- buf.WriteString(`"bindMounts":{ `)
- for key, value := range j.BindMounts {
- fflib.WriteJsonString(buf, key)
- buf.WriteString(`:`)
- fflib.WriteJsonString(buf, string(value))
- buf.WriteByte(',')
- }
- buf.Rewind(1)
- buf.WriteByte('}')
- }
- buf.WriteByte(',')
- }
- if len(j.UserNSRoot) != 0 {
- buf.WriteString(`"userNSRoot":`)
- fflib.WriteJsonString(buf, string(j.UserNSRoot))
- buf.WriteByte(',')
- }
- if len(j.ExtensionStageHooks) != 0 {
- buf.WriteString(`"extensionStageHooks":`)
- /* Falling back. type=map[string][]specs.Hook kind=map */
- err = buf.Encode(j.ExtensionStageHooks)
- if err != nil {
- return err
- }
- buf.WriteByte(',')
- }
- buf.Rewind(1)
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtcontainerStatebase = iota
- ffjtcontainerStatenosuchkey
-
- ffjtcontainerStateState
-
- ffjtcontainerStateConfigPath
-
- ffjtcontainerStateRunDir
-
- ffjtcontainerStateDestinationRunDir
-
- ffjtcontainerStateMounted
-
- ffjtcontainerStateMountpoint
-
- ffjtcontainerStateRealMountpoint
-
- ffjtcontainerStateStartedTime
-
- ffjtcontainerStateFinishedTime
-
- ffjtcontainerStateExitCode
-
- ffjtcontainerStateExited
-
- ffjtcontainerStateOOMKilled
-
- ffjtcontainerStatePID
-
- ffjtcontainerStateExecSessions
-
- ffjtcontainerStateNetworkStatus
-
- ffjtcontainerStateBindMounts
-
- ffjtcontainerStateUserNSRoot
-
- ffjtcontainerStateExtensionStageHooks
-)
-
-var ffjKeycontainerStateState = []byte("state")
-
-var ffjKeycontainerStateConfigPath = []byte("configPath")
-
-var ffjKeycontainerStateRunDir = []byte("runDir")
-
-var ffjKeycontainerStateDestinationRunDir = []byte("destinationRunDir")
-
-var ffjKeycontainerStateMounted = []byte("mounted")
-
-var ffjKeycontainerStateMountpoint = []byte("mountPoint")
-
-var ffjKeycontainerStateRealMountpoint = []byte("realMountPoint")
-
-var ffjKeycontainerStateStartedTime = []byte("startedTime")
-
-var ffjKeycontainerStateFinishedTime = []byte("finishedTime")
-
-var ffjKeycontainerStateExitCode = []byte("exitCode")
-
-var ffjKeycontainerStateExited = []byte("exited")
-
-var ffjKeycontainerStateOOMKilled = []byte("oomKilled")
-
-var ffjKeycontainerStatePID = []byte("pid")
-
-var ffjKeycontainerStateExecSessions = []byte("execSessions")
-
-var ffjKeycontainerStateNetworkStatus = []byte("networkResults")
-
-var ffjKeycontainerStateBindMounts = []byte("bindMounts")
-
-var ffjKeycontainerStateUserNSRoot = []byte("userNSRoot")
-
-var ffjKeycontainerStateExtensionStageHooks = []byte("extensionStageHooks")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *containerState) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *containerState) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtcontainerStatebase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtcontainerStatenosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'b':
-
- if bytes.Equal(ffjKeycontainerStateBindMounts, kn) {
- currentKey = ffjtcontainerStateBindMounts
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'c':
-
- if bytes.Equal(ffjKeycontainerStateConfigPath, kn) {
- currentKey = ffjtcontainerStateConfigPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'd':
-
- if bytes.Equal(ffjKeycontainerStateDestinationRunDir, kn) {
- currentKey = ffjtcontainerStateDestinationRunDir
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'e':
-
- if bytes.Equal(ffjKeycontainerStateExitCode, kn) {
- currentKey = ffjtcontainerStateExitCode
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeycontainerStateExited, kn) {
- currentKey = ffjtcontainerStateExited
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeycontainerStateExecSessions, kn) {
- currentKey = ffjtcontainerStateExecSessions
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeycontainerStateExtensionStageHooks, kn) {
- currentKey = ffjtcontainerStateExtensionStageHooks
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'f':
-
- if bytes.Equal(ffjKeycontainerStateFinishedTime, kn) {
- currentKey = ffjtcontainerStateFinishedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'm':
-
- if bytes.Equal(ffjKeycontainerStateMounted, kn) {
- currentKey = ffjtcontainerStateMounted
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeycontainerStateMountpoint, kn) {
- currentKey = ffjtcontainerStateMountpoint
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffjKeycontainerStateNetworkStatus, kn) {
- currentKey = ffjtcontainerStateNetworkStatus
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'o':
-
- if bytes.Equal(ffjKeycontainerStateOOMKilled, kn) {
- currentKey = ffjtcontainerStateOOMKilled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffjKeycontainerStatePID, kn) {
- currentKey = ffjtcontainerStatePID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffjKeycontainerStateRunDir, kn) {
- currentKey = ffjtcontainerStateRunDir
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeycontainerStateRealMountpoint, kn) {
- currentKey = ffjtcontainerStateRealMountpoint
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffjKeycontainerStateState, kn) {
- currentKey = ffjtcontainerStateState
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeycontainerStateStartedTime, kn) {
- currentKey = ffjtcontainerStateStartedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffjKeycontainerStateUserNSRoot, kn) {
- currentKey = ffjtcontainerStateUserNSRoot
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateExtensionStageHooks, kn) {
- currentKey = ffjtcontainerStateExtensionStageHooks
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateUserNSRoot, kn) {
- currentKey = ffjtcontainerStateUserNSRoot
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateBindMounts, kn) {
- currentKey = ffjtcontainerStateBindMounts
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateNetworkStatus, kn) {
- currentKey = ffjtcontainerStateNetworkStatus
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateExecSessions, kn) {
- currentKey = ffjtcontainerStateExecSessions
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStatePID, kn) {
- currentKey = ffjtcontainerStatePID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateOOMKilled, kn) {
- currentKey = ffjtcontainerStateOOMKilled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateExited, kn) {
- currentKey = ffjtcontainerStateExited
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateExitCode, kn) {
- currentKey = ffjtcontainerStateExitCode
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateFinishedTime, kn) {
- currentKey = ffjtcontainerStateFinishedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateStartedTime, kn) {
- currentKey = ffjtcontainerStateStartedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateRealMountpoint, kn) {
- currentKey = ffjtcontainerStateRealMountpoint
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateMountpoint, kn) {
- currentKey = ffjtcontainerStateMountpoint
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateMounted, kn) {
- currentKey = ffjtcontainerStateMounted
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateDestinationRunDir, kn) {
- currentKey = ffjtcontainerStateDestinationRunDir
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateRunDir, kn) {
- currentKey = ffjtcontainerStateRunDir
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeycontainerStateConfigPath, kn) {
- currentKey = ffjtcontainerStateConfigPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeycontainerStateState, kn) {
- currentKey = ffjtcontainerStateState
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtcontainerStatenosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtcontainerStateState:
- goto handle_State
-
- case ffjtcontainerStateConfigPath:
- goto handle_ConfigPath
-
- case ffjtcontainerStateRunDir:
- goto handle_RunDir
-
- case ffjtcontainerStateDestinationRunDir:
- goto handle_DestinationRunDir
-
- case ffjtcontainerStateMounted:
- goto handle_Mounted
-
- case ffjtcontainerStateMountpoint:
- goto handle_Mountpoint
-
- case ffjtcontainerStateRealMountpoint:
- goto handle_RealMountpoint
-
- case ffjtcontainerStateStartedTime:
- goto handle_StartedTime
-
- case ffjtcontainerStateFinishedTime:
- goto handle_FinishedTime
-
- case ffjtcontainerStateExitCode:
- goto handle_ExitCode
-
- case ffjtcontainerStateExited:
- goto handle_Exited
-
- case ffjtcontainerStateOOMKilled:
- goto handle_OOMKilled
-
- case ffjtcontainerStatePID:
- goto handle_PID
-
- case ffjtcontainerStateExecSessions:
- goto handle_ExecSessions
-
- case ffjtcontainerStateNetworkStatus:
- goto handle_NetworkStatus
-
- case ffjtcontainerStateBindMounts:
- goto handle_BindMounts
-
- case ffjtcontainerStateUserNSRoot:
- goto handle_UserNSRoot
-
- case ffjtcontainerStateExtensionStageHooks:
- goto handle_ExtensionStageHooks
-
- case ffjtcontainerStatenosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_State:
-
- /* handler: j.State type=libpod.ContainerStatus kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ContainerStatus", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.State = ContainerStatus(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ConfigPath:
-
- /* handler: j.ConfigPath type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ConfigPath = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RunDir:
-
- /* handler: j.RunDir type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.RunDir = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DestinationRunDir:
-
- /* handler: j.DestinationRunDir type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.DestinationRunDir = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Mounted:
-
- /* handler: j.Mounted type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.Mounted = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.Mounted = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Mountpoint:
-
- /* handler: j.Mountpoint type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Mountpoint = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RealMountpoint:
-
- /* handler: j.RealMountpoint type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.RealMountpoint = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_StartedTime:
-
- /* handler: j.StartedTime type=time.Time kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
-
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = j.StartedTime.UnmarshalJSON(tbuf)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FinishedTime:
-
- /* handler: j.FinishedTime type=time.Time kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
-
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = j.FinishedTime.UnmarshalJSON(tbuf)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ExitCode:
-
- /* handler: j.ExitCode type=int32 kind=int32 quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.ExitCode = int32(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Exited:
-
- /* handler: j.Exited type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.Exited = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.Exited = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_OOMKilled:
-
- /* handler: j.OOMKilled type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.OOMKilled = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.OOMKilled = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_PID:
-
- /* handler: j.PID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- j.PID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ExecSessions:
-
- /* handler: j.ExecSessions type=map[string]*libpod.ExecSession kind=map quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_bracket && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.ExecSessions = nil
- } else {
-
- j.ExecSessions = make(map[string]*ExecSession, 0)
-
- wantVal := true
-
- for {
-
- var k string
-
- var tmpJExecSessions *ExecSession
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_bracket {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: k type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- k = string(string(outBuf))
-
- }
- }
-
- // Expect ':' after key
- tok = fs.Scan()
- if tok != fflib.FFTok_colon {
- return fs.WrapErr(fmt.Errorf("wanted colon token, but got token: %v", tok))
- }
-
- tok = fs.Scan()
- /* handler: tmpJExecSessions type=*libpod.ExecSession kind=ptr quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- tmpJExecSessions = nil
-
- } else {
-
- if tmpJExecSessions == nil {
- tmpJExecSessions = new(ExecSession)
- }
-
- err = tmpJExecSessions.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- }
- state = fflib.FFParse_after_value
- }
-
- j.ExecSessions[k] = tmpJExecSessions
-
- wantVal = false
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_NetworkStatus:
-
- /* handler: j.NetworkStatus type=[]*current.Result kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.NetworkStatus = nil
- } else {
-
- j.NetworkStatus = []*current.Result{}
-
- wantVal := true
-
- for {
-
- var tmpJNetworkStatus *current.Result
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJNetworkStatus type=*current.Result kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmpJNetworkStatus = nil
- } else {
- if tmpJNetworkStatus == nil {
- tmpJNetworkStatus = new(current.Result)
- }
-
- /* handler: tmpJNetworkStatus type=current.Result kind=struct quoted=false*/
-
- {
- /* Falling back. type=current.Result kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &tmpJNetworkStatus)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- }
- }
-
- j.NetworkStatus = append(j.NetworkStatus, tmpJNetworkStatus)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_BindMounts:
-
- /* handler: j.BindMounts type=map[string]string kind=map quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_bracket && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.BindMounts = nil
- } else {
-
- j.BindMounts = make(map[string]string, 0)
-
- wantVal := true
-
- for {
-
- var k string
-
- var tmpJBindMounts string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_bracket {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: k type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- k = string(string(outBuf))
-
- }
- }
-
- // Expect ':' after key
- tok = fs.Scan()
- if tok != fflib.FFTok_colon {
- return fs.WrapErr(fmt.Errorf("wanted colon token, but got token: %v", tok))
- }
-
- tok = fs.Scan()
- /* handler: tmpJBindMounts type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJBindMounts = string(string(outBuf))
-
- }
- }
-
- j.BindMounts[k] = tmpJBindMounts
-
- wantVal = false
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UserNSRoot:
-
- /* handler: j.UserNSRoot type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.UserNSRoot = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ExtensionStageHooks:
-
- /* handler: j.ExtensionStageHooks type=map[string][]specs.Hook kind=map quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_bracket && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.ExtensionStageHooks = nil
- } else {
-
- j.ExtensionStageHooks = make(map[string][]specs.Hook, 0)
-
- wantVal := true
-
- for {
-
- var k string
-
- var tmpJExtensionStageHooks []specs.Hook
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_bracket {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: k type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- k = string(string(outBuf))
-
- }
- }
-
- // Expect ':' after key
- tok = fs.Scan()
- if tok != fflib.FFTok_colon {
- return fs.WrapErr(fmt.Errorf("wanted colon token, but got token: %v", tok))
- }
-
- tok = fs.Scan()
- /* handler: tmpJExtensionStageHooks type=[]specs.Hook kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- tmpJExtensionStageHooks = nil
- } else {
-
- tmpJExtensionStageHooks = []specs.Hook{}
-
- wantVal := true
-
- for {
-
- var tmpTmpJExtensionStageHooks specs.Hook
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpTmpJExtensionStageHooks type=specs.Hook kind=struct quoted=false*/
-
- {
- /* Falling back. type=specs.Hook kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &tmpTmpJExtensionStageHooks)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- tmpJExtensionStageHooks = append(tmpJExtensionStageHooks, tmpTmpJExtensionStageHooks)
-
- wantVal = false
- }
- }
- }
-
- j.ExtensionStageHooks[k] = tmpJExtensionStageHooks
-
- wantVal = false
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
diff --git a/libpod/pod.go b/libpod/pod.go
index 9c7a3e3a3..8ac976f6a 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -29,6 +29,7 @@ type Pod struct {
}
// PodConfig represents a pod's static configuration
+// easyjson:json
type PodConfig struct {
ID string `json:"id"`
Name string `json:"name"`
@@ -61,6 +62,7 @@ type PodConfig struct {
}
// podState represents a pod's state
+// easyjson:json
type podState struct {
// CgroupPath is the path to the pod's CGroup
CgroupPath string `json:"cgroupPath"`
@@ -71,6 +73,7 @@ type podState struct {
// PodInspect represents the data we want to display for
// podman pod inspect
+// easyjson:json
type PodInspect struct {
Config *PodConfig
State *PodInspectState
@@ -78,12 +81,14 @@ type PodInspect struct {
}
// PodInspectState contains inspect data on the pod's state
+// easyjson:json
type PodInspectState struct {
CgroupPath string `json:"cgroupPath"`
InfraContainerID string `json:"infraContainerID"`
}
// PodContainerInfo keeps information on a container in a pod
+// easyjson:json
type PodContainerInfo struct {
ID string `json:"id"`
State string `json:"state"`
diff --git a/libpod/pod_easyjson.go b/libpod/pod_easyjson.go
new file mode 100644
index 000000000..1074d4e35
--- /dev/null
+++ b/libpod/pod_easyjson.go
@@ -0,0 +1,574 @@
+// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
+
+package libpod
+
+import (
+ json "encoding/json"
+ easyjson "github.com/mailru/easyjson"
+ jlexer "github.com/mailru/easyjson/jlexer"
+ jwriter "github.com/mailru/easyjson/jwriter"
+)
+
+// suppress unused package warning
+var (
+ _ *json.RawMessage
+ _ *jlexer.Lexer
+ _ *jwriter.Writer
+ _ easyjson.Marshaler
+)
+
+func easyjsonBe091417DecodeGithubComContainersLibpodLibpod(in *jlexer.Lexer, out *podState) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "cgroupPath":
+ out.CgroupPath = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonBe091417EncodeGithubComContainersLibpodLibpod(out *jwriter.Writer, in podState) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"cgroupPath\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CgroupPath))
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v podState) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v podState) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *podState) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *podState) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod(l, v)
+}
+func easyjsonBe091417DecodeGithubComContainersLibpodLibpod1(in *jlexer.Lexer, out *PodInspectState) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "cgroupPath":
+ out.CgroupPath = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonBe091417EncodeGithubComContainersLibpodLibpod1(out *jwriter.Writer, in PodInspectState) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"cgroupPath\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CgroupPath))
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v PodInspectState) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod1(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v PodInspectState) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod1(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *PodInspectState) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod1(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *PodInspectState) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod1(l, v)
+}
+func easyjsonBe091417DecodeGithubComContainersLibpodLibpod2(in *jlexer.Lexer, out *PodInspect) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "Config":
+ if in.IsNull() {
+ in.Skip()
+ out.Config = nil
+ } else {
+ if out.Config == nil {
+ out.Config = new(PodConfig)
+ }
+ (*out.Config).UnmarshalEasyJSON(in)
+ }
+ case "State":
+ if in.IsNull() {
+ in.Skip()
+ out.State = nil
+ } else {
+ if out.State == nil {
+ out.State = new(PodInspectState)
+ }
+ (*out.State).UnmarshalEasyJSON(in)
+ }
+ case "Containers":
+ if in.IsNull() {
+ in.Skip()
+ out.Containers = nil
+ } else {
+ in.Delim('[')
+ if out.Containers == nil {
+ if !in.IsDelim(']') {
+ out.Containers = make([]PodContainerInfo, 0, 2)
+ } else {
+ out.Containers = []PodContainerInfo{}
+ }
+ } else {
+ out.Containers = (out.Containers)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v1 PodContainerInfo
+ (v1).UnmarshalEasyJSON(in)
+ out.Containers = append(out.Containers, v1)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonBe091417EncodeGithubComContainersLibpodLibpod2(out *jwriter.Writer, in PodInspect) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"Config\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Config == nil {
+ out.RawString("null")
+ } else {
+ (*in.Config).MarshalEasyJSON(out)
+ }
+ }
+ {
+ const prefix string = ",\"State\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.State == nil {
+ out.RawString("null")
+ } else {
+ (*in.State).MarshalEasyJSON(out)
+ }
+ }
+ {
+ const prefix string = ",\"Containers\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Containers == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v2, v3 := range in.Containers {
+ if v2 > 0 {
+ out.RawByte(',')
+ }
+ (v3).MarshalEasyJSON(out)
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v PodInspect) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod2(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v PodInspect) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod2(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *PodInspect) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod2(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *PodInspect) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod2(l, v)
+}
+func easyjsonBe091417DecodeGithubComContainersLibpodLibpod3(in *jlexer.Lexer, out *PodContainerInfo) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "id":
+ out.ID = string(in.String())
+ case "state":
+ out.State = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonBe091417EncodeGithubComContainersLibpodLibpod3(out *jwriter.Writer, in PodContainerInfo) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"id\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ID))
+ }
+ {
+ const prefix string = ",\"state\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.State))
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v PodContainerInfo) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod3(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v PodContainerInfo) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod3(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *PodContainerInfo) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod3(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *PodContainerInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod3(l, v)
+}
+func easyjsonBe091417DecodeGithubComContainersLibpodLibpod4(in *jlexer.Lexer, out *PodConfig) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "id":
+ out.ID = string(in.String())
+ case "name":
+ out.Name = string(in.String())
+ case "namespace":
+ out.Namespace = string(in.String())
+ case "labels":
+ if in.IsNull() {
+ in.Skip()
+ } else {
+ in.Delim('{')
+ if !in.IsDelim('}') {
+ out.Labels = make(map[string]string)
+ } else {
+ out.Labels = nil
+ }
+ for !in.IsDelim('}') {
+ key := string(in.String())
+ in.WantColon()
+ var v4 string
+ v4 = string(in.String())
+ (out.Labels)[key] = v4
+ in.WantComma()
+ }
+ in.Delim('}')
+ }
+ case "cgroupParent":
+ out.CgroupParent = string(in.String())
+ case "usePodCgroup":
+ out.UsePodCgroup = bool(in.Bool())
+ case "created":
+ if data := in.Raw(); in.Ok() {
+ in.AddError((out.CreatedTime).UnmarshalJSON(data))
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonBe091417EncodeGithubComContainersLibpodLibpod4(out *jwriter.Writer, in PodConfig) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ {
+ const prefix string = ",\"id\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.ID))
+ }
+ {
+ const prefix string = ",\"name\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Name))
+ }
+ if in.Namespace != "" {
+ const prefix string = ",\"namespace\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.Namespace))
+ }
+ {
+ const prefix string = ",\"labels\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ if in.Labels == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
+ out.RawString(`null`)
+ } else {
+ out.RawByte('{')
+ v5First := true
+ for v5Name, v5Value := range in.Labels {
+ if v5First {
+ v5First = false
+ } else {
+ out.RawByte(',')
+ }
+ out.String(string(v5Name))
+ out.RawByte(':')
+ out.String(string(v5Value))
+ }
+ out.RawByte('}')
+ }
+ }
+ {
+ const prefix string = ",\"cgroupParent\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.String(string(in.CgroupParent))
+ }
+ {
+ const prefix string = ",\"usePodCgroup\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.UsePodCgroup))
+ }
+ {
+ const prefix string = ",\"created\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Raw((in.CreatedTime).MarshalJSON())
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v PodConfig) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod4(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v PodConfig) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonBe091417EncodeGithubComContainersLibpodLibpod4(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *PodConfig) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod4(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *PodConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonBe091417DecodeGithubComContainersLibpodLibpod4(l, v)
+}
diff --git a/libpod/pod_ffjson.go b/libpod/pod_ffjson.go
deleted file mode 100644
index 76781dbbd..000000000
--- a/libpod/pod_ffjson.go
+++ /dev/null
@@ -1,2681 +0,0 @@
-// Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
-// source: /home/pehunt/go/src/github.com/containers/libpod/libpod/pod.go
-
-package libpod
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- fflib "github.com/pquerna/ffjson/fflib/v1"
-)
-
-// MarshalJSON marshal bytes to json - template
-func (j *InfraContainerConfig) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *InfraContainerConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if j.HasInfraContainer {
- buf.WriteString(`{"makeInfraContainer":true`)
- } else {
- buf.WriteString(`{"makeInfraContainer":false`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtInfraContainerConfigbase = iota
- ffjtInfraContainerConfignosuchkey
-
- ffjtInfraContainerConfigHasInfraContainer
-)
-
-var ffjKeyInfraContainerConfigHasInfraContainer = []byte("makeInfraContainer")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *InfraContainerConfig) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *InfraContainerConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtInfraContainerConfigbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtInfraContainerConfignosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'm':
-
- if bytes.Equal(ffjKeyInfraContainerConfigHasInfraContainer, kn) {
- currentKey = ffjtInfraContainerConfigHasInfraContainer
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffjKeyInfraContainerConfigHasInfraContainer, kn) {
- currentKey = ffjtInfraContainerConfigHasInfraContainer
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtInfraContainerConfignosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtInfraContainerConfigHasInfraContainer:
- goto handle_HasInfraContainer
-
- case ffjtInfraContainerConfignosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_HasInfraContainer:
-
- /* handler: j.HasInfraContainer type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.HasInfraContainer = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.HasInfraContainer = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *PodConfig) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *PodConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"id":`)
- fflib.WriteJsonString(buf, string(j.ID))
- buf.WriteString(`,"name":`)
- fflib.WriteJsonString(buf, string(j.Name))
- buf.WriteByte(',')
- if len(j.Namespace) != 0 {
- buf.WriteString(`"namespace":`)
- fflib.WriteJsonString(buf, string(j.Namespace))
- buf.WriteByte(',')
- }
- if j.Labels == nil {
- buf.WriteString(`"labels":null`)
- } else {
- buf.WriteString(`"labels":{ `)
- for key, value := range j.Labels {
- fflib.WriteJsonString(buf, key)
- buf.WriteString(`:`)
- fflib.WriteJsonString(buf, string(value))
- buf.WriteByte(',')
- }
- buf.Rewind(1)
- buf.WriteByte('}')
- }
- buf.WriteString(`,"cgroupParent":`)
- fflib.WriteJsonString(buf, string(j.CgroupParent))
- buf.WriteByte(',')
- if j.UsePodCgroup != false {
- if j.UsePodCgroup {
- buf.WriteString(`"sharesCgroup":true`)
- } else {
- buf.WriteString(`"sharesCgroup":false`)
- }
- buf.WriteByte(',')
- }
- if j.UsePodPID != false {
- if j.UsePodPID {
- buf.WriteString(`"sharesPid":true`)
- } else {
- buf.WriteString(`"sharesPid":false`)
- }
- buf.WriteByte(',')
- }
- if j.UsePodIPC != false {
- if j.UsePodIPC {
- buf.WriteString(`"sharesIpc":true`)
- } else {
- buf.WriteString(`"sharesIpc":false`)
- }
- buf.WriteByte(',')
- }
- if j.UsePodNet != false {
- if j.UsePodNet {
- buf.WriteString(`"sharesNet":true`)
- } else {
- buf.WriteString(`"sharesNet":false`)
- }
- buf.WriteByte(',')
- }
- if j.UsePodMount != false {
- if j.UsePodMount {
- buf.WriteString(`"sharesMnt":true`)
- } else {
- buf.WriteString(`"sharesMnt":false`)
- }
- buf.WriteByte(',')
- }
- if j.UsePodUser != false {
- if j.UsePodUser {
- buf.WriteString(`"sharesUser":true`)
- } else {
- buf.WriteString(`"sharesUser":false`)
- }
- buf.WriteByte(',')
- }
- if j.UsePodUTS != false {
- if j.UsePodUTS {
- buf.WriteString(`"sharesUts":true`)
- } else {
- buf.WriteString(`"sharesUts":false`)
- }
- buf.WriteByte(',')
- }
- if j.InfraContainer != nil {
- buf.WriteString(`"infraConfig":`)
-
- {
-
- err = j.InfraContainer.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- } else {
- buf.WriteString(`"infraConfig":null`)
- }
- buf.WriteString(`,"created":`)
-
- {
-
- obj, err = j.CreatedTime.MarshalJSON()
- if err != nil {
- return err
- }
- buf.Write(obj)
-
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtPodConfigbase = iota
- ffjtPodConfignosuchkey
-
- ffjtPodConfigID
-
- ffjtPodConfigName
-
- ffjtPodConfigNamespace
-
- ffjtPodConfigLabels
-
- ffjtPodConfigCgroupParent
-
- ffjtPodConfigUsePodCgroup
-
- ffjtPodConfigUsePodPID
-
- ffjtPodConfigUsePodIPC
-
- ffjtPodConfigUsePodNet
-
- ffjtPodConfigUsePodMount
-
- ffjtPodConfigUsePodUser
-
- ffjtPodConfigUsePodUTS
-
- ffjtPodConfigInfraContainer
-
- ffjtPodConfigCreatedTime
-)
-
-var ffjKeyPodConfigID = []byte("id")
-
-var ffjKeyPodConfigName = []byte("name")
-
-var ffjKeyPodConfigNamespace = []byte("namespace")
-
-var ffjKeyPodConfigLabels = []byte("labels")
-
-var ffjKeyPodConfigCgroupParent = []byte("cgroupParent")
-
-var ffjKeyPodConfigUsePodCgroup = []byte("sharesCgroup")
-
-var ffjKeyPodConfigUsePodPID = []byte("sharesPid")
-
-var ffjKeyPodConfigUsePodIPC = []byte("sharesIpc")
-
-var ffjKeyPodConfigUsePodNet = []byte("sharesNet")
-
-var ffjKeyPodConfigUsePodMount = []byte("sharesMnt")
-
-var ffjKeyPodConfigUsePodUser = []byte("sharesUser")
-
-var ffjKeyPodConfigUsePodUTS = []byte("sharesUts")
-
-var ffjKeyPodConfigInfraContainer = []byte("infraConfig")
-
-var ffjKeyPodConfigCreatedTime = []byte("created")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *PodConfig) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *PodConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtPodConfigbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtPodConfignosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffjKeyPodConfigCgroupParent, kn) {
- currentKey = ffjtPodConfigCgroupParent
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigCreatedTime, kn) {
- currentKey = ffjtPodConfigCreatedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffjKeyPodConfigID, kn) {
- currentKey = ffjtPodConfigID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigInfraContainer, kn) {
- currentKey = ffjtPodConfigInfraContainer
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'l':
-
- if bytes.Equal(ffjKeyPodConfigLabels, kn) {
- currentKey = ffjtPodConfigLabels
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffjKeyPodConfigName, kn) {
- currentKey = ffjtPodConfigName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigNamespace, kn) {
- currentKey = ffjtPodConfigNamespace
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffjKeyPodConfigUsePodCgroup, kn) {
- currentKey = ffjtPodConfigUsePodCgroup
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigUsePodPID, kn) {
- currentKey = ffjtPodConfigUsePodPID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigUsePodIPC, kn) {
- currentKey = ffjtPodConfigUsePodIPC
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigUsePodNet, kn) {
- currentKey = ffjtPodConfigUsePodNet
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigUsePodMount, kn) {
- currentKey = ffjtPodConfigUsePodMount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigUsePodUser, kn) {
- currentKey = ffjtPodConfigUsePodUser
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodConfigUsePodUTS, kn) {
- currentKey = ffjtPodConfigUsePodUTS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodConfigCreatedTime, kn) {
- currentKey = ffjtPodConfigCreatedTime
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodConfigInfraContainer, kn) {
- currentKey = ffjtPodConfigInfraContainer
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodUTS, kn) {
- currentKey = ffjtPodConfigUsePodUTS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodUser, kn) {
- currentKey = ffjtPodConfigUsePodUser
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodMount, kn) {
- currentKey = ffjtPodConfigUsePodMount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodNet, kn) {
- currentKey = ffjtPodConfigUsePodNet
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodIPC, kn) {
- currentKey = ffjtPodConfigUsePodIPC
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodPID, kn) {
- currentKey = ffjtPodConfigUsePodPID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigUsePodCgroup, kn) {
- currentKey = ffjtPodConfigUsePodCgroup
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodConfigCgroupParent, kn) {
- currentKey = ffjtPodConfigCgroupParent
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigLabels, kn) {
- currentKey = ffjtPodConfigLabels
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodConfigNamespace, kn) {
- currentKey = ffjtPodConfigNamespace
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodConfigName, kn) {
- currentKey = ffjtPodConfigName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodConfigID, kn) {
- currentKey = ffjtPodConfigID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtPodConfignosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtPodConfigID:
- goto handle_ID
-
- case ffjtPodConfigName:
- goto handle_Name
-
- case ffjtPodConfigNamespace:
- goto handle_Namespace
-
- case ffjtPodConfigLabels:
- goto handle_Labels
-
- case ffjtPodConfigCgroupParent:
- goto handle_CgroupParent
-
- case ffjtPodConfigUsePodCgroup:
- goto handle_UsePodCgroup
-
- case ffjtPodConfigUsePodPID:
- goto handle_UsePodPID
-
- case ffjtPodConfigUsePodIPC:
- goto handle_UsePodIPC
-
- case ffjtPodConfigUsePodNet:
- goto handle_UsePodNet
-
- case ffjtPodConfigUsePodMount:
- goto handle_UsePodMount
-
- case ffjtPodConfigUsePodUser:
- goto handle_UsePodUser
-
- case ffjtPodConfigUsePodUTS:
- goto handle_UsePodUTS
-
- case ffjtPodConfigInfraContainer:
- goto handle_InfraContainer
-
- case ffjtPodConfigCreatedTime:
- goto handle_CreatedTime
-
- case ffjtPodConfignosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ID:
-
- /* handler: j.ID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Name:
-
- /* handler: j.Name type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Name = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Namespace:
-
- /* handler: j.Namespace type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.Namespace = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Labels:
-
- /* handler: j.Labels type=map[string]string kind=map quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_bracket && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Labels = nil
- } else {
-
- j.Labels = make(map[string]string, 0)
-
- wantVal := true
-
- for {
-
- var k string
-
- var tmpJLabels string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_bracket {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: k type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- k = string(string(outBuf))
-
- }
- }
-
- // Expect ':' after key
- tok = fs.Scan()
- if tok != fflib.FFTok_colon {
- return fs.WrapErr(fmt.Errorf("wanted colon token, but got token: %v", tok))
- }
-
- tok = fs.Scan()
- /* handler: tmpJLabels type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- tmpJLabels = string(string(outBuf))
-
- }
- }
-
- j.Labels[k] = tmpJLabels
-
- wantVal = false
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CgroupParent:
-
- /* handler: j.CgroupParent type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.CgroupParent = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodCgroup:
-
- /* handler: j.UsePodCgroup type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodCgroup = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodCgroup = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodPID:
-
- /* handler: j.UsePodPID type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodPID = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodPID = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodIPC:
-
- /* handler: j.UsePodIPC type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodIPC = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodIPC = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodNet:
-
- /* handler: j.UsePodNet type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodNet = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodNet = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodMount:
-
- /* handler: j.UsePodMount type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodMount = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodMount = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodUser:
-
- /* handler: j.UsePodUser type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodUser = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodUser = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UsePodUTS:
-
- /* handler: j.UsePodUTS type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- j.UsePodUTS = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- j.UsePodUTS = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InfraContainer:
-
- /* handler: j.InfraContainer type=libpod.InfraContainerConfig kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- j.InfraContainer = nil
-
- } else {
-
- if j.InfraContainer == nil {
- j.InfraContainer = new(InfraContainerConfig)
- }
-
- err = j.InfraContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreatedTime:
-
- /* handler: j.CreatedTime type=time.Time kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
-
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = j.CreatedTime.UnmarshalJSON(tbuf)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *PodContainerInfo) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *PodContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"id":`)
- fflib.WriteJsonString(buf, string(j.ID))
- buf.WriteString(`,"state":`)
- fflib.WriteJsonString(buf, string(j.State))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtPodContainerInfobase = iota
- ffjtPodContainerInfonosuchkey
-
- ffjtPodContainerInfoID
-
- ffjtPodContainerInfoState
-)
-
-var ffjKeyPodContainerInfoID = []byte("id")
-
-var ffjKeyPodContainerInfoState = []byte("state")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *PodContainerInfo) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *PodContainerInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtPodContainerInfobase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtPodContainerInfonosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'i':
-
- if bytes.Equal(ffjKeyPodContainerInfoID, kn) {
- currentKey = ffjtPodContainerInfoID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffjKeyPodContainerInfoState, kn) {
- currentKey = ffjtPodContainerInfoState
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffjKeyPodContainerInfoState, kn) {
- currentKey = ffjtPodContainerInfoState
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodContainerInfoID, kn) {
- currentKey = ffjtPodContainerInfoID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtPodContainerInfonosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtPodContainerInfoID:
- goto handle_ID
-
- case ffjtPodContainerInfoState:
- goto handle_State
-
- case ffjtPodContainerInfonosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ID:
-
- /* handler: j.ID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.ID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_State:
-
- /* handler: j.State type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.State = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *PodContainerStats) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *PodContainerStats) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if j.Pod != nil {
- /* Struct fall back. type=libpod.Pod kind=struct */
- buf.WriteString(`{"Pod":`)
- err = buf.Encode(j.Pod)
- if err != nil {
- return err
- }
- } else {
- buf.WriteString(`{"Pod":null`)
- }
- buf.WriteString(`,"ContainerStats":`)
- /* Falling back. type=map[string]*libpod.ContainerStats kind=map */
- err = buf.Encode(j.ContainerStats)
- if err != nil {
- return err
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtPodContainerStatsbase = iota
- ffjtPodContainerStatsnosuchkey
-
- ffjtPodContainerStatsPod
-
- ffjtPodContainerStatsContainerStats
-)
-
-var ffjKeyPodContainerStatsPod = []byte("Pod")
-
-var ffjKeyPodContainerStatsContainerStats = []byte("ContainerStats")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *PodContainerStats) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *PodContainerStats) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtPodContainerStatsbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtPodContainerStatsnosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'C':
-
- if bytes.Equal(ffjKeyPodContainerStatsContainerStats, kn) {
- currentKey = ffjtPodContainerStatsContainerStats
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'P':
-
- if bytes.Equal(ffjKeyPodContainerStatsPod, kn) {
- currentKey = ffjtPodContainerStatsPod
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffjKeyPodContainerStatsContainerStats, kn) {
- currentKey = ffjtPodContainerStatsContainerStats
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodContainerStatsPod, kn) {
- currentKey = ffjtPodContainerStatsPod
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtPodContainerStatsnosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtPodContainerStatsPod:
- goto handle_Pod
-
- case ffjtPodContainerStatsContainerStats:
- goto handle_ContainerStats
-
- case ffjtPodContainerStatsnosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Pod:
-
- /* handler: j.Pod type=libpod.Pod kind=struct quoted=false*/
-
- {
- /* Falling back. type=libpod.Pod kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &j.Pod)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ContainerStats:
-
- /* handler: j.ContainerStats type=map[string]*libpod.ContainerStats kind=map quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_bracket && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.ContainerStats = nil
- } else {
-
- j.ContainerStats = make(map[string]*ContainerStats, 0)
-
- wantVal := true
-
- for {
-
- var k string
-
- var tmpJContainerStats *ContainerStats
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_bracket {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: k type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- k = string(string(outBuf))
-
- }
- }
-
- // Expect ':' after key
- tok = fs.Scan()
- if tok != fflib.FFTok_colon {
- return fs.WrapErr(fmt.Errorf("wanted colon token, but got token: %v", tok))
- }
-
- tok = fs.Scan()
- /* handler: tmpJContainerStats type=*libpod.ContainerStats kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmpJContainerStats = nil
- } else {
- if tmpJContainerStats == nil {
- tmpJContainerStats = new(ContainerStats)
- }
-
- /* handler: tmpJContainerStats type=libpod.ContainerStats kind=struct quoted=false*/
-
- {
- /* Falling back. type=libpod.ContainerStats kind=struct */
- tbuf, err := fs.CaptureField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
-
- err = json.Unmarshal(tbuf, &tmpJContainerStats)
- if err != nil {
- return fs.WrapErr(err)
- }
- }
-
- }
- }
-
- j.ContainerStats[k] = tmpJContainerStats
-
- wantVal = false
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *PodInspect) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *PodInspect) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if j.Config != nil {
- buf.WriteString(`{"Config":`)
-
- {
-
- err = j.Config.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- } else {
- buf.WriteString(`{"Config":null`)
- }
- if j.State != nil {
- buf.WriteString(`,"State":`)
-
- {
-
- err = j.State.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- } else {
- buf.WriteString(`,"State":null`)
- }
- buf.WriteString(`,"Containers":`)
- if j.Containers != nil {
- buf.WriteString(`[`)
- for i, v := range j.Containers {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtPodInspectbase = iota
- ffjtPodInspectnosuchkey
-
- ffjtPodInspectConfig
-
- ffjtPodInspectState
-
- ffjtPodInspectContainers
-)
-
-var ffjKeyPodInspectConfig = []byte("Config")
-
-var ffjKeyPodInspectState = []byte("State")
-
-var ffjKeyPodInspectContainers = []byte("Containers")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *PodInspect) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *PodInspect) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtPodInspectbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtPodInspectnosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'C':
-
- if bytes.Equal(ffjKeyPodInspectConfig, kn) {
- currentKey = ffjtPodInspectConfig
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffjKeyPodInspectContainers, kn) {
- currentKey = ffjtPodInspectContainers
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'S':
-
- if bytes.Equal(ffjKeyPodInspectState, kn) {
- currentKey = ffjtPodInspectState
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffjKeyPodInspectContainers, kn) {
- currentKey = ffjtPodInspectContainers
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffjKeyPodInspectState, kn) {
- currentKey = ffjtPodInspectState
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodInspectConfig, kn) {
- currentKey = ffjtPodInspectConfig
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtPodInspectnosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtPodInspectConfig:
- goto handle_Config
-
- case ffjtPodInspectState:
- goto handle_State
-
- case ffjtPodInspectContainers:
- goto handle_Containers
-
- case ffjtPodInspectnosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Config:
-
- /* handler: j.Config type=libpod.PodConfig kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- j.Config = nil
-
- } else {
-
- if j.Config == nil {
- j.Config = new(PodConfig)
- }
-
- err = j.Config.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_State:
-
- /* handler: j.State type=libpod.PodInspectState kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- j.State = nil
-
- } else {
-
- if j.State == nil {
- j.State = new(PodInspectState)
- }
-
- err = j.State.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Containers:
-
- /* handler: j.Containers type=[]libpod.PodContainerInfo kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- j.Containers = nil
- } else {
-
- j.Containers = []PodContainerInfo{}
-
- wantVal := true
-
- for {
-
- var tmpJContainers PodContainerInfo
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmpJContainers type=libpod.PodContainerInfo kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
-
- err = tmpJContainers.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- }
- state = fflib.FFParse_after_value
- }
-
- j.Containers = append(j.Containers, tmpJContainers)
-
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *PodInspectState) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *PodInspectState) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"cgroupPath":`)
- fflib.WriteJsonString(buf, string(j.CgroupPath))
- buf.WriteString(`,"infraContainerID":`)
- fflib.WriteJsonString(buf, string(j.InfraContainerID))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtPodInspectStatebase = iota
- ffjtPodInspectStatenosuchkey
-
- ffjtPodInspectStateCgroupPath
-
- ffjtPodInspectStateInfraContainerID
-)
-
-var ffjKeyPodInspectStateCgroupPath = []byte("cgroupPath")
-
-var ffjKeyPodInspectStateInfraContainerID = []byte("infraContainerID")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *PodInspectState) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *PodInspectState) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtPodInspectStatebase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtPodInspectStatenosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffjKeyPodInspectStateCgroupPath, kn) {
- currentKey = ffjtPodInspectStateCgroupPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffjKeyPodInspectStateInfraContainerID, kn) {
- currentKey = ffjtPodInspectStateInfraContainerID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodInspectStateInfraContainerID, kn) {
- currentKey = ffjtPodInspectStateInfraContainerID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeyPodInspectStateCgroupPath, kn) {
- currentKey = ffjtPodInspectStateCgroupPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtPodInspectStatenosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtPodInspectStateCgroupPath:
- goto handle_CgroupPath
-
- case ffjtPodInspectStateInfraContainerID:
- goto handle_InfraContainerID
-
- case ffjtPodInspectStatenosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_CgroupPath:
-
- /* handler: j.CgroupPath type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.CgroupPath = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InfraContainerID:
-
- /* handler: j.InfraContainerID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.InfraContainerID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}
-
-// MarshalJSON marshal bytes to json - template
-func (j *podState) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if j == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := j.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// MarshalJSONBuf marshal buff to json - template
-func (j *podState) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if j == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"cgroupPath":`)
- fflib.WriteJsonString(buf, string(j.CgroupPath))
- buf.WriteString(`,"InfraContainerID":`)
- fflib.WriteJsonString(buf, string(j.InfraContainerID))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffjtpodStatebase = iota
- ffjtpodStatenosuchkey
-
- ffjtpodStateCgroupPath
-
- ffjtpodStateInfraContainerID
-)
-
-var ffjKeypodStateCgroupPath = []byte("cgroupPath")
-
-var ffjKeypodStateInfraContainerID = []byte("InfraContainerID")
-
-// UnmarshalJSON umarshall json - template of ffjson
-func (j *podState) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
-func (j *podState) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error
- currentKey := ffjtpodStatebase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffjtpodStatenosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'I':
-
- if bytes.Equal(ffjKeypodStateInfraContainerID, kn) {
- currentKey = ffjtpodStateInfraContainerID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'c':
-
- if bytes.Equal(ffjKeypodStateCgroupPath, kn) {
- currentKey = ffjtpodStateCgroupPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeypodStateInfraContainerID, kn) {
- currentKey = ffjtpodStateInfraContainerID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffjKeypodStateCgroupPath, kn) {
- currentKey = ffjtpodStateCgroupPath
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffjtpodStatenosuchkey
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffjtpodStateCgroupPath:
- goto handle_CgroupPath
-
- case ffjtpodStateInfraContainerID:
- goto handle_InfraContainerID
-
- case ffjtpodStatenosuchkey:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_CgroupPath:
-
- /* handler: j.CgroupPath type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.CgroupPath = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InfraContainerID:
-
- /* handler: j.InfraContainerID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- j.InfraContainerID = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
-
- return nil
-}