Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedContextType is thrown when an unsupported type is attempted to be wired into a template context. ErrUnsupportedContextType = errors.New("unsupported type added to context") )
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
Local *core.Local
Build *core.Build
Competition *core.Competition
Command *core.Command
DNS *core.DNS
DNSRecord *core.DNSRecord
Environment *core.Environment
Host *core.Host
Identity *core.Identity
Network *core.Network
RemoteFile *core.RemoteFile
Script *core.Script
Team *core.Team
User *core.User
Remote *core.Remote
AMI *core.AMI
Laforge *core.Laforge
Metadata *core.Metadata
ProvisionedNetwork *core.ProvisionedNetwork
ProvisionedHost *core.ProvisionedHost
ProvisioningStep *core.ProvisioningStep
Revision *core.Revision
Connection *core.Connection
Dict Dict
}
Context is a meta structure that wraps pointers to any type that needs to be accessed inside of a build template. This uinfied struct helps keep a single convention on how to get to and access data inside of build templates.
func NewContext ¶
NewContext takes a varadic list of objects to be embedded into the returned template context
func (*Context) Attach ¶
Attach wires up all the core Laforge types into a cohesive Context bundle for template rendering
func (*Context) Clone ¶
Clone duplicates the current contexts including pointer references to the dependent objects. Note it does not clone the Dict - that remains locally resident.
Click to show internal directories.
Click to hide internal directories.