versioner

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2014 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const TimeLayout = "20060102-150405"

Variables

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

Functions

This section is empty.

Types

type Interval

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

type Simple

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

The type holds our configuration

func (Simple) Archive

func (v Simple) Archive(filePath string) error

Move away the named file 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
}

The type holds our configuration

func (Staggered) Archive

func (v Staggered) Archive(filePath string) error

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

type Versioner

type Versioner interface {
	Archive(filePath string) error
}

func NewSimple

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

The constructor function takes a map of parameters and creates the type.

func NewStaggered

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

The constructor function takes a map of parameters and creates the type.

Jump to

Keyboard shortcuts

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