utils

package
v0.0.0-...-adb56df Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractThumbnail

func ExtractThumbnail(data []byte) ([]byte, error)

func FileNameExceptExt

func FileNameExceptExt(p string) string

func IncrementFileNameSuffix

func IncrementFileNameSuffix(p string) string

func LocalTime

func LocalTime(tm time.Time, tz string) (time.Time, error)

func MD5

func MD5(val string) string

func MD5Bytes

func MD5Bytes(val []byte) string

func MustLoadLocation

func MustLoadLocation(loc string) *time.Location

func MustLocalTime

func MustLocalTime(tm time.Time, tz string) time.Time

func ParseAuthHeader

func ParseAuthHeader(header, authType string) (string, bool)

func ParseDatetime

func ParseDatetime(val string, loc *time.Location) (time.Time, error)

func RemoveTrailingSlash

func RemoveTrailingSlash(url string) string

func SplitPath

func SplitPath(path string) []string

Types

type ExifItem

type ExifItem struct {
	IfdPath     string
	TagId       uint16
	TagName     string
	TagTypeId   exifcommon.TagTypePrimitive
	TagTypeName string
	UnitCount   uint32
	Value       interface{}
	ValueString string
}

func ParseExifItem

func ParseExifItem(data []byte, exifTagID int) (*ExifItem, error)

type ExifItemList

type ExifItemList []*ExifItem

func ParseExifItemsAll

func ParseExifItemsAll(data []byte) (ExifItemList, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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