template

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ComposeFilename = "compose.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name        string
	Description string
	Required    bool
	Example     string
	Default     string
}

type DestDirExistsError

type DestDirExistsError struct {
	Dir string
}

func (DestDirExistsError) Error

func (e DestDirExistsError) Error() string

type DirSource

type DirSource struct {
	Path string
}

func (DirSource) CopyTo

func (d DirSource) CopyTo(destDir string) error

func (DirSource) GetName

func (d DirSource) GetName() (string, error)

func (DirSource) String

func (d DirSource) String() string

type GitSource

type GitSource struct {
	URL string
	Ref string
}

func NewGitSource

func NewGitSource(url string) GitSource

func (GitSource) CopyTo

func (g GitSource) CopyTo(destDir string) error

func (GitSource) GetName

func (g GitSource) GetName() (string, error)

func (GitSource) String

func (g GitSource) String() string

type Metadata

type Metadata struct {
	Name        string
	Description string
	Features    []string
	Args        []Arg
}

func (*Metadata) UnmarshalYAML

func (t *Metadata) UnmarshalYAML(node *yaml.Node) error

type ResolvedTemplate

type ResolvedTemplate struct {
	Services []Service
	Args     []arguments.ResolvedArg
}

func Resolve

func Resolve(template Template, argProvider arguments.Provider) (ResolvedTemplate, error)

type Service

type Service struct {
	Name string
	Data map[string]any
}

type Source

type Source interface {
	CopyTo(destDir string) error
	String() string
	GetName() (string, error)
}

func NewSource

func NewSource(source string) (Source, error)

type Template

type Template struct {
	Metadata Metadata
	Services []Service
}

func FromContent

func FromContent(reader io.Reader) (Template, error)

func FromDir

func FromDir(destDir string) (Template, error)

type TemplateNameSource

type TemplateNameSource string

func (TemplateNameSource) CopyTo

func (t TemplateNameSource) CopyTo(destDir string) error

func (TemplateNameSource) GetName

func (t TemplateNameSource) GetName() (string, error)

func (TemplateNameSource) String

func (t TemplateNameSource) String() string

Jump to

Keyboard shortcuts

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