types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResourceTypeBinaries      = ResourceType("binaries")
	ResourceTypeImages        = ResourceType("images")
	ResourceTypeConfigs       = ResourceType("configs")
	ResourceTypeKubernetes    = ResourceType("kubernetes")
	ResourceTypeDockerCompose = ResourceType("docker-compose")
)
View Source
var ExampleProjectYAML []byte

ExampleProjectYAML holds the embedded example project.yaml, injected from main.

Functions

This section is empty.

Types

type BinarySpec added in v0.1.0

type BinarySpec struct {
	Name      string   `yaml:"name"`
	Src       string   `yaml:"src,omitempty"`
	Platform  []string `yaml:"platform,omitempty"`
	ConfigDir string   `yaml:"config_dir,omitempty"`
}

type BuildSpec added in v0.1.0

type BuildSpec struct {
	Binaries []BinarySpec `yaml:"binaries"`
	Images   []ImageSpec  `yaml:"images"`
}

type ConfigSpec added in v0.1.0

type ConfigSpec struct {
	Name  string   `yaml:"name"`
	Src   string   `yaml:"src,omitempty"`
	Files []string `yaml:"files,omitempty"`
}

type DockerComposeSpec added in v0.1.0

type DockerComposeSpec struct {
	Src   string   `yaml:"src,omitempty"`
	Files []string `yaml:"files,omitempty"`
}

type EnvSpec added in v0.1.0

type EnvSpec struct {
	ConfigSrc string   `yaml:"config_src,omitempty"`
	ConfigTgt string   `yaml:"config_tgt,omitempty"`
	Configs   []string `yaml:"configs,omitempty"`

	BinarySrc       string   `yaml:"binary_src,omitempty"`
	BinaryTgt       string   `yaml:"binary_tgt,omitempty"`
	Binaries        []string `yaml:"binaries,omitempty"`
	BinaryBuildEnv  []string `yaml:"binary_build_env,omitempty"`
	BinaryBuildArgs []string `yaml:"binary_build_args,omitempty"`

	ImageBuildSrc  string   `yaml:"image_build_src,omitempty"`
	Images         []string `yaml:"images,omitempty"`
	ImagePrefix    string   `yaml:"image_prefix,omitempty"`
	ImageTag       string   `yaml:"image_tag,omitempty"`
	ImageBuildEnv  []string `yaml:"image_build_env,omitempty"`
	ImageBuildArgs []string `yaml:"image_build_args,omitempty"`

	KubernetesSrc       string   `yaml:"kubernetes_src,omitempty"`
	KubernetesTgt       string   `yaml:"kubernetes_tgt,omitempty"`
	KubernetesTemplates []string `yaml:"kubernetes_templates,omitempty"`

	DockerComposeSrc string `yaml:"docker_compose_src,omitempty"`
	DockerComposeTgt string `yaml:"docker_compose_tgt,omitempty"`
}

type GenerateSpec added in v0.1.0

type GenerateSpec struct {
	Configs       []ConfigSpec      `yaml:"configs"`
	Kubernetes    []KubernetesSpec  `yaml:"kubernetes"`
	DockerCompose DockerComposeSpec `yaml:"docker_compose"`
}

type ImageSpec added in v0.1.0

type ImageSpec struct {
	Name      string `yaml:"name"`
	Base      string `yaml:"base,omitempty"`
	BuildSrc  string `yaml:"build_src,omitempty"`
	BuildFrom string `yaml:"build_from,omitempty"`
	Prefix    string `yaml:"prefix,omitempty"`
	Repo      string `yaml:"repo,omitempty"`
	Tag       string `yaml:"tag,omitempty"`
	NoPush    bool   `yaml:"no_push,omitempty"`
}

func (ImageSpec) GetImageName added in v0.1.0

func (i ImageSpec) GetImageName(env EnvSpec) string

type KubernetesSpec added in v0.1.0

type KubernetesSpec struct {
	Name  string   `yaml:"name"`
	Src   string   `yaml:"src,omitempty"`
	Files []string `yaml:"files,omitempty"`
}

type Project added in v0.1.0

type Project struct {
	Product  string             `yaml:"product"`
	Model    string             `yaml:"model"`
	Version  string             `yaml:"version"`
	Domain   string             `yaml:"domain"`
	Module   string             `yaml:"module"`
	Default  EnvSpec            `yaml:"default"`
	Env      map[string]EnvSpec `yaml:"env"`
	Build    BuildSpec          `yaml:"build"`
	Generate GenerateSpec       `yaml:"generate"`
}

func (*Project) GetEnv added in v0.1.0

func (p *Project) GetEnv(env string) EnvSpec

func (*Project) Load added in v0.1.0

func (p *Project) Load(confPath string) error

type ResourceType added in v0.0.5

type ResourceType string

Jump to

Keyboard shortcuts

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