render

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppVars

type AppVars struct {
	Name     string
	AllocIDs []string
	VMAddrs  []string
}

type EnvVars

type EnvVars map[string]string

type FlyVars

type FlyVars struct {
	// Local hostname (localhost / fly-local-6pn)
	Host string
	// The deployed app's name
	AppName string
	// The region that this instance is deployed in
	Region string
	// All regions that this app is deployed in
	AllRegions []string
	// The IP address for this instance
	IP string
	// All IPs for the deployed app
	PeerIPs      []string
	ServerName   string
	AllocID      string
	PeerAllocIDs []string
}

type ProcflyVars

type ProcflyVars struct {
	Root string
	File string
}

type Renderer

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

func NewRenderer

func NewRenderer(paths file.Paths, vars any) *Renderer

func (*Renderer) Command

func (r *Renderer) Command(tmpl string) (process.Command, error)

func (*Renderer) Commands

func (r *Renderer) Commands(tmpls map[string]string) (map[string]process.Command, error)

func (*Renderer) Hash

func (r *Renderer) Hash() string

func (*Renderer) InlineTemplates

func (r *Renderer) InlineTemplates(tmpls map[string]string) error

func (*Renderer) Reset

func (r *Renderer) Reset(vars any)

func (*Renderer) TemplateFiles

func (r *Renderer) TemplateFiles(tmpls map[string]string) error

type Vars

type Vars struct {
	Env     EnvVars
	Fly     FlyVars
	Procfly ProcflyVars
}

func LoadVars

func LoadVars(paths file.Paths) (env Vars, err error)

Jump to

Keyboard shortcuts

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