arc

package
v0.0.0-...-2e5aea3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateErrorf

func TranslateErrorf(format string, a ...interface{}) error

Types

type Archive

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

func NewArchive

func NewArchive(path string) (arc *Archive)

NewArchive creates Archive object by giving absolute path to where the archive files are located

func (*Archive) FileInfo

func (arc *Archive) FileInfo(relPath string) (fileInfo api.FileInfo, err error)

func (*Archive) InstallAPI

func (arc *Archive) InstallAPI(r chi.Router)

InstallAPI installs the api handler functions

func (*Archive) Path

func (arc *Archive) Path() string

type FileActionError

type FileActionError struct {
	FilePaths []string
	Err       error
}

func (*FileActionError) Error

func (fa *FileActionError) Error() string

func (*FileActionError) Unwrap

func (fa *FileActionError) Unwrap() error

type RenameAction

type RenameAction struct {
	OldPath string
	NewPath string
}

func (*RenameAction) Do

func (ra *RenameAction) Do() error

func (*RenameAction) Undo

func (ra *RenameAction) Undo() error

type SliceOption

type SliceOption func(*sliceOption)

func WithContainsFilter

func WithContainsFilter(filter string, languageTag language.Tag) SliceOption

func WithStringDistanceSort

func WithStringDistanceSort(comp string) SliceOption

type StringSet

type StringSet map[string]struct{}

func Tags

func Tags(element string, isDir bool) (date time.Time, tags StringSet)

Tags parses and returns element's tags and timestamp if available

func (StringSet) Slice

func (s StringSet) Slice() []string

type TagSet

type TagSet map[string]*api.Tag

func (TagSet) AddFileTags

func (ts TagSet) AddFileTags(str ...string)

AddFileTags adds tag and increases tag file count

func (TagSet) AddSelectedTags

func (ts TagSet) AddSelectedTags(str ...string)

AddSelected

func (TagSet) AddTags

func (ts TagSet) AddTags(str ...string)

AddTags adds tag without increasing tag file count

func (TagSet) Slice

func (ts TagSet) Slice(opts ...SliceOption) []*api.Tag

Slice the map and return filtered/sorted slice func (s StringSet) Slice(filter string, languageTag language.Tag, sorted bool) []string {

type TagSorter

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

func NewTagSorter

func NewTagSorter(lessFunc func(i, j *api.Tag) bool, tagSlice []*api.Tag) *TagSorter

func (TagSorter) Len

func (ts TagSorter) Len() int

func (TagSorter) Less

func (ts TagSorter) Less(i, j int) bool

func (TagSorter) Swap

func (ts TagSorter) Swap(i, j int)

type TranslateError

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

func (*TranslateError) Error

func (ta *TranslateError) Error() string

func (*TranslateError) Translate

func (ta *TranslateError) Translate(printer *message.Printer) string

Jump to

Keyboard shortcuts

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