versioner

package
v0.11.12 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2015 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package versioner implements common interfaces for file versioning and a simple default versioning scheme.

Index

Constants

View Source
const (
	TimeFormat = "20060102-150405"
	TimeGlob   = "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]" // glob pattern matching TimeFormat
)

Variables

View Source
var Factories = map[string]func(folderID string, folderDir string, params map[string]string) Versioner{}

Functions

This section is empty.

Types

type External added in v0.11.0

type External struct {
	// contains filtered or unexported fields
}

func (External) Archive added in v0.11.0

func (v External) Archive(filePath string) error

Archive moves the named file away to a version archive. If this function returns nil, the named file does not exist any more (has been archived).

type Interval

type Interval struct {
	// contains filtered or unexported fields
}

type Simple

type Simple struct {
	// contains filtered or unexported fields
}

func (Simple) Archive

func (v Simple) Archive(filePath string) error

Archive moves the named file away to a version archive. If this function returns nil, the named file does not exist any more (has been archived).

type Staggered

type Staggered struct {
	// contains filtered or unexported fields
}

func (Staggered) Archive

func (v Staggered) Archive(filePath string) error

Archive moves the named file away to a version archive. If this function returns nil, the named file does not exist any more (has been archived).

type Trashcan added in v0.11.9

type Trashcan struct {
	// contains filtered or unexported fields
}

func (*Trashcan) Archive added in v0.11.9

func (t *Trashcan) Archive(filePath string) error

Archive moves the named file away to a version archive. If this function returns nil, the named file does not exist any more (has been archived).

func (*Trashcan) Serve added in v0.11.9

func (t *Trashcan) Serve()

func (*Trashcan) Stop added in v0.11.9

func (t *Trashcan) Stop()

func (*Trashcan) String added in v0.11.9

func (t *Trashcan) String() string

type Versioner

type Versioner interface {
	Archive(filePath string) error
}

func NewExternal added in v0.11.0

func NewExternal(folderID, folderPath string, params map[string]string) Versioner

func NewSimple

func NewSimple(folderID, folderPath string, params map[string]string) Versioner

func NewStaggered

func NewStaggered(folderID, folderPath string, params map[string]string) Versioner

func NewTrashcan added in v0.11.9

func NewTrashcan(folderID, folderPath string, params map[string]string) Versioner

Jump to

Keyboard shortcuts

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