Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Output ¶
type Output struct { Name string `json:"name"` Type TemplateType `json:"type"` Path string `json:"path"` Comment string `json:"comment"` Content []byte `json:"content"` }
Output represents the text representation of a rendered template.
type SSHTemplates ¶
SSHTemplates contains the templates defining ssh configuration files.
func (*SSHTemplates) Validate ¶
func (t *SSHTemplates) Validate() (err error)
Validate returns an error if a template is not valid.
type Step ¶
type Step struct {
SSH StepSSH
}
Step represents the default variables available in the CA.
type StepSSH ¶
type StepSSH struct { HostKey ssh.PublicKey UserKey ssh.PublicKey HostFederatedKeys []ssh.PublicKey UserFederatedKeys []ssh.PublicKey }
StepSSH holds SSH-related values for the CA.
type Template ¶
type Template struct { *template.Template Name string `json:"name"` Type TemplateType `json:"type"` TemplatePath string `json:"template"` Path string `json:"path"` Comment string `json:"comment"` Content []byte `json:"-"` }
Template represents on template file.
func (*Template) Load ¶
Load loads the template in memory, returns an error if the parsing of the template fails.
func (*Template) Output ¶
Output renders the template and returns a template.Output struct or an error.
type TemplateType ¶
type TemplateType string
TemplateType defines how a template will be written in disk.
const ( // Snippet will mark a template as a part of a file. Snippet TemplateType = "snippet" // File will mark a templates as a full file. File TemplateType = "file" // Directory will mark a template as a directory. Directory TemplateType = "directory" )
type Templates ¶
type Templates struct { SSH *SSHTemplates `json:"ssh,omitempty"` Data map[string]interface{} `json:"data,omitempty"` }
Templates is a collection of templates and variables.
Click to show internal directories.
Click to hide internal directories.