Documentation
¶
Index ¶
- type DateMethod
- type DateRange
- func (dr DateRange) InRange(d time.Time) bool
- func (dr DateRange) IsSet() bool
- func (dr DateRange) MarshalJSON() ([]byte, error)
- func (dr DateRange) MarshalText() ([]byte, error)
- func (dr DateRange) MarshalYAML() (interface{}, error)
- func (dr *DateRange) Set(s string) (err error)
- func (dr *DateRange) SetTZ(tz *time.Location)
- func (dr DateRange) String() string
- func (dr DateRange) Type() string
- func (dr *DateRange) UnmarshalJSON(data []byte) error
- func (dr *DateRange) UnmarshalText(data []byte) error
- func (dr *DateRange) UnmarshalYAML(unmarshal func(interface{}) error) error
- type ExtensionList
- type IncludeType
- type InclusionFlags
- type OnErrorsFlag
- func (f OnErrorsFlag) MarshalJSON() ([]byte, error)
- func (f OnErrorsFlag) MarshalTOML() ([]byte, error)
- func (f OnErrorsFlag) MarshalText() ([]byte, error)
- func (f OnErrorsFlag) MarshalYAML() (interface{}, error)
- func (f *OnErrorsFlag) RegisterFlags(fs *pflag.FlagSet, prefix string)
- func (f *OnErrorsFlag) Set(value string) error
- func (f OnErrorsFlag) String() string
- func (OnErrorsFlag) Type() string
- func (f *OnErrorsFlag) UnmarshalJSON(data []byte) error
- func (f *OnErrorsFlag) UnmarshalTOML(data []byte) error
- func (f *OnErrorsFlag) UnmarshalText(data []byte) error
- func (f *OnErrorsFlag) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateMethod ¶
type DateMethod string
const ( DateMethodNone DateMethod = "NONE" DateMethodName DateMethod = "FILENAME" DateMethodEXIF DateMethod = "EXIF" DateMethodNameThenExif DateMethod = "FILENAME-EXIF" DateMethodExifThenName DateMethod = "EXIF-FILENAME" )
func (*DateMethod) Set ¶
func (dm *DateMethod) Set(s string) error
func (*DateMethod) String ¶
func (dm *DateMethod) String() string
func (*DateMethod) Type ¶
func (dm *DateMethod) Type() string
type DateRange ¶
type DateRange struct {
After, Before time.Time // todo: make After and Before private
// contains filtered or unexported fields
}
func InitDateRange ¶
InitDateRange initialize a DateRange with a string (for tests)
func (DateRange) MarshalJSON ¶ added in v0.29.0
MarshalJSON implements json.Marshaler
func (DateRange) MarshalText ¶ added in v0.29.0
MarshalText implements encoding.TextMarshaler
func (DateRange) MarshalYAML ¶ added in v0.29.0
MarshalYAML implements yaml.Marshaler
func (*DateRange) Set ¶
Implements the flags interface A day: 2022-01-01 A month: 2022-01 A year: 2022 A range: 2022-01-01,2022-12-31
func (*DateRange) UnmarshalJSON ¶ added in v0.29.0
UnmarshalJSON implements json.Unmarshaler
func (*DateRange) UnmarshalText ¶ added in v0.29.0
UnmarshalText implements encoding.TextUnmarshaler
func (*DateRange) UnmarshalYAML ¶ added in v0.29.0
UnmarshalYAML implements yaml.Unmarshaler
type ExtensionList ¶
type ExtensionList []string
An ExtensionList is a list of file extensions, where each extension is a string that starts with a dot (.) and is in lowercase.
func (ExtensionList) Exclude ¶
func (sl ExtensionList) Exclude(s string) bool
Exclude checks if the extension list excludes a given extension.
func (ExtensionList) Include ¶
func (sl ExtensionList) Include(s string) bool
Include checks if the extension list includes a given extension.
func (*ExtensionList) Set ¶
func (sl *ExtensionList) Set(s string) error
Implements the flag interface
func (ExtensionList) String ¶
func (sl ExtensionList) String() string
func (ExtensionList) Type ¶
func (sl ExtensionList) Type() string
func (ExtensionList) Validate ¶
func (sl ExtensionList) Validate() ExtensionList
Validate validates the extension list by converting to lowercase.
type IncludeType ¶ added in v0.24.7
type IncludeType string
An IncludeType is either of the constants below which represents a collection of extensions.
const ( IncludeAll IncludeType = "" IncludeVideo IncludeType = "VIDEO" IncludeImage IncludeType = "IMAGE" )
func (*IncludeType) Set ¶ added in v0.24.7
func (t *IncludeType) Set(v string) error
Implements the flag interface
func (IncludeType) String ¶ added in v0.24.7
func (t IncludeType) String() string
func (IncludeType) Type ¶ added in v0.24.7
func (t IncludeType) Type() string
type InclusionFlags ¶
type InclusionFlags struct {
ExcludedExtensions ExtensionList
IncludedExtensions ExtensionList
IncludedType IncludeType
DateRange DateRange
}
func (*InclusionFlags) RegisterFlags ¶ added in v0.29.0
func (flags *InclusionFlags) RegisterFlags(fs *pflag.FlagSet, prefix string)
func (*InclusionFlags) SetIncludeTypeExtensions ¶ added in v0.29.0
func (flags *InclusionFlags) SetIncludeTypeExtensions()
SetIncludeTypeExtensions must be called once flags are parsed
func (*InclusionFlags) Validate ¶
func (flags *InclusionFlags) Validate()
Validate validates the common flags.
type OnErrorsFlag ¶ added in v0.29.0
type OnErrorsFlag int
const ( OnErrorsStop OnErrorsFlag = iota OnErrorsStopAfter OnErrorsNeverStop = -1 )
func (OnErrorsFlag) MarshalJSON ¶ added in v0.29.0
func (f OnErrorsFlag) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (OnErrorsFlag) MarshalTOML ¶ added in v0.29.0
func (f OnErrorsFlag) MarshalTOML() ([]byte, error)
MarshalTOML implements the toml.Marshaler interface.
func (OnErrorsFlag) MarshalText ¶ added in v0.29.0
func (f OnErrorsFlag) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler
func (OnErrorsFlag) MarshalYAML ¶ added in v0.29.0
func (f OnErrorsFlag) MarshalYAML() (interface{}, error)
MarshalYAML implements the yaml.Marshaler interface.
func (*OnErrorsFlag) RegisterFlags ¶ added in v0.29.0
func (f *OnErrorsFlag) RegisterFlags(fs *pflag.FlagSet, prefix string)
func (*OnErrorsFlag) Set ¶ added in v0.29.0
func (f *OnErrorsFlag) Set(value string) error
func (OnErrorsFlag) String ¶ added in v0.29.0
func (f OnErrorsFlag) String() string
func (OnErrorsFlag) Type ¶ added in v0.29.0
func (OnErrorsFlag) Type() string
func (*OnErrorsFlag) UnmarshalJSON ¶ added in v0.29.0
func (f *OnErrorsFlag) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
func (*OnErrorsFlag) UnmarshalTOML ¶ added in v0.29.0
func (f *OnErrorsFlag) UnmarshalTOML(data []byte) error
UnmarshalTOML implements the toml.Unmarshaler interface.
func (*OnErrorsFlag) UnmarshalText ¶ added in v0.29.0
func (f *OnErrorsFlag) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler
func (*OnErrorsFlag) UnmarshalYAML ¶ added in v0.29.0
func (f *OnErrorsFlag) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.