Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
90af6f1d
Commit
90af6f1d
authored
Jun 24, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
website: fix up the interface pastings to not have comments
parent
0e8b61c1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
57 deletions
+12
-57
website/source/docs/extend/builder.html.markdown
website/source/docs/extend/builder.html.markdown
+3
-19
website/source/docs/extend/command.html.markdown
website/source/docs/extend/command.html.markdown
+3
-13
website/source/docs/extend/post-processor.html.markdown
website/source/docs/extend/post-processor.html.markdown
+3
-13
website/source/docs/extend/provisioner.html.markdown
website/source/docs/extend/provisioner.html.markdown
+3
-12
No files found.
website/source/docs/extend/builder.html.markdown
View file @
90af6f1d
...
@@ -23,30 +23,14 @@ Prior to reading this page, it is assumed you have read the page on
...
@@ -23,30 +23,14 @@ Prior to reading this page, it is assumed you have read the page on
## The Interface
## The Interface
The interface that must be implemented for a builder is the
`packer.Builder`
The interface that must be implemented for a builder is the
`packer.Builder`
interface. It is reproduced below for easy reference. The
reference below
interface. It is reproduced below for easy reference. The
actual interface
also contains some basic documentatin of what each of the methods are
in the source code contains some basic documentation as well explaining
supposed to
do.
what each method should
do.
<pre
class=
"prettyprint"
>
<pre
class=
"prettyprint"
>
type Builder interface {
type Builder interface {
// Prepare is responsible for configuring the builder and validating
// that configuration. Any setup should be done in this method. Note that
// NO side effects should take place in prepare, it is meant as a state
// setup only. Calling Prepare is not necessarilly followed by a Run.
//
// The parameters to Prepare are a set of interface{} values of the
// configuration. These are almost always
`map[string]interface{}`
// parsed from a template, but no guarantee is made.
//
// Each of the configuration values should merge into the final
// configuration.
Prepare(...interface{}) error
Prepare(...interface{}) error
// Run is where the actual build should take place. It takes a Build and a Ui.
Run(ui Ui, hook Hook, cache Cache) (Artifact, error)
Run(ui Ui, hook Hook, cache Cache) (Artifact, error)
// Cancel cancels a possibly running Builder. This should block until
// the builder actually cancels and cleans up after itself.
Cancel()
Cancel()
}
}
</pre>
</pre>
...
...
website/source/docs/extend/command.html.markdown
View file @
90af6f1d
...
@@ -28,24 +28,14 @@ in the core Packer configuration.
...
@@ -28,24 +28,14 @@ in the core Packer configuration.
## The Interface
## The Interface
The interface that must be implemented for a command is the
`packer.Command`
The interface that must be implemented for a command is the
`packer.Command`
interface. It is reproduced below for easy reference. The
reference below
interface. It is reproduced below for easy reference. The
actual interface
also contains some basic documentation of what each of the methods are
in the source code contains some basic documentation as well explaining
supposed to
do.
what each method should
do.
<pre
class=
"prettyprint"
>
<pre
class=
"prettyprint"
>
type Command interface {
type Command interface {
// Help should return long-form help text that includes the command-line
// usage, a brief few sentences explaining the function of the command,
// and the complete list of flags the command accepts.
Help() string
Help() string
// Run should run the actual command with the given environmet and
// command-line arguments. It should return the exit status when it is
// finished.
Run(env Environment, args []string) int
Run(env Environment, args []string) int
// Synopsis should return a one-line, short synopsis of the command.
// This should be less than 50 characters ideally.
Synopsis() string
Synopsis() string
}
}
</pre>
</pre>
...
...
website/source/docs/extend/post-processor.html.markdown
View file @
90af6f1d
...
@@ -31,23 +31,13 @@ are served using the `plugin.ServePostProcessor` function.
...
@@ -31,23 +31,13 @@ are served using the `plugin.ServePostProcessor` function.
The interface that must be implemented for a post-processor is the
The interface that must be implemented for a post-processor is the
`packer.PostProcessor`
interface. It is reproduced below for easy reference.
`packer.PostProcessor`
interface. It is reproduced below for easy reference.
The reference below also contains some basic documentation of what each of
The actual interface in the source code contains some basic documentation as well explaining
the methods are supposed to do.
what each method should do.
<pre
class=
"prettyprint"
>
<pre
class=
"prettyprint"
>
// A PostProcessor is responsible for taking an artifact of a build
// and doing some sort of post-processing to turn this into another
// artifact. An example of a post-processor would be something that takes
// the result of a build, compresses it, and returns a new artifact containing
// a single file of the prior artifact compressed.
type PostProcessor interface {
type PostProcessor interface {
// Configure is responsible for setting up configuration, storing
// the state for later, and returning and errors, such as validation
// errors.
Configure(interface{}) error
Configure(interface{}) error
// PostProcess takes a previously created Artifact and produces another
// Artifact. If an error occurs, it should return that error.
PostProcess(Artifact) (Artifact, error)
PostProcess(Artifact) (Artifact, error)
}
}
</pre>
</pre>
...
...
website/source/docs/extend/provisioner.html.markdown
View file @
90af6f1d
...
@@ -26,22 +26,13 @@ are served using the `plugin.ServeProvisioner` function.
...
@@ -26,22 +26,13 @@ are served using the `plugin.ServeProvisioner` function.
The interface that must be implemented for a provisioner is the
The interface that must be implemented for a provisioner is the
`packer.Provisioner`
interface. It is reproduced below for easy reference.
`packer.Provisioner`
interface. It is reproduced below for easy reference.
The reference below also contains some basic documentation of what each of
The actual interface in the source code contains some basic documentation as well explaining
the methods are supposed to do.
what each method should do.
<pre
class=
"prettyprint"
>
<pre
class=
"prettyprint"
>
// A provisioner is responsible for installing and configuring software
// on a machine prior to building the actual image.
type Provisioner interface {
type Provisioner interface {
// Prepare is called with a set of configurations to setup the
// internal state of the provisioner. The multiple configurations
// should be merged in some sane way.
Prepare(...interface{}) error
Prepare(...interface{}) error
// Provision is called to actually provision the machine. A UI is
// given to communicate with the user, and a communicator is given that
// is guaranteed to be connected to some machine so that provisioning
// can be done.
Provision(Ui, Communicator)
Provision(Ui, Communicator)
}
}
</pre>
</pre>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment