core

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PathParam          string
	DirectoryNameParam string
	SortTypeParam      string
	TimeSpanParam      string
)

Functions

func ParseParam

func ParseParam()

Types

type Exporter

type Exporter interface {
	SetUp(setting *Setting)
	Export() error
}

type Scanner

type Scanner interface {
	SetUp(path string) error
	Scan() (*[]fs.DirEntry, error)
}

type Setting

type Setting struct {
	ImportPath    string
	SortedEntries map[string][]*fs.DirEntry `comment:"map key: timestamp ,for example '2006-01-02 15.04.05'; file_type ,for example:'docx' "`
	SortOptions   *SortOptions
}

type SortOpt

type SortOpt func(options *SortOptions)

func WithFileType

func WithFileType() SortOpt

func WithTimeSpan

func WithTimeSpan(timeSpan string) SortOpt

type SortOptions

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

func NewSortOptions

func NewSortOptions() *SortOptions

func (*SortOptions) SortByFileType added in v0.1.1

func (s *SortOptions) SortByFileType() bool

func (*SortOptions) SortByTimeSpan added in v0.1.1

func (s *SortOptions) SortByTimeSpan() bool

func (*SortOptions) TimeFormat added in v0.1.1

func (s *SortOptions) TimeFormat() string

type Sorter

type Sorter interface {
	SetUp(dirEntries *[]fs.DirEntry, options ...SortOpt)
	Sort() (map[string][]*fs.DirEntry, error)
}

type Tidy

type Tidy interface {
	Exec() error
}

Jump to

Keyboard shortcuts

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