utils

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultArtistPictureName = "default/default_artist.png"
	DefaultAlbumCoverArtName = "default/default_album.png"
	DefaultTrackCoverArtName = "default/default_album.png"
)

Variables

View Source
var CreateId = createIdGenerator()

Functions

func ConvertAlbumCoverURL

func ConvertAlbumCoverURL(c echo.Context, val sql.NullString) string

func ConvertArtistPictureURL

func ConvertArtistPictureURL(c echo.Context, val sql.NullString) string

func ConvertImageURL

func ConvertImageURL(c echo.Context, val sql.NullString, def string) string

func ConvertTrackCoverURL

func ConvertTrackCoverURL(c echo.Context, val sql.NullString) string

func ConvertURL

func ConvertURL(c echo.Context, path string) string

func CopyFile

func CopyFile(src, dst string) (int64, error)

func Decode

func Decode(input interface{}, output interface{}) error

func FormatTime

func FormatTime(t int) string

func GetSingleFile

func GetSingleFile(form *multipart.Form, name string) (*multipart.FileHeader, error)

func HasMusic

func HasMusic(entries []fs.DirEntry) bool

func IsFileLossyFormat

func IsFileLossyFormat(file string) bool

func IsLossyFormatExt

func IsLossyFormatExt(ext string) bool

func IsMultiDisc

func IsMultiDisc(entries []fs.DirEntry) bool

func IsMultiDiscName

func IsMultiDiscName(name string) bool

func IsMusicFile

func IsMusicFile(p string) bool

func IsValidImageExt

func IsValidImageExt(ext string) bool

func IsValidTrackExt

func IsValidTrackExt(ext string) bool

func ParseAuthHeader

func ParseAuthHeader(authHeader string) (string, error)

func SymlinkReplace

func SymlinkReplace(src, dst string) error

func WriteFormFile

func WriteFormFile(file *multipart.FileHeader, dst string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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