Documentation ¶
Index ¶
- func Archive(root string, filename string, excludes []string) error
- func Basename(filename string) string
- func CreateURL(bucket, group, name string) *url.URL
- type FileInfo
- type InstanceBuilder
- func (b *InstanceBuilder) AvailableMachineTypes() ([]MachineType, error)
- func (b *InstanceBuilder) AvailableZones() ([]Zone, error)
- func (b *InstanceBuilder) CreateInstance(name string, metadata []*MetadataItem, disksize int64) (err error)
- func (b *InstanceBuilder) DeleteInstance(name string) (err error)
- type MachineType
- type MetadataItem
- type Storage
- func (s *Storage) Delete(name string) error
- func (s *Storage) Download(filename string, out io.Writer) (err error)
- func (s *Storage) List(prefix string, resCh chan<- *FileInfo, errCh chan<- error)
- func (s *Storage) Status(filename string) (*FileInfo, error)
- func (s *Storage) Upload(in io.Reader, location *url.URL) error
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileInfo ¶
FileInfo defines file information structure.
func NewFileInfo ¶
func NewFileInfo(f *storage.Object) *FileInfo
NewFileInfo creates a file info from an object.
type InstanceBuilder ¶
type InstanceBuilder struct { Project string Zone string MachineType string // contains filtered or unexported fields }
InstanceBuilder maintains configurations to create new instances.
func NewInstanceBuilder ¶
func NewInstanceBuilder(project string) (*InstanceBuilder, error)
NewInstanceBuilder creates a new instance builder associated with a given project.
func (*InstanceBuilder) AvailableMachineTypes ¶
func (b *InstanceBuilder) AvailableMachineTypes() ([]MachineType, error)
AvailableMachineTypes returns a slice of machie type names.
func (*InstanceBuilder) AvailableZones ¶
func (b *InstanceBuilder) AvailableZones() ([]Zone, error)
AvailableZones returns a slice of zone names.
func (*InstanceBuilder) CreateInstance ¶
func (b *InstanceBuilder) CreateInstance(name string, metadata []*MetadataItem, disksize int64) (err error)
CreateInstance creates a new instance based on the bilder's configuration.
func (*InstanceBuilder) DeleteInstance ¶
func (b *InstanceBuilder) DeleteInstance(name string) (err error)
DeleteInstance deletes a given named instance.
type MachineType ¶
type MetadataItem ¶
MetadataItem has Key and Value properties.
type Storage ¶
type Storage struct { BucketName string // contains filtered or unexported fields }
Storage object.
func NewStorage ¶
NewStorage creates a new Storage object named a given bucket name. If the given bucket does not exsits, it will be created.