Documentation
¶
Index ¶
- Constants
- type App
- func (a *App) Authorization() (*objects.Authorization, error)
- func (a *App) Delete() error
- func (a *App) Germ() string
- func (a *App) Latest() (*Version, error)
- func (a *App) Name() string
- func (a *App) Version(ref string) (*Version, error)
- func (a *App) VersionList(curs *Cursor) (*VersionList, error)
- type AppList
- type AppListItem
- type Bucket
- type BucketList
- type BucketListItem
- type BuildArguments
- type BuildManager
- type BuildOperation
- type Client
- type ClientConfig
- type Cursor
- type DiskFormat
- type FileInfo
- type FilesystemInfo
- type InjectionType
- type KernelType
- type MachinesManager
- func (m *MachinesManager) Get(id string) (*VirtualMachine, error)
- func (m *MachinesManager) ListMachines(cursor *Cursor) (*VirtualMachineList, error)
- func (m *MachinesManager) Provision(args *ProvisionArguments) (*ProvisionOperation, error)
- func (m *MachinesManager) WithEnvironment(r *Repository) *MachinesManager
- type ProvisionArguments
- type ProvisionOperation
- type PushArguments
- type PushOperation
- type RepositoriesManager
- type Repository
- func (r *Repository) Download(bucket, app, version string, w io.Writer) error
- func (r *Repository) GetBucket(name string) (*Bucket, error)
- func (r *Repository) ListBuckets(cursor *Cursor) (*BucketList, error)
- func (r *Repository) NewBucket(name string) error
- func (r *Repository) Push(args *PushArguments) (*PushOperation, error)
- func (r *Repository) Upload() error
- type Version
- func (v *Version) Delete() error
- func (v *Version) File() (*objects.PackageFragment, error)
- func (v *Version) Germ() string
- func (v *Version) ID() string
- func (v *Version) Icon() (*objects.PackageFragment, error)
- func (v *Version) RemoveTag() error
- func (v *Version) SetTag(tag string) error
- func (v *Version) Tag() (string, error)
- func (v *Version) UploadedTime() time.Time
- type VersionList
- type VersionListItem
- type VirtualMachine
- func (v *VirtualMachine) Delete() error
- func (v *VirtualMachine) ID() string
- func (v *VirtualMachine) Image() error
- func (v *VirtualMachine) Name() string
- func (v *VirtualMachine) Pause() error
- func (v *VirtualMachine) Start() error
- func (v *VirtualMachine) Status() (string, error)
- func (v *VirtualMachine) Stop() error
- func (v *VirtualMachine) Tail() error
- type VirtualMachineList
- type VirtualMachineListItem
Constants ¶
const ( ProductionKernel = KernelType("prod") DebugKernel = KernelType("debug") )
const ( DiskFormatRAW = DiskFormat("raw") DiskFormatGCP = DiskFormat("gcp") DiskFormatVMDK = DiskFormat("vmdk") DiskFormatSparseVMDK = DiskFormat("sparse-vmdk") DiskFormatStreamOptimizedVMDK = DiskFormat("steam-optimized-vmdk") DiskFormatOVA = DiskFormat("ova") DiskFormatVHD = DiskFormat("vhd") DiskFormatXVA = DiskFormat("xva") )
const ( BinaryInjection = "binary" ConfigurationInjection = "configuration" IconInjection = "icon" FileInjection = "file" ArchiveInjection = "archive" PackageInjection = "package" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App represents an application within a bucket in a Vorteil repository.
func (*App) Authorization ¶
func (a *App) Authorization() (*objects.Authorization, error)
Authorization returns a list of all Access Control Rules defined for the App, where the caller has adequate permissions to do so. Exactly one returned argument will be non-nil.
func (*App) Germ ¶
Germ returns a string that can be used to identify this app. This can be used in operations such as build, or run.
func (*App) Latest ¶
Latest fetches the most recently uploaded version of an App. Exactly one returned argument will be non-nil.
func (*App) Version ¶
Version fetches a specific version of an App. The 'ref' argument can be either the hash or tag of the desired version. If the specified version could not be found, or the user has insufficient permissions, an error will be returned. Exactly one returned argument will be non-nil.
func (*App) VersionList ¶
func (a *App) VersionList(curs *Cursor) (*VersionList, error)
VersionList fetches a list of all versions of the App. The 'curs' optional argument allows for pagination information to be passed to the request. Exactly one returned argument will be non-nil.
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket ..
func (*Bucket) Authorization ¶
func (b *Bucket) Authorization() (*objects.Authorization, error)
Authorization ..
type BucketList ¶
type BucketList struct {
PageInfo objects.PageInfo
Items []BucketListItem
}
BucketList ..
type BuildArguments ¶
type BuildArguments struct {
Germ string
Injections []string
DiskFormat DiskFormat
KernelType KernelType
}
BuildArguments contain the fields used in a Build operation. Germ - a 'germ' string is an unambiguous pointer to a valid target for the
'build' operation. It could be the path to a package/project, or an app/version within a repository [see (*App).Germ()]
Injections - a list of injection IDs, which the user can reference when
injecting various components to the build process (such as configuration settings, files, etc.)
DiskFormat - the desired format of the resulting disk image. KernelType - "prod" or "debug" Repository - the repository that will perform the build operation (can be
left 'nil'; defaults to 'local').
type BuildManager ¶
type BuildManager struct {
// contains filtered or unexported fields
}
BuildManager provides access to build APIs.
func (*BuildManager) AnalyzeDisk ¶
func (b *BuildManager) AnalyzeDisk(path string) (*FilesystemInfo, error)
AnalyzeDisk ..
func (*BuildManager) Build ¶
func (b *BuildManager) Build(args *BuildArguments) (*BuildOperation, error)
Build a Vorteil disk image.
func (*BuildManager) WithEnvironment ¶
func (m *BuildManager) WithEnvironment(r *Repository) *BuildManager
WithEnvironment ..
type BuildOperation ¶
type BuildOperation struct {
// contains filtered or unexported fields
}
BuildOperation ..
func (*BuildOperation) Inject ¶
func (b *BuildOperation) Inject(key string, itype InjectionType, value io.Reader, headers http.Header) error
Inject ..
func (*BuildOperation) Start ¶
func (b *BuildOperation) Start(w io.Writer) error
Start the build operation by providing an io.Writer to write the disk image to
func (*BuildOperation) WaitUntilFinished ¶
func (b *BuildOperation) WaitUntilFinished() error
WaitUntilFinished ..
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to the Vorteil API by establishing a connection to the specified Vorteil environment.
func (*Client) Repositories ¶
func (c *Client) Repositories() *RepositoriesManager
RepositoriesManager ..
type ClientConfig ¶
ClientConfig contains fields essential for the configuration of a new Client
type DiskFormat ¶
type DiskFormat string
type KernelType ¶
type KernelType string
type MachinesManager ¶
type MachinesManager struct {
// contains filtered or unexported fields
}
MachinesManager provides access to 'Machine' APIs
func (*MachinesManager) Get ¶
func (m *MachinesManager) Get(id string) (*VirtualMachine, error)
Get a virtual machine.
func (*MachinesManager) ListMachines ¶
func (m *MachinesManager) ListMachines(cursor *Cursor) (*VirtualMachineList, error)
List all virtual machines.
func (*MachinesManager) Provision ¶
func (m *MachinesManager) Provision(args *ProvisionArguments) (*ProvisionOperation, error)
Provision a virtual machine.
func (*MachinesManager) WithEnvironment ¶
func (m *MachinesManager) WithEnvironment(r *Repository) *MachinesManager
WithEnvironment ..
type ProvisionArguments ¶
type ProvisionArguments struct {
Germ string
InstanceName string
PoweredOn bool
Platform string
KernelType KernelType
Injections []string
}
ProvisionArguments ..
type ProvisionOperation ¶
type ProvisionOperation struct {
// contains filtered or unexported fields
}
ProvisionOperation ..
func (*ProvisionOperation) Inject ¶
func (p *ProvisionOperation) Inject(key string, itype InjectionType, value io.Reader, headers http.Header) error
Inject ..
func (*ProvisionOperation) WaitUntilFinished ¶
func (p *ProvisionOperation) WaitUntilFinished() error
WaitUntilFinished ..
type PushArguments ¶
type PushArguments struct {
Germ string
DestinationBucket string
DestinationApp string
RepositoryName string
Injections []string
}
PushArguments ..
type PushOperation ¶
type PushOperation struct {
// contains filtered or unexported fields
}
PushOperation ..
func (*PushOperation) Inject ¶
func (p *PushOperation) Inject(key string, itype InjectionType, value io.Reader, headers http.Header) error
Inject ..
func (*PushOperation) WaitUntilFinished ¶
func (p *PushOperation) WaitUntilFinished() error
WaitUntilFinished ..
type RepositoriesManager ¶
type RepositoriesManager struct {
Local *Repository
// contains filtered or unexported fields
}
RepositoriesManager provides access to the repositories APIs.
func (*RepositoriesManager) Connect ¶
func (r *RepositoriesManager) Connect(name, addr, key string, skipInsecureCheck bool) error
Connect establishes a new repository connection.
func (*RepositoriesManager) Connections ¶
func (r *RepositoriesManager) Connections() ([]Repository, error)
Connections lists all connected repositories.
func (*RepositoriesManager) Disconnect ¶
func (r *RepositoriesManager) Disconnect(name string) error
Disconnect destroys the Repository object and unregisters it from the current Vorteil environment.
func (*RepositoriesManager) Get ¶
func (r *RepositoriesManager) Get(name string) (*Repository, error)
Get a specific repository.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository provides access to APIs specific to a single repository.
func (*Repository) Download ¶
func (r *Repository) Download(bucket, app, version string, w io.Writer) error
Download an object (app/version) from the repository.
func (*Repository) GetBucket ¶
func (r *Repository) GetBucket(name string) (*Bucket, error)
GetBucket ..
func (*Repository) ListBuckets ¶
func (r *Repository) ListBuckets(cursor *Cursor) (*BucketList, error)
ListBuckets returns a list of buckets within the repository.
func (*Repository) NewBucket ¶
func (r *Repository) NewBucket(name string) error
NewBucket creates a new bucket within the repository.
func (*Repository) Push ¶
func (r *Repository) Push(args *PushArguments) (*PushOperation, error)
Push ..
func (*Repository) Upload ¶
func (r *Repository) Upload() error
Upload an object (app/version) to the repository.
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version ..
type VersionList ¶
type VersionList struct {
PageInfo objects.PageInfo
Items []VersionListItem
}
VersionList ..
type VersionListItem ¶
VersionListItem ..
type VirtualMachine ¶
type VirtualMachine struct {
// contains filtered or unexported fields
}
VirtualMachine provides access to APIs specific to a single virtual machine.
func (*VirtualMachine) Image ¶
func (v *VirtualMachine) Image() error
Image downloads the virtual machine disk image.
func (*VirtualMachine) Status ¶
func (v *VirtualMachine) Status() (string, error)
Status returns the state of the virtual machine.
func (*VirtualMachine) Tail ¶
func (v *VirtualMachine) Tail() error
Tail the virtual machine serial output.
type VirtualMachineList ¶
type VirtualMachineList struct {
PageInfo objects.PageInfo
Items []VirtualMachineListItem
}
VirtualMachineList ..
type VirtualMachineListItem ¶
type VirtualMachineListItem struct {
Cursor string
VirtualMachine VirtualMachine
}
VirtualMachineListItem ..