sandbox

package
v0.11.1-pre2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 12 Imported by: 11

Documentation

Overview

Package sandbox allows checking files before re-uploading them, so any given version of a file need only be uploaded once rather than being uploaded repeatedly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetList

func GetList() []string

GetList returns a list of the ids of all the sandboxes on the system.

Types

type Sandbox

type Sandbox struct {
	ID           string
	CreationTime time.Time
	Completed    bool
	Checksums    []string
}

Sandbox is a slice of checksums of files, marked completed once they've all been uploaded or if they've already been uploaded.

func AllSandboxes added in v0.5.2

func AllSandboxes() []*Sandbox

AllSandboxes returns all sandboxes on the server.

func Get

func Get(sandboxID string) (*Sandbox, error)

Get a sandbox.

func New

func New(checksumHash map[string]interface{}) (*Sandbox, error)

New creates a new sandbox, given a map of null values with file checksums as keys.

func (*Sandbox) Delete

func (s *Sandbox) Delete() error

Delete a sandbox.

func (*Sandbox) GetName

func (s *Sandbox) GetName() string

GetName returns the sandbox's id.

func (*Sandbox) IsComplete

func (s *Sandbox) IsComplete() error

IsComplete returns true if the sandbox is complete.

func (*Sandbox) Save

func (s *Sandbox) Save() error

Save the sandbox.

func (*Sandbox) URLType

func (s *Sandbox) URLType() string

URLType returns the base element of a sandbox's URL.

func (*Sandbox) UploadChkList

func (s *Sandbox) UploadChkList() map[string]map[string]interface{}

UploadChkList builds the list of file checksums and whether or not they need to be uploaded. If they do, the upload URL is also provided.

Jump to

Keyboard shortcuts

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