tray

package
v0.0.0-...-2337eca Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tray

type Tray struct {
	Id          string       `json:"tray_id"`
	CreatedAt   time.Time    `json:"created_at"`
	IsUploaded  bool         `json:"-"`
	Hash        string       `json:"-"`
	Full        bool         `json:"full"`
	Incremental bool         `json:"incremental"`
	Parent      *Tray        `json:"-"`
	UploadedAt  time.Time    `json:"-"`
	Size        int64        `json:"size"`
	Cubes       []*cube_data `json:"cubes"`
	// contains filtered or unexported fields
}

Top level structure for any single backup. Contains reference to previous tray.

func New

func New(backupdir string) (*Tray, error)

Create a new tray instance.

func (*Tray) CurrentCube

func (t *Tray) CurrentCube() *cube.Cube

Get the current cube from the tray.

func (*Tray) Header

func (t *Tray) Header() ([]byte, error)

Write header to current cube.

func (*Tray) Upload

func (t *Tray) Upload() error

Upload a frozen tray.

func (*Tray) WriteMolecule

func (t *Tray) WriteMolecule(m *molecule.Molecule) (n int, err error)

Write a molecule to the tray.

Jump to

Keyboard shortcuts

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