diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-19 20:29:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 20:29:01 -0500 |
commit | 7fc8bf4a428c08fcb9c9e97d238628319a20986e (patch) | |
tree | ddcd1faacca37f72bafc6f3bc77c55f3829eb387 /pkg/bindings | |
parent | 6b59b10248b0bd92127dfc455ca40579d4c396a0 (diff) | |
parent | b9a2d8698a22c4b267e252caad56d8b31fcadd38 (diff) | |
download | podman-7fc8bf4a428c08fcb9c9e97d238628319a20986e.tar.gz podman-7fc8bf4a428c08fcb9c9e97d238628319a20986e.tar.bz2 podman-7fc8bf4a428c08fcb9c9e97d238628319a20986e.zip |
Merge pull request #12887 from esendjer/main
Add custom defined dependencies to podman generate systemd
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/generate/types.go | 6 | ||||
-rw-r--r-- | pkg/bindings/generate/types_systemd_options.go | 45 |
2 files changed, 51 insertions, 0 deletions
diff --git a/pkg/bindings/generate/types.go b/pkg/bindings/generate/types.go index ce560c547..25c398c8b 100644 --- a/pkg/bindings/generate/types.go +++ b/pkg/bindings/generate/types.go @@ -32,4 +32,10 @@ type SystemdOptions struct { PodPrefix *string // Separator - systemd unit name separator between name/id and prefix Separator *string + // Wants - systemd wants list for the container or pods + Wants *[]string + // After - systemd after list for the container or pods + After *[]string + // Requires - systemd requires list for the container or pods + Requires *[]string } diff --git a/pkg/bindings/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go index 960e45e50..4d436945b 100644 --- a/pkg/bindings/generate/types_systemd_options.go +++ b/pkg/bindings/generate/types_systemd_options.go @@ -181,3 +181,48 @@ func (o *SystemdOptions) GetSeparator() string { } return *o.Separator } + +// WithWants set field Wants to given value +func (o *SystemdOptions) WithWants(value []string) *SystemdOptions { + o.Wants = &value + return o +} + +// GetWants returns value of field Wants +func (o *SystemdOptions) GetWants() []string { + if o.Wants == nil { + var z []string + return z + } + return *o.Wants +} + +// WithAfter set field After to given value +func (o *SystemdOptions) WithAfter(value []string) *SystemdOptions { + o.After = &value + return o +} + +// GetAfter returns value of field After +func (o *SystemdOptions) GetAfter() []string { + if o.After == nil { + var z []string + return z + } + return *o.After +} + +// WithRequires set field Requires to given value +func (o *SystemdOptions) WithRequires(value []string) *SystemdOptions { + o.Requires = &value + return o +} + +// GetRequires returns value of field Requires +func (o *SystemdOptions) GetRequires() []string { + if o.Requires == nil { + var z []string + return z + } + return *o.Requires +} |