vagrant_go

package module
v0.0.0-...-55f7361 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 10 Imported by: ? 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.

README

vagrant-go

Build Status

Unofficial Vagrant client in Golang that parses --machine-readable output from vagrant binary.

Do not use it, it's work in progress.

Installation

> go get github.com/syndbg/vagrant-go

Usage

To be filled

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	Name     string
	Provider string
	Version  string
}

type BoxAPI

type BoxAPI interface {
	List() ([]*Box, error)
}

type Client

type Client struct {
	Config *Config

	Box    BoxAPI
	Global GlobalAPI
	// contains filtered or unexported fields
}

func NewClient

func NewClient(
	config *Config,
	commandRunFunc func(cmd string, args ...string) ([]byte, error),
	lookPathFunc func(file string) (string, error),
) (*Client, error)

type Config

type Config struct {
	// BinaryName is the name of the vagrant executable that's going to be used. It must be present in $PATH.
	BinaryName string
}

func DefaultConfig

func DefaultConfig() *Config

type DestroyOptions

type DestroyOptions struct {
	WorkingDirectory string
	Force            bool
	Parallel         bool
}

func DefaultDestroyOptions

func DefaultDestroyOptions() *DestroyOptions

type GlobalAPI

type GlobalAPI interface {
	Up(options *UpOptions) error
	Destroy(options *DestroyOptions) error
	SshConfig(options *SshConfigOptions) (*ssh_config.Config, error)
}

type OsExecutor

type OsExecutor interface {
	Chdir(dir string) error
	Getwd() (string, error)
}

type SshConfigOptions

type SshConfigOptions struct {
	WorkingDirectory string
	Name             string
}

func DefaultSshConfigOptions

func DefaultSshConfigOptions() *SshConfigOptions

type UpOptions

type UpOptions struct {
	WorkingDirectory string
	Provision        bool
	ProvisionWith    []string
	DestroyOnError   bool
	Parallel         bool
	Provider         string
	InstallProvider  bool
}

func DefaultUpOptions

func DefaultUpOptions() *UpOptions

Jump to

Keyboard shortcuts

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