generate

package
v5.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kube

func Kube(ctx context.Context, nameOrIDs []string, options *KubeOptions) (*types.GenerateKubeReport, error)

Kube generate Kubernetes YAML (v1 specification)

Note: Caller is responsible for closing returned reader

func Systemd

func Systemd(ctx context.Context, nameOrID string, options *SystemdOptions) (*types.GenerateSystemdReport, error)

Types

type KubeOptions

type KubeOptions struct {
	// PodmanOnly - add podman-only reserved annotations to generated YAML file (Cannot be used by Kubernetes)
	PodmanOnly *bool
	// Service - generate YAML for a Kubernetes _service_ object.
	Service *bool
	// Type - the k8s kind to be generated i.e Pod or Deployment
	Type *string
	// Replicas - the value to set in the replicas field for a Deployment
	Replicas *int32
	// NoTrunc - don't truncate annotations to the Kubernetes maximum length of 63 characters
	NoTrunc *bool
}

KubeOptions are optional options for generating kube YAML files

func (*KubeOptions) Changed

func (o *KubeOptions) Changed(fieldName string) bool

Changed returns true if named field has been set

func (*KubeOptions) GetNoTrunc

func (o *KubeOptions) GetNoTrunc() bool

GetNoTrunc returns value of field NoTrunc

func (*KubeOptions) GetPodmanOnly

func (o *KubeOptions) GetPodmanOnly() bool

GetPodmanOnly returns value of field PodmanOnly

func (*KubeOptions) GetReplicas

func (o *KubeOptions) GetReplicas() int32

GetReplicas returns value of field Replicas

func (*KubeOptions) GetService

func (o *KubeOptions) GetService() bool

GetService returns value of field Service

func (*KubeOptions) GetType

func (o *KubeOptions) GetType() string

GetType returns value of field Type

func (*KubeOptions) ToParams

func (o *KubeOptions) ToParams() (url.Values, error)

ToParams formats struct fields to be passed to API service

func (*KubeOptions) WithNoTrunc

func (o *KubeOptions) WithNoTrunc(value bool) *KubeOptions

WithNoTrunc set field NoTrunc to given value

func (*KubeOptions) WithPodmanOnly

func (o *KubeOptions) WithPodmanOnly(value bool) *KubeOptions

WithPodmanOnly set field PodmanOnly to given value

func (*KubeOptions) WithReplicas

func (o *KubeOptions) WithReplicas(value int32) *KubeOptions

WithReplicas set field Replicas to given value

func (*KubeOptions) WithService

func (o *KubeOptions) WithService(value bool) *KubeOptions

WithService set field Service to given value

func (*KubeOptions) WithType

func (o *KubeOptions) WithType(value string) *KubeOptions

WithType set field Type to given value

type SystemdOptions

type SystemdOptions struct {
	// Name - use container/pod name instead of its ID.
	UseName *bool
	// New - create a new container instead of starting a new one.
	New *bool
	// NoHeader - Removes autogenerated by Podman and timestamp if set to true
	NoHeader *bool
	// TemplateUnitFile - Create a template unit file that uses the identity specifiers
	TemplateUnitFile *bool
	// RestartPolicy - systemd restart policy.
	RestartPolicy *string
	// RestartSec - systemd service restartsec. Configures the time to sleep before restarting a service.
	RestartSec *uint
	// StartTimeout - time when starting the container.
	StartTimeout *uint
	// StopTimeout - time when stopping the container.
	StopTimeout *uint
	// ContainerPrefix - systemd unit name prefix for containers
	ContainerPrefix *string
	// PodPrefix - systemd unit name prefix for pods
	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
	// AdditionalEnvVariables - Sets environment variables to a systemd unit file
	AdditionalEnvVariables *[]string
}

SystemdOptions are optional options for generating systemd files

func (*SystemdOptions) Changed

func (o *SystemdOptions) Changed(fieldName string) bool

Changed returns true if named field has been set

func (*SystemdOptions) GetAdditionalEnvVariables

func (o *SystemdOptions) GetAdditionalEnvVariables() []string

GetAdditionalEnvVariables returns value of field AdditionalEnvVariables

func (*SystemdOptions) GetAfter

func (o *SystemdOptions) GetAfter() []string

GetAfter returns value of field After

func (*SystemdOptions) GetContainerPrefix

func (o *SystemdOptions) GetContainerPrefix() string

GetContainerPrefix returns value of field ContainerPrefix

func (*SystemdOptions) GetNew

func (o *SystemdOptions) GetNew() bool

GetNew returns value of field New

func (*SystemdOptions) GetNoHeader

func (o *SystemdOptions) GetNoHeader() bool

GetNoHeader returns value of field NoHeader

func (*SystemdOptions) GetPodPrefix

func (o *SystemdOptions) GetPodPrefix() string

GetPodPrefix returns value of field PodPrefix

func (*SystemdOptions) GetRequires

func (o *SystemdOptions) GetRequires() []string

GetRequires returns value of field Requires

func (*SystemdOptions) GetRestartPolicy

func (o *SystemdOptions) GetRestartPolicy() string

GetRestartPolicy returns value of field RestartPolicy

func (*SystemdOptions) GetRestartSec

func (o *SystemdOptions) GetRestartSec() uint

GetRestartSec returns value of field RestartSec

func (*SystemdOptions) GetSeparator

func (o *SystemdOptions) GetSeparator() string

GetSeparator returns value of field Separator

func (*SystemdOptions) GetStartTimeout

func (o *SystemdOptions) GetStartTimeout() uint

GetStartTimeout returns value of field StartTimeout

func (*SystemdOptions) GetStopTimeout

func (o *SystemdOptions) GetStopTimeout() uint

GetStopTimeout returns value of field StopTimeout

func (*SystemdOptions) GetTemplateUnitFile

func (o *SystemdOptions) GetTemplateUnitFile() bool

GetTemplateUnitFile returns value of field TemplateUnitFile

func (*SystemdOptions) GetUseName

func (o *SystemdOptions) GetUseName() bool

GetUseName returns value of field UseName

func (*SystemdOptions) GetWants

func (o *SystemdOptions) GetWants() []string

GetWants returns value of field Wants

func (*SystemdOptions) ToParams

func (o *SystemdOptions) ToParams() (url.Values, error)

ToParams formats struct fields to be passed to API service

func (*SystemdOptions) WithAdditionalEnvVariables

func (o *SystemdOptions) WithAdditionalEnvVariables(value []string) *SystemdOptions

WithAdditionalEnvVariables set field AdditionalEnvVariables to given value

func (*SystemdOptions) WithAfter

func (o *SystemdOptions) WithAfter(value []string) *SystemdOptions

WithAfter set field After to given value

func (*SystemdOptions) WithContainerPrefix

func (o *SystemdOptions) WithContainerPrefix(value string) *SystemdOptions

WithContainerPrefix set field ContainerPrefix to given value

func (*SystemdOptions) WithNew

func (o *SystemdOptions) WithNew(value bool) *SystemdOptions

WithNew set field New to given value

func (*SystemdOptions) WithNoHeader

func (o *SystemdOptions) WithNoHeader(value bool) *SystemdOptions

WithNoHeader set field NoHeader to given value

func (*SystemdOptions) WithPodPrefix

func (o *SystemdOptions) WithPodPrefix(value string) *SystemdOptions

WithPodPrefix set field PodPrefix to given value

func (*SystemdOptions) WithRequires

func (o *SystemdOptions) WithRequires(value []string) *SystemdOptions

WithRequires set field Requires to given value

func (*SystemdOptions) WithRestartPolicy

func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions

WithRestartPolicy set field RestartPolicy to given value

func (*SystemdOptions) WithRestartSec

func (o *SystemdOptions) WithRestartSec(value uint) *SystemdOptions

WithRestartSec set field RestartSec to given value

func (*SystemdOptions) WithSeparator

func (o *SystemdOptions) WithSeparator(value string) *SystemdOptions

WithSeparator set field Separator to given value

func (*SystemdOptions) WithStartTimeout

func (o *SystemdOptions) WithStartTimeout(value uint) *SystemdOptions

WithStartTimeout set field StartTimeout to given value

func (*SystemdOptions) WithStopTimeout

func (o *SystemdOptions) WithStopTimeout(value uint) *SystemdOptions

WithStopTimeout set field StopTimeout to given value

func (*SystemdOptions) WithTemplateUnitFile

func (o *SystemdOptions) WithTemplateUnitFile(value bool) *SystemdOptions

WithTemplateUnitFile set field TemplateUnitFile to given value

func (*SystemdOptions) WithUseName

func (o *SystemdOptions) WithUseName(value bool) *SystemdOptions

WithUseName set field UseName to given value

func (*SystemdOptions) WithWants

func (o *SystemdOptions) WithWants(value []string) *SystemdOptions

WithWants set field Wants to given value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL