utilities

package
v0.0.0-...-346a917 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectFiles

func CollectFiles(path, fileExt string) []*models.FileInfo

func GetAllFilesOfType

func GetAllFilesOfType(cd int) []ext_models.FileMetaInfo

func GetBufferedAudioSegment

func GetBufferedAudioSegment(id string, seg *models.AudioSegment) (beep.StreamSeekCloser, beep.Format)

func GetBytesBackend

func GetBytesBackend(headerCb func(*http.Request), seg *models.AudioSegment, args ...interface{}) ([]byte, error)

GetBytesOpenReader gets an item from the backend and returns the response body as a []byte

headerCb is a function taking an *http.Request that customies it

seg an AudioSegment that will be updated with the response' "Content-Range" header, nost useful for partial data

args is an arbitrary number of items to be used in string formatting

func GetBytesOpenReader

func GetBytesOpenReader(headerCb func(*http.Request), seg *models.AudioSegment, args ...interface{}) io.ReadCloser

GetBytesOpenReader gets an item from the backend and returns the responsre body as a fresh reader

headerCb is a function taking an *http.Request that customies it

seg an AudioSegment that will be updated with the response' "Content-Range" header, nost useful for partial data

args is an arbitrary number of items to be used in string formatting

func UploadFileViaPresign

func UploadFileViaPresign(filepath string, filesize int64, wg *sync.WaitGroup)

Types

This section is empty.

Jump to

Keyboard shortcuts

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