Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectiveToContentType ¶
DirectiveToContentType maps a cloud-init directive to its MIME content type.
Types ¶
type ClosingTag ¶
type ClosingTag string
ClosingTag represents a marker that ends user data.
const ( PowerShellScriptClosingTag ClosingTag = "</powershell>" BatchScriptClosingTag ClosingTag = "</script>" )
type Directive ¶
type Directive string
Directive represents a marker that starts user data and indicates its type.
const ( ShellScript Directive = "#!" Include Directive = "#include" CloudConfig Directive = "#cloud-config" UpstartJob Directive = "#upstart-job" CloudBoothook Directive = "#cloud-boothook" PartHandler Directive = "#part-handler" // Windows-only types PowerShellScript Directive = "<powershell>" BatchScript Directive = "<script>" )
func Directives ¶
func Directives() []Directive
func (Directive) CanPersist ¶
CanPersist returns whether or not this directive is compatible with persisting user data (i.e. running it on every boot). This is relevant to Windows only.
func (Directive) ClosingTag ¶
func (d Directive) ClosingTag() ClosingTag
ClosingTag returns the closing tag that marks the end of the directive.
func (Directive) NeedsClosingTag ¶
NeedsClosingTag returns whether or not this directive must be closed.
type Options ¶
type Options struct { // Directive is the marker at the start of user data that determines the // type of user data. Directive Directive // Content is the content of the user data itself, excluding metadata such // as the directive and tags. Content string // Persist indicates that the user data should run on every reboot rather // than just once. This is only used on Windows. Persist bool }
Options represent parameters for generating user data.
Click to show internal directories.
Click to hide internal directories.