package
0.0.0-20220310001652-86fb063ac326
Repository: https://github.com/wos-project/wos-core-go.git
Documentation: pkg.go.dev
# Functions
AddFileToTarWriter adds a file to a tar file.
AddSuffixToBasename adds suffix to base of filename, for example filename.jpg to filename_t1.jpg.
ChangeSuffix changes the suffix of filename from .from to .to.
ConvertHeicJpg converts an heic file to jpeg in place by using temp folder to create new file then copies to original convert -format jpg input.heic output.jpg.
ConvertM4aMp4 converts an m4a file to mp4 in place by using temp folder to create new file then copies to original ffmpeg -y -i input.m4a -c:a copy output.mp4.
CopyDir is a recursive file copy.
CopyFile copies a file from src to dest full path.
CreateAltSizes creates thumbnails of mediaPath, saves thumbnails, and returns paths and names of uploaded images.
CreateThumbnailsInFolder creates thumbnails for all images in the folder.
DeleteFile deletes a file.
ExpandTarFile expands a tar file tarFilePath to expandDirPath.
ExpandTarReader expands a tar stream to expandDirPath.
GenerateBase64Rand generates a base64 random string.
Generate ipfs style cid.
GenerateRandomNumber generates a random number.
GeoBoundingBox returns bounding box given center point and range d in kilometers This is an estimate since uses the hypotenuse at NW and SE.
GeoDistance returns the greater circle distance in kilometers between two points.
GetFileContentType detects the content type of a file.
GetMediaFormatAndMetadata returns media format (image, audio, video), detail (jpeg, png, etc.) and metadata map for a media file.
GetMediaSuffix returns the suffix of a file name.
GetThumbnailName returns thumbnail name given image name and format.
InitMediaStorage initializes media storage.
# Constants
audio base code.
base used for comparisons.
audio only aac.
mp3.
audio only mp4.
audio only ogg.
heic.
jpeg.
png.
mov.
mp4.
image base code.
video base code.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
IPFS_Driver struct manages IPFS.
S3_1Driver struct manages S3 uploads and URL generation.
No description provided by the author