templates

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseKV added in v0.6.4

func ParseKV(kvStr string) map[string]string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) AppHomeDir

func (c *Client) AppHomeDir() string

AppHomeDir returns the application's home directory.

func (*Client) AppName

func (c *Client) AppName() string

func (*Client) AppendEnvironmentTemplates

func (c *Client) AppendEnvironmentTemplates(
	tpl *template.Template,
	templateList *list.List,
	partialName string,
	envType string,
) error

AppendEnvironmentTemplates tries to look up all the templates dedicated for an environment type.

func (*Client) AppendMutagenTemplates

func (c *Client) AppendMutagenTemplates(
	tpl *template.Template,
	templateList *list.List,
	partialName string,
	envType string,
) error

AppendMutagenTemplates is going to add mutagen configuration templates.

func (*Client) AppendTemplatesFromPaths

func (c *Client) AppendTemplatesFromPaths(tpl *template.Template, templateList *list.List, paths []string) error

AppendTemplatesFromPaths appends templates to t from templateList list searching them in paths path list. If it cannot find templates it's not going to fail. If a template with the same name already exists, it's going to skip that template.

func (*Client) AppendTemplatesFromPathsStatic

func (c *Client) AppendTemplatesFromPathsStatic(tpl *template.Template, templateList *list.List, paths []string) error

AppendTemplatesFromPathsStatic appends templates to t from templateList list searching them in paths path list. This function looks up templates built to the application's binary (static files). If it cannot find templates it's not going to fail. If a template with the same name already exists, it's going to skip that template.

func (*Client) ConvertTemplateToComposeConfig

func (c *Client) ConvertTemplateToComposeConfig(
	t *template.Template,
	templateList *list.List,
) (compose.ConfigDetails, error)

ConvertTemplateToComposeConfig iterates through all the templates and converts them to docker-compose configurations.

func (*Client) Cwd

func (c *Client) Cwd() string

Cwd returns the current working directory.

func (*Client) ExecuteTemplate

func (c *Client) ExecuteTemplate(t *template.Template, buffer io.Writer) error

ExecuteTemplate executes the templates, appending some specific template functions to the execution.

func (*Client) GenerateMutagenTemplateFile

func (c *Client) GenerateMutagenTemplateFile(path, envType string) error

GenerateMutagenTemplateFile generates mutagen configuration from template if it doesn't exist.

func (*Client) RunCmdSvcBuildDockerComposeTemplate

func (c *Client) RunCmdSvcBuildDockerComposeTemplate(t *template.Template, templateList *list.List) error

SvcBuildDockerComposeTemplate builds the templates which are used to invoke docker-compose for the common services.

func (*Client) SvcGenerateTraefikConfig

func (c *Client) SvcGenerateTraefikConfig() error

SvcGenerateTraefikConfig generates the default traefik configuration.

func (*Client) SvcGenerateTraefikDynamicConfig

func (c *Client) SvcGenerateTraefikDynamicConfig(svcDomain string) error

SvcGenerateTraefikDynamicConfig generates the dynamic traefik configuration.

Jump to

Keyboard shortcuts

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