types

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KiloBytes int64 = 1024
	MegaBytes int64 = KiloBytes * 1024
	GigaBytes int64 = MegaBytes * 1024
	TeraBytes int64 = GigaBytes * 1024

	Minute int = 60
	Hour   int = Minute * 60
	Day    int = Hour * 24
)

Variables

This section is empty.

Functions

func IsDigitsOnly

func IsDigitsOnly(s string) bool

IsDigitsOnly checks if the given string contains only digits

func IsNotDirError

func IsNotDirError(err error) bool

IsNotDirError evaluates if the given error is NotDirError

func IsNotFileError

func IsNotFileError(err error) bool

IsNotFileError evaluates if the given error is NotFileError

func IsWebDAVError added in v0.11.6

func IsWebDAVError(err error) bool

IsWebDAVError evaluates if the given error is WebDAVError

func MakeDateTimeFromString

func MakeDateTimeFromString(str string) (time.Time, error)

func MakeDateTimeString

func MakeDateTimeString(t time.Time) string

func MakeDateTimeStringHM

func MakeDateTimeStringHM(t time.Time) string

func NewNotDirError

func NewNotDirError(dest string) error

func NewNotFileError

func NewNotFileError(dest string) error

func NewWebDAVError added in v0.11.6

func NewWebDAVError(url string, errorCode int) error

func ParseSize

func ParseSize(size string) (int64, error)

func ParseTime

func ParseTime(t string) (int, error)

func SizeString added in v0.11.3

func SizeString(bytes int64) string

Types

type NotDirError

type NotDirError struct {
	Path string
}

func (*NotDirError) Error

func (err *NotDirError) Error() string

Error returns error message

func (*NotDirError) Is

func (err *NotDirError) Is(other error) bool

Is tests type of error

func (*NotDirError) ToString

func (err *NotDirError) ToString() string

ToString stringifies the object

type NotFileError

type NotFileError struct {
	Path string
}

func (*NotFileError) Error

func (err *NotFileError) Error() string

Error returns error message

func (*NotFileError) Is

func (err *NotFileError) Is(other error) bool

Is tests type of error

func (*NotFileError) ToString

func (err *NotFileError) ToString() string

ToString stringifies the object

type WebDAVError added in v0.11.6

type WebDAVError struct {
	URL       string
	ErrorCode int
}

func (*WebDAVError) Error added in v0.11.6

func (err *WebDAVError) Error() string

Error returns error message

func (*WebDAVError) Is added in v0.11.6

func (err *WebDAVError) Is(other error) bool

Is tests type of error

func (*WebDAVError) ToString added in v0.11.6

func (err *WebDAVError) ToString() string

ToString stringifies the object

Jump to

Keyboard shortcuts

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