File tree 15 files changed +43
-8
lines changed
15 files changed +43
-8
lines changed Original file line number Diff line number Diff line change
1
+ language : go
2
+
3
+ go :
4
+ - " 1.10"
5
+
6
+ before_install :
7
+ - go get -t -v ./...
8
+
9
+ script :
10
+ - go test -race -coverprofile=coverage.txt -covermode=atomic
11
+
12
+ after_success :
13
+ - bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change
1
+ ![ Release] ( https://img.shields.io/github/release/bmatcuk/go-vagrant.svg?branch=master )
2
+ [ ![ Build Status] ( https://travis-ci.org/bmatcuk/go-vagrant.svg?branch=master )] ( https://travis-ci.org/bmatcuk/go-vagrant )
3
+ [ ![ codecov.io] ( https://img.shields.io/codecov/c/github/bmatcuk/go-vagrant.svg?branch=master )] ( https://codecov.io/github/bmatcuk/go-vagrant?branch=master )
4
+ [ ![ GoDoc] ( https://godoc.org/github.com/bmatcuk/go-vagrant?status.svg )] ( https://godoc.org/github.com/bmatcuk/go-vagrant )
5
+
1
6
# go-vagrant
2
- A golang wrapper around Vagrant
7
+ A golang wrapper around the Vagrant command-line utility.
Original file line number Diff line number Diff line change 8
8
"sync"
9
9
)
10
10
11
+ // Base functionality and fields for all commands constructed from the
12
+ // VagrantClient.
11
13
type BaseCommand struct {
12
14
OutputParser
13
15
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // A DestroyCommand specifies the options and output of vagrant destroy.
3
4
type DestroyCommand struct {
4
5
BaseCommand
5
6
DestroyResponse
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // A HaltCommand specifies the options and output of vagrant halt.
3
4
type HaltCommand struct {
4
5
BaseCommand
5
6
HaltResponse
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // PortCommand specifies the options and output of vagrant port.
3
4
type PortCommand struct {
4
5
BaseCommand
5
6
PortResponse
6
7
}
7
8
8
9
// Run vagrant port. After setting options as appropriate, you must call Run()
9
- // or Start() followed by Wait() to execute. Errors will be recorded in Error.
10
+ // or Start() followed by Wait() to execute. Output will be in ForwardedPorts
11
+ // with any error in Error.
10
12
func (client * VagrantClient ) Port () * PortCommand {
11
13
return & PortCommand {
12
14
BaseCommand : newBaseCommand (client ),
Original file line number Diff line number Diff line change 4
4
"strings"
5
5
)
6
6
7
+ // ProvisionCommand specifies the options and output of vagrant provision
7
8
type ProvisionCommand struct {
8
9
BaseCommand
9
10
ProvisionResponse
Original file line number Diff line number Diff line change 4
4
"strings"
5
5
)
6
6
7
+ // ReloadCommand specifies the options and output of vagrant reload
7
8
type ReloadCommand struct {
8
9
BaseCommand
9
10
ReloadResponse
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // SSHConfigCommand specifies options and output from vagrant ssh-config
3
4
type SSHConfigCommand struct {
4
5
BaseCommand
5
6
SSHConfigResponse
@@ -10,8 +11,8 @@ type SSHConfigCommand struct {
10
11
}
11
12
12
13
// Run vagrant ssh-config. After setting options as appropriate, you must call
13
- // Run() or Start() followed by Wait() to execute. Errors will be recorded in
14
- // Error.
14
+ // Run() or Start() followed by Wait() to execute. Output will be in Configs
15
+ // and any error will be in Error.
15
16
func (client * VagrantClient ) SSHConfig () * SSHConfigCommand {
16
17
return & SSHConfigCommand {
17
18
BaseCommand : newBaseCommand (client ),
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // StatusCommand specifies options and output from vagrant status
3
4
type StatusCommand struct {
4
5
BaseCommand
5
6
StatusResponse
6
7
}
7
8
8
9
// Run vagrant status. After setting options as appropriate, you must call
9
- // Run() or Start() followed by Wait() to execute. Errors will be recorded in
10
- // Error.
10
+ // Run() or Start() followed by Wait() to execute. Output will be in Status
11
+ // and any error will be in Error.
11
12
func (client * VagrantClient ) Status () * StatusCommand {
12
13
return & StatusCommand {
13
14
BaseCommand : newBaseCommand (client ),
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // SuspendCommand specifies options and output from vagrant suspend
3
4
type SuspendCommand struct {
4
5
BaseCommand
5
6
SuspendResponse
Original file line number Diff line number Diff line change 4
4
"strings"
5
5
)
6
6
7
+ // UpCommand specifies options and output from vagrant up.
7
8
type UpCommand struct {
8
9
BaseCommand
9
10
UpResponse
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
+ // VersionCommand specifies options and output from vagrant version
3
4
type VersionCommand struct {
4
5
BaseCommand
5
6
VersionResponse
6
7
}
7
8
8
9
// Run vagrant version. After setting options as appropriate, you must call
9
- // Run() or Start() followed by Wait() to execute. Errors will be recorded in
10
- // Error.
10
+ // Run() or Start() followed by Wait() to execute. Output will be in
11
+ // InstalledVersion and LatestVersion and any error will be in Error.
11
12
func (client * VagrantClient ) Version () * VersionCommand {
12
13
return & VersionCommand {
13
14
BaseCommand : newBaseCommand (client ),
Original file line number Diff line number Diff line change
1
+ // go-vagrant is a golang wrapper around the vagrant command-line utility.
2
+ package main
Original file line number Diff line number Diff line change 6
6
"path/filepath"
7
7
)
8
8
9
+ // Library users should construct a new VagrantClient using NewVagrantClient().
10
+ // From the client, vagrant commands can be constructed such as: client.Up().
9
11
type VagrantClient struct {
10
12
// Directory where the Vagrantfile can be found.
11
13
//
You can’t perform that action at this time.
0 commit comments