Documentation ¶
Overview ¶
Package versioner implements common interfaces for file versioning and a simple default versioning scheme.
Index ¶
- Constants
- Variables
- func ExtractTag(path string) string
- func TagFilename(name, tag string) string
- func UntagFilename(path string) (string, string)
- type External
- type FileVersion
- type Interval
- type Simple
- type Staggered
- type Trashcan
- type Versioner
- func NewExternal(folderID string, filesystem fs.Filesystem, params map[string]string) Versioner
- func NewSimple(folderID string, fs fs.Filesystem, params map[string]string) Versioner
- func NewStaggered(folderID string, folderFs fs.Filesystem, params map[string]string) Versioner
- func NewTrashcan(folderID string, fs fs.Filesystem, params map[string]string) Versioner
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, filesystem fs.Filesystem, params map[string]string) Versioner{}
Functions ¶
func ExtractTag ¶ added in v0.14.44
Returns the tag from a filename, whether at the end or middle.
func TagFilename ¶ added in v0.14.44
Inserts ~tag just before the extension of the filename.
func UntagFilename ¶ added in v0.14.44
Types ¶
type FileVersion ¶ added in v0.14.44
type Staggered ¶
type Staggered struct {
// contains filtered or unexported fields
}
type Trashcan ¶
type Trashcan struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.