volume

package
v0.0.0-...-39c852c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package volume provides the /volumes APIs

Index

Constants

View Source
const (
	VolumeReadonlyStateUndefined trimmer.VolumeReadonlyState = ""
	VolumeReadonlyStateOn        trimmer.VolumeReadonlyState = "on"
	VolumeReadonlyStateOff       trimmer.VolumeReadonlyState = "off"
)
View Source
const (
	VolumeOnlineStateUndefined trimmer.VolumeOnlineState = ""
	VolumeOnlineStateOn        trimmer.VolumeOnlineState = "on"
	VolumeOnlineStateOff       trimmer.VolumeOnlineState = "off"
)
View Source
const (
	VolumeAutomountStateUndefined trimmer.VolumeAutomountState = ""
	VolumeAutomountStateOn        trimmer.VolumeAutomountState = "on"
	VolumeAutomountStateOff       trimmer.VolumeAutomountState = "off"
)
View Source
const (
	VolumeStateReady      trimmer.VolumeState = "ready"
	VolumeStateFailed     trimmer.VolumeState = "failed"
	VolumeStateScanning   trimmer.VolumeState = "scanning"
	VolumeStateLoading    trimmer.VolumeState = "loading"
	VolumeStateOffloading trimmer.VolumeState = "offloading"
	VolumeStateWiping     trimmer.VolumeState = "wiping"
	VolumeStateWatching   trimmer.VolumeState = "watching"
	VolumeStateStopping   trimmer.VolumeState = "stopping"
	VolumeStateTransit    trimmer.VolumeState = "transit"
	VolumeStateLost       trimmer.VolumeState = "lost"
	VolumeStateArchived   trimmer.VolumeState = "archived"
	VolumeStateRetired    trimmer.VolumeState = "retired"
)
View Source
const (
	VolumeTypeClient  trimmer.VolumeType = "client"  // all volumes on local discs at clients
	VolumeTypeCloud   trimmer.VolumeType = "cloud"   // cloud storage, object stores
	VolumeTypeShuttle trimmer.VolumeType = "shuttle" // removable shuttle drives
	VolumeTypeNAS     trimmer.VolumeType = "nas"     // local network servers
	VolumeTypeSAN     trimmer.VolumeType = "san"     // local storage libraries
	VolumeTypeTape    trimmer.VolumeType = "tape"    // removable tapes
	VolumeTypeCDN     trimmer.VolumeType = "cdn"     // content-delivery network
)
View Source
const (
	VolumeProviderNone           trimmer.VolumeProvider = ""
	VolumeProviderTrimmerCloud   trimmer.VolumeProvider = "tcloud"
	VolumeProviderTrimmerGateway trimmer.VolumeProvider = "tgate"
	VolumeProviderAWS            trimmer.VolumeProvider = "s3"
)
View Source
const (
	VolumeAuthTypeNone      trimmer.VolumeAuthType = "none"      // no auth
	VolumeAuthTypeSignature trimmer.VolumeAuthType = "signature" // Trimmer url signature
	VolumeAuthTypeToken     trimmer.VolumeAuthType = "token"     // Trimmer signed token
	VolumeAuthTypeAWS       trimmer.VolumeAuthType = "aws"       // Amazon IAM user
	VolumeAuthTypeOAuth2    trimmer.VolumeAuthType = "oauth2"    // OAuth2 authorization code grant
	VolumeAuthTypeBasic     trimmer.VolumeAuthType = "basic"     // user:password-based auth
)
View Source
const (
	VolumeAuthScopeNone   trimmer.VolumeAuthScope = "none"
	VolumeAuthScopeRead   trimmer.VolumeAuthScope = "read"
	VolumeAuthScopeCreate trimmer.VolumeAuthScope = "create"
	VolumeAuthScopeDelete trimmer.VolumeAuthScope = "delete"
)

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, volId string) error

func Get

func Get(ctx context.Context, volId string, params *trimmer.VolumeParams) (*trimmer.Volume, error)

func ListMounts

func ListMounts(ctx context.Context, volId string, params *trimmer.WorkspaceListParams) *mount.Iter

func ListReplicas

func ListReplicas(ctx context.Context, volId string, params *trimmer.MediaListParams) *replica.Iter

func Update

func Update(ctx context.Context, volId string, params *trimmer.VolumeParams) (*trimmer.Volume, error)

Types

type Client

type Client struct {
	B    trimmer.Backend
	Key  trimmer.ApiKey
	Sess *trimmer.Session
}

Client is used to invoke /orgs APIs.

func (Client) Delete

func (c Client) Delete(ctx context.Context, volId string) error

func (Client) Get

func (c Client) Get(ctx context.Context, volId string, params *trimmer.VolumeParams) (*trimmer.Volume, error)

func (Client) GetManifest

func (c Client) GetManifest(ctx context.Context, volId string) (*trimmer.VolumeManifest, error)

func (Client) ListMounts

func (c Client) ListMounts(ctx context.Context, volId string, params *trimmer.WorkspaceListParams) *mount.Iter

func (Client) ListReplicas

func (c Client) ListReplicas(ctx context.Context, volId string, params *trimmer.MediaListParams) *replica.Iter

func (Client) Update

func (c Client) Update(ctx context.Context, volId string, params *trimmer.VolumeParams) (*trimmer.Volume, error)

type Iter

type Iter struct {
	*trimmer.Iter
}

Iter is an iterator for lists of Volumes. The embedded Iter carries methods with it; see its documentation for details.

func (*Iter) Volume

func (i *Iter) Volume() *trimmer.Volume

Volume returns the most recent Volume visited by a call to Next.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL