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: 0

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