aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/entities/generate.go
blob: 314996497a2ee51b9508112b660d204b55af97c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package entities

import "io"

// GenerateSystemdOptions control the generation of systemd unit files.
type GenerateSystemdOptions struct {
	Name                   bool
	New                    bool
	RestartPolicy          *string
	RestartSec             *uint
	StartTimeout           *uint
	StopTimeout            *uint
	ContainerPrefix        string
	PodPrefix              string
	Separator              string
	NoHeader               bool
	TemplateUnitFile       bool
	Wants                  []string
	After                  []string
	Requires               []string
	AdditionalEnvVariables []string
}

// GenerateSystemdReport
type GenerateSystemdReport struct {
	// Units of the generate process. key = unit name -> value = unit content
	Units map[string]string
}

// GenerateKubeOptions control the generation of Kubernetes YAML files.
type GenerateKubeOptions struct {
	// Service - generate YAML for a Kubernetes _service_ object.
	Service bool
}

type KubeGenerateOptions = GenerateKubeOptions

// GenerateKubeReport
//
// FIXME: Podman4.0 should change io.Reader to io.ReaderCloser
type GenerateKubeReport struct {
	// Reader - the io.Reader to reader the generated YAML file.
	Reader io.Reader
}

type GenerateSpecReport struct {
	Data []byte
}

type GenerateSpecOptions struct {
	ID       string
	FileName string
	Compact  bool
	Name     bool
}