vagrantcloud

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

vagrant_cloud implements the packer.PostProcessor interface and adds a post-processor that uploads artifacts from the vagrant post-processor to Vagrant Cloud (vagrantcloud.com) or manages self hosted boxes on the Vagrant Cloud

Index

Constants

View Source
const BuilderId = "pearkes.post-processor.vagrant-cloud"
View Source
const VAGRANT_CLOUD_URL = "https://vagrantcloud.com/api/v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Tag      string
	Provider string
}

func NewArtifact

func NewArtifact(provider, tag string) *Artifact

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (a *Artifact) Id() string

func (*Artifact) State added in v0.7.2

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

func (*Artifact) String

func (a *Artifact) String() string

type Box

type Box struct {
	Tag      string     `json:"tag"`
	Versions []*Version `json:"versions"`
}

func (*Box) HasVersion

func (b *Box) HasVersion(version string) (bool, *Version)

type Config

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

	Tag                string `mapstructure:"box_tag"`
	Version            string `mapstructure:"version"`
	VersionDescription string `mapstructure:"version_description"`
	NoRelease          bool   `mapstructure:"no_release"`

	AccessToken     string `mapstructure:"access_token"`
	VagrantCloudUrl string `mapstructure:"vagrant_cloud_url"`

	BoxDownloadUrl string `mapstructure:"box_download_url"`
	// contains filtered or unexported fields
}

type PostProcessor

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

func (*PostProcessor) Cancel

func (p *PostProcessor) Cancel()

Runs a cleanup if the post processor fails to upload

func (*PostProcessor) Configure

func (p *PostProcessor) Configure(raws ...interface{}) error

func (*PostProcessor) PostProcess

func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error)

type Provider

type Provider struct {
	Name        string `json:"name"`
	Url         string `json:"url,omitempty"`
	HostedToken string `json:"hosted_token,omitempty"`
	UploadUrl   string `json:"upload_url,omitempty"`
}

type Upload

type Upload struct {
	UploadPath string `json:"upload_path"`
}

type VagrantCloudClient

type VagrantCloudClient struct {

	// The base URL of the API
	BaseURL string

	// Access token
	AccessToken string
	// contains filtered or unexported fields
}

func (*VagrantCloudClient) Delete

func (v *VagrantCloudClient) Delete(path string) (*http.Response, error)

func (*VagrantCloudClient) Get

func (v *VagrantCloudClient) Get(path string) (*http.Response, error)

func (VagrantCloudClient) New

func (v VagrantCloudClient) New(baseUrl string, token string) (*VagrantCloudClient, error)

func (*VagrantCloudClient) Post

func (v *VagrantCloudClient) Post(path string, body interface{}) (*http.Response, error)

func (*VagrantCloudClient) Put

func (v *VagrantCloudClient) Put(path string) (*http.Response, error)

func (*VagrantCloudClient) Upload

func (v *VagrantCloudClient) Upload(path string, url string) (*http.Response, error)

func (*VagrantCloudClient) ValidateAuthentication added in v1.3.2

func (v *VagrantCloudClient) ValidateAuthentication() error

type VagrantCloudErrors

type VagrantCloudErrors struct {
	Errors map[string][]string `json:"errors"`
}

func (VagrantCloudErrors) FormatErrors

func (v VagrantCloudErrors) FormatErrors() string

type Version

type Version struct {
	Version     string `json:"version"`
	Description string `json:"description,omitempty"`
}

Jump to

Keyboard shortcuts

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