vagrantcloud

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	CreatedAt           time.Time `json:"created_at"`
	UpdatedAt           time.Time `json:"updated_at"`
	Tag                 string    `json:"tag"`
	Name                string    `json:"name"`
	ShortDescription    string    `json:"short_description"`
	DescriptionHtml     string    `json:"description_html"`
	DescriptionMarkdown string    `json:"description_markdown"`
	Username            string    `json:"username"`
	Private             bool      `json:"private"`
	CurrentVersion      Version   `json:"current_version"`
	Versions            []Version `json:"versions"`
}

type BoxOptions

type BoxOptions struct {
	Username         string
	Name             string
	ShortDescription string
	Description      string
	IsPrivate        bool
}

type Provider

type Provider struct {
	Name        string    `json:"name"`
	Hosted      bool      `json:"hosted"`
	HostedToken string    `json:"hosted_token"`
	OriginalUrl string    `json:"original_url"`
	UploadUrl   string    `json:"upload_url"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	DownloadUrl string    `json:"download_url"`
}

type ProviderOptions

type ProviderOptions struct {
	Version *VersionOptions
	Name    string
	Url     string
}

type Status

type Status string
const (
	Unreleased Status = "unreleased"
	Active     Status = "active"
	Revoked    Status = "revoked"
)

type VagrantCloud

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

func New

func New(accessToken string) *VagrantCloud

func (*VagrantCloud) CreateBox

func (v *VagrantCloud) CreateBox(opts *BoxOptions) (*Box, error)

func (*VagrantCloud) CreateProvider

func (v *VagrantCloud) CreateProvider(opts *ProviderOptions) (*Provider, error)

func (*VagrantCloud) CreateVersion

func (v *VagrantCloud) CreateVersion(opts *VersionOptions) (*Version, error)

func (*VagrantCloud) DeleteBox

func (v *VagrantCloud) DeleteBox(opts *BoxOptions) (*Box, error)

func (*VagrantCloud) DeleteProvider

func (v *VagrantCloud) DeleteProvider(opts *ProviderOptions) (*Provider, error)

func (*VagrantCloud) DeleteVersion

func (v *VagrantCloud) DeleteVersion(opts *VersionOptions) (*Version, error)

func (*VagrantCloud) GetBox

func (v *VagrantCloud) GetBox(opts *BoxOptions) (*Box, error)

func (*VagrantCloud) GetProvider

func (v *VagrantCloud) GetProvider(opts *ProviderOptions) (*Provider, error)

func (*VagrantCloud) GetVersion

func (v *VagrantCloud) GetVersion(opts *VersionOptions) (*Version, error)

func (*VagrantCloud) Release

func (v *VagrantCloud) Release(opts *VersionOptions) (*Version, error)

func (*VagrantCloud) Revoke

func (v *VagrantCloud) Revoke(opts *VersionOptions) (*Version, error)

func (*VagrantCloud) UpdateBox

func (v *VagrantCloud) UpdateBox(opts *BoxOptions) (*Box, error)

func (*VagrantCloud) UpdateProvider

func (v *VagrantCloud) UpdateProvider(opts *ProviderOptions) (*Provider, error)

func (*VagrantCloud) UpdateVersion

func (v *VagrantCloud) UpdateVersion(opts *VersionOptions) (*Version, error)

func (*VagrantCloud) UploadProvider

func (v *VagrantCloud) UploadProvider(opts *ProviderOptions, data io.Reader) (*Provider, error)

type Version

type Version struct {
	Version             string     `json:"version"`
	Status              Status     `json:"status"`
	DescriptionHtml     string     `json:"description_html"`
	DescriptionMarkdown string     `json:"description_markdown"`
	CreatedAt           time.Time  `json:"created_at"`
	UpdatedAt           time.Time  `json:"updated_at"`
	Number              string     `json:"number"`
	Downloads           int        `json:"downloads"`
	ReleaseUrl          string     `json:"release_url"`
	RevokeUrl           string     `json:"revoke_url"`
	Providers           []Provider `json:"providers"`
}

type VersionOptions

type VersionOptions struct {
	Box         *BoxOptions
	Number      string
	Version     string
	Description string
}

Jump to

Keyboard shortcuts

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