digitalocean

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MPL-2.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const BuilderId = "pearkes.digitalocean"

The unique id for the builder

Variables

This section is empty.

Functions

func WaitForImageState added in v1.3.5

func WaitForImageState(
	desiredState string, imageId, actionId int,
	client *godo.Client, timeout time.Duration) error

WaitForImageState simply blocks until the image action is in a state we expect, while eventually timing out.

Types

type Artifact

type Artifact struct {
	// The name of the snapshot
	SnapshotName string

	// The ID of the image
	SnapshotId int

	// The name of the region
	RegionNames []string

	// The client for making API calls
	Client *godo.Client
}

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (*Artifact) Files() []string

func (*Artifact) Id

func (a *Artifact) Id() string

func (*Artifact) State added in v0.7.2

func (a *Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type Builder

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

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

func (*Builder) Run

func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error)

type Config added in v0.8.0

type Config struct {
	common.PackerConfig `mapstructure:",squash"`
	Comm                communicator.Config `mapstructure:",squash"`

	APIToken string `mapstructure:"api_token"`
	APIURL   string `mapstructure:"api_url"`

	Region string `mapstructure:"region"`
	Size   string `mapstructure:"size"`
	Image  string `mapstructure:"image"`

	PrivateNetworking bool          `mapstructure:"private_networking"`
	Monitoring        bool          `mapstructure:"monitoring"`
	IPv6              bool          `mapstructure:"ipv6"`
	SnapshotName      string        `mapstructure:"snapshot_name"`
	SnapshotRegions   []string      `mapstructure:"snapshot_regions"`
	StateTimeout      time.Duration `mapstructure:"state_timeout"`
	SnapshotTimeout   time.Duration `mapstructure:"snapshot_timeout"`
	DropletName       string        `mapstructure:"droplet_name"`
	UserData          string        `mapstructure:"user_data"`
	UserDataFile      string        `mapstructure:"user_data_file"`
	Tags              []string      `mapstructure:"tags"`
	// contains filtered or unexported fields
}

func NewConfig added in v0.8.0

func NewConfig(raws ...interface{}) (*Config, []string, error)

Jump to

Keyboard shortcuts

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