Documentation ¶
Index ¶
- Variables
- type Basis
- type Box
- type BoxCollection
- type BoxMetadata
- type BoxProvider
- type BoxVersion
- type CapabilityPlatform
- type Command
- type Communicator
- type CommunicatorMessage
- type Config
- type ConnectionInfo
- type CorePluginManager
- type DefaultProviderOptions
- type Downloader
- type Folder
- type Guest
- type Host
- type Machine
- type MachineState
- type MachineSyncedFolder
- type Named
- type NamedPlugin
- type PluginManager
- type Project
- type Provider
- type Provisioner
- type Push
- type Seeder
- type Seeds
- type SshInfo
- type State
- type StateBag
- type Symbol
- type SyncedFolder
- type Target
- type TargetIndex
- type Type
- type Vagrantfile
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeMap = map[Type]interface{}{ BasisType: (*Basis)(nil), BoxCollectionType: (*BoxCollection)(nil), BoxType: (*Box)(nil), MachineType: (*Machine)(nil), PluginManagerType: (*PluginManager)(nil), ProjectType: (*Project)(nil), StateBagType: (*StateBag)(nil), TargetIndexType: (*TargetIndex)(nil), TargetType: (*Target)(nil), }
TypeMap is a mapping of Type to the nil pointer to the interface of that type. This can be used with libraries such as mapper.
View Source
var TypeStringMap = map[Type]string{ BasisType: "basis", BoxCollectionType: "boxcollection", BoxMetadataType: "boxmetadata", BoxType: "box", MachineType: "machine", PluginManagerType: "pluginmanager", ProjectType: "project", StateBagType: "statebag", TargetIndexType: "targetindex", TargetType: "target", }
Functions ¶
This section is empty.
Types ¶
type Basis ¶
type Basis interface { Boxes() (boxes BoxCollection, err error) CWD() (path path.Path, err error) DataDir() (dir *datadir.Basis, err error) DefaultPrivateKey() (path path.Path, err error) DefaultProvider() (name string, err error) Host() (host Host, err error) ResourceId() (string, error) TargetIndex() (index TargetIndex, err error) Vagrantfile() (Vagrantfile, error) UI() (ui terminal.UI, err error) io.Closer }
type Box ¶
type Box interface { // Check if a box is allowed AutomaticUpdateCheckAllowed() (allowed bool, err error) // Deletes the box Destroy() (err error) // The directory on disk where this box exists Directory() (path path.Path, err error) // Checks if the box has an update HasUpdate(version string) (updateAvailable bool, err error) // Checks if the box has an update and returns the metadata (from the metadata url), // the newer version, and newer provider. UpdateInfo(version string) (updateAvailable bool, meta BoxMetadata, newVersion string, newProvider string, err error) // Checks if this box is in use according to the given machine index InUse(index TargetIndex) (inUse bool, err error) // Returns the machines from the machine index that are using the box Machines(index TargetIndex) (machines []Machine, err error) // Returns the metadata associated with the box (metadata.json within the box file) BoxMetadata() (metadata map[string]interface{}, err error) // The metadata information for this box from the metadata url (given by the box repository) Metadata() (metadata BoxMetadata, err error) // The URL to the version info and other metadata for this box MetadataURL() (url string, err error) // Box name Name() (name string, err error) // Box provider Provider() (name string, err error) // This repackages this box and outputs it to the given path. Repackage(path path.Path) (err error) // Box version Version() (version string, err error) // Compares a box to this box. Returns -1, 0, or 1 if this version is smaller, equal, or // larger than the other version, respectively. Compare(box Box) (int, error) }
type BoxCollection ¶
type BoxMetadata ¶
type BoxMetadata interface { BoxName() string LoadMetadata(url string) error Version(version string, opts ...*BoxProvider) (*BoxVersion, error) ListVersions(opts ...*BoxProvider) ([]string, error) Provider(version string, name string) (*BoxProvider, error) ListProviders(version string) ([]string, error) }
type BoxProvider ¶
type BoxProvider struct { Name string Url string Checksum string ChecksumType string Version *BoxVersion }
type BoxVersion ¶
type CapabilityPlatform ¶
type Communicator ¶
type Communicator interface { Seeder // Config() interface{} // Documentation() (*docs.Documentation, error) Download(machine Machine, source, destination string) error Execute(machine Machine, command []string, opts ...interface{}) (status int32, err error) Init(machine Machine) error Match(machine Machine) (isMatch bool, err error) PrivilegedExecute(machine Machine, command []string, opts ...interface{}) (status int32, err error) Ready(machine Machine) (isReady bool, err error) Reset(machine Machine) error Test(machine Machine, command []string, opts ...interface{}) (valid bool, err error) Upload(machine Machine, source, destination string) error WaitForReady(machine Machine, wait int) (isReady bool, err error) }
type CommunicatorMessage ¶
type Config ¶
type Config interface { Init(*component.ConfigData) (*component.ConfigData, error) Register() (*component.ConfigRegistration, error) Struct() (interface{}, error) Merge(base, toMerge *component.ConfigData) (merged *component.ConfigData, err error) Finalize(*component.ConfigData) (*component.ConfigData, error) }
type ConnectionInfo ¶
type ConnectionInfo map[string]interface{}
the ssh info in vagrant core ends up dumping out a bunch of options, but they are also ssh specific where this would be used for other stuff too (like winrm). need to think on this some more.
type CorePluginManager ¶
type DefaultProviderOptions ¶
type DefaultProviderOptions struct { CheckUsable bool Exclude []string ForceDefault bool MachineName string }
func (*DefaultProviderOptions) IsExcluded ¶
func (d *DefaultProviderOptions) IsExcluded(provider string) bool
type Downloader ¶
type Downloader interface {
Download() error
}
type Machine ¶
type Machine interface { Target AsTarget() (t Target, err error) Box() (b Box, err error) ConnectionInfo() (info *ConnectionInfo, err error) Guest() (g Guest, err error) ID() (id string, err error) Inspect() (printable string, err error) MachineState() (state *MachineState, err error) SetID(value string) (err error) SetMachineState(state *MachineState) (err error) SyncedFolders() (folders []*MachineSyncedFolder, err error) UID() (userId string, err error) }
type MachineState ¶
type MachineSyncedFolder ¶
type MachineSyncedFolder struct { Plugin SyncedFolder Folder *Folder }
type NamedPlugin ¶
type PluginManager ¶
type PluginManager interface { ListPlugins(types ...string) (plugins []*NamedPlugin, err error) GetPlugin(name, typeName string) (*NamedPlugin, error) io.Closer }
type Project ¶
type Project interface { ActiveTargets() (targets []Target, err error) Boxes() (boxes BoxCollection, err error) // accessors CWD() (path path.Path, err error) Config() (v Vagrantfile, err error) DataDir() (dir *datadir.Project, err error) DefaultPrivateKey() (path path.Path, err error) DefaultProvider(opts *DefaultProviderOptions) (name string, err error) Home() (path path.Path, err error) Host() (h Host, err error) LocalData() (path path.Path, err error) PrimaryTargetName() (name string, err error) ResourceId() (string, error) RootPath() (path path.Path, err error) // Target loads a target within this project with the given name. The // provider parameter is optional and is used to specify which provider // should be used to load the machine. This second parameter can be left // blank when fetching an existing target, but can be specified during // machine up to indicate a user flag that's been provided. Target(name string, provider string) (t Target, err error) TargetIds() (ids []string, err error) TargetIndex() (index TargetIndex, err error) TargetNames() (names []string, err error) Tmp() (path path.Path, err error) UI() (ui terminal.UI, err error) Vagrantfile() (Vagrantfile, error) VagrantfileName() (name string, err error) VagrantfilePath() (p path.Path, err error) io.Closer }
type Provisioner ¶
type Provisioner interface { Provision(machine Machine, config *component.ConfigData) (err error) Configure(machine Machine, config *component.ConfigData, rootConfig *component.ConfigData) (err error) Cleanup(machine Machine, config *component.ConfigData) (err error) }
type Symbol ¶
type Symbol string
This Symbol type represents a Symbol type in Ruby. It is required for interoperability between legacy Vagrant and Go Vagrant. It's primary function is to allow config maps from Ruby that contain Symbols to be interpreted in Go while retaining type information
type SyncedFolder ¶
type SyncedFolder interface { CapabilityPlatform Seeder Usable(machine Machine) (bool, error) Enable(machine Machine, folders []*Folder, opts ...interface{}) error Prepare(machine Machine, folders []*Folder, opts ...interface{}) error Disable(machine Machine, folders []*Folder, opts ...interface{}) error Cleanup(machine Machine, opts ...interface{}) error }
type Target ¶
type Target interface { Communicate() (comm Communicator, err error) // Config() (config interface{}, err error) DataDir() (*datadir.Target, error) Destroy() error GetUUID() (id string, err error) Metadata() (map[string]string, error) Name() (string, error) Project() (Project, error) Provider() (p Provider, err error) ProviderName() (name string, err error) Record() (*anypb.Any, error) ResourceId() (string, error) Save() error SetName(value string) (err error) SetUUID(id string) (err error) Specialize(kind interface{}) (specialized interface{}, err error) State() (State, error) UI() (ui terminal.UI, err error) UpdatedAt() (t *time.Time, err error) Vagrantfile() (v Vagrantfile, err error) io.Closer }
type TargetIndex ¶
type Vagrantfile ¶
type Vagrantfile interface { GetConfig(namespace string) (*component.ConfigData, error) GetValue(path ...string) (interface{}, error) PrimaryTargetName() (name string, err error) Target(name, provider string) (Target, error) TargetConfig(name, provider string, validateProvider bool) (Vagrantfile, error) // Returns a list of the machines that are defined within this // Vagrantfile. TargetNames() (names []string, err error) }
Source Files ¶
- basis.go
- box.go
- box_collection.go
- box_metadata.go
- capability_platform.go
- command.go
- communicator.go
- config.go
- core.go
- core_plugin_manager.go
- downloader.go
- guest.go
- host.go
- machine.go
- named_plugin.go
- plugin_manager.go
- project.go
- provider.go
- provisioner.go
- push.go
- seeder.go
- state.go
- state_bag.go
- synced_folder.go
- target.go
- target_index.go
- vagrantfile.go
Click to show internal directories.
Click to hide internal directories.