Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ZeStream/zestream-server
/ functions
Functions
65 in github.com/ZeStream/zestream-server
⨍
Functions
65
◇
Types & classes
18
↓ 7 callers
Function
LogErr
LogErr logs the given error
utils/helper.go:42
↓ 4 callers
Function
GetDownloadFilePathName
* GetDownloadFilePathName returns the absolute path of the file present in downloads folder takes fileName as argument */
utils/files.go:17
↓ 3 callers
Function
Fetch
* Fetch downlods a file to downloads folder from the given url, and names it as given fileName */
utils/fetch.go:17
↓ 3 callers
Function
GetCloudSession
()
configs/cloud.go:48
↓ 3 callers
Function
failOnError
(err error)
configs/rabbitmq.go:49
↓ 2 callers
Function
CheckFileExistsAndAppendToBuffer
checkFileExistsAndAppendToBuffer checks if the given output file exits, then appends the path to buffer.
utils/files.go:116
↓ 2 callers
Function
DeleteFile
DeleteFile deletes the given file
utils/files.go:107
↓ 2 callers
Function
FileIDGen
* FileIDGen returns an unique videoID and appends the fileExtension to it, it takes the fileExtensionas parameter */
utils/helper.go:17
↓ 2 callers
Function
GetGCPClient
(isServiceUser bool)
configs/cloud.go:83
↓ 2 callers
Function
GetOutputFilePathName
* GetOutputFilePathName returns the absolute path of the file present in output folder takes fileName as argument */
utils/files.go:41
↓ 2 callers
Function
GetWhichCloudIsEnabled
()
utils/upload.go:232
↓ 2 callers
Method
IsEmpty
()
types/video.go:40
↓ 2 callers
Function
IsFileValid
IsFileValid checks if the file is present on that path, returns true, if file is there else false
utils/files.go:82
↓ 2 callers
Method
Upload
(walker fileWalk)
utils/upload.go:30
↓ 2 callers
Function
createDirPath
createDirPath creates a directory at the given path
utils/files.go:65
↓ 1 callers
Method
Get
(c *gin.Context)
controllers/image.go:11
↓ 1 callers
Function
GetCloudStoragePath
(basePath, fileName string)
utils/upload.go:355
↓ 1 callers
Function
GetQueryHash
GetQueryHash returns the md5 hash of the query string
utils/helper.go:60
↓ 1 callers
Function
GetRabbitMQ
()
configs/rabbitmq.go:45
↓ 1 callers
Function
GetSignedURL
(fileID string, basePath string)
utils/upload.go:248
↓ 1 callers
Function
GetUploader
(containerName string, videoId string)
utils/upload.go:33
↓ 1 callers
Function
Init
Init function will perform all route operations
routes/routes.go:11
↓ 1 callers
Function
InitCloud
()
configs/cloud.go:24
↓ 1 callers
Function
InitRabbitMQ
()
configs/rabbitmq.go:18
↓ 1 callers
Function
LoadEnv
()
configs/configs.go:69
↓ 1 callers
Function
PublishEvent
(ch *rmq.Channel, q *rmq.Queue, ctx context.Context, body []byte)
utils/rabbitmq.go:9
↓ 1 callers
Function
RemoveExtensionFromFile
RemoveExtensionFromFile returns the fileName without the extension, if fileName doesn't end with ext, it returns the fileName
utils/files.go:77
↓ 1 callers
Function
SortString
sortString sorts the given string
utils/helper.go:49
↓ 1 callers
Function
StringToArgsGenerator
StringToArgsGenerator takes a map of arguments, and it returns the command line form of arguments
utils/files.go:90
↓ 1 callers
Function
UploadToCloudStorage
(uploader Uploader, path string)
utils/upload.go:65
↓ 1 callers
Function
VideoProcessConsumer
(ch *rmq.Channel, q *rmq.Queue)
service/consumer.go:16
↓ 1 callers
Function
WrapStringInQuotes
WrapStringInQuotes returns the string wrapped in quotes
utils/helper.go:32
↓ 1 callers
Function
deleteVideoFiles
deleteVideoFiles deletes the videos given in the path
service/dash.go:168
↓ 1 callers
Function
failOnError
(err error)
main.go:39
↓ 1 callers
Function
generateAWSSignedURL
(filePath string)
utils/upload.go:286
↓ 1 callers
Function
generateAudioFiles
(targetFile string, outputPath string, wg *sync.WaitGroup)
service/dash.go:48
↓ 1 callers
Function
generateAzureSignedURL
(filePath string)
utils/upload.go:329
↓ 1 callers
Function
generateBlobSAS
(blobURL azblob.BlobURL, permissions string)
utils/upload.go:308
↓ 1 callers
Function
generateDash
(fileName string, watermark types.WaterMark)
service/dash.go:16
↓ 1 callers
Function
generateGCPSignedURL
(filePath string)
utils/upload.go:269
↓ 1 callers
Function
generateMPD
generateMPD (Media Presentation Description), generates the XML description file for the given output path.
service/dash.go:135
↓ 1 callers
Function
generateMultiBitrateAudio
(targetFile string, outputFile string, fileType constants.FILE_TYPE, wg *sync.WaitGroup)
service/dash.go:72
↓ 1 callers
Function
generateMultiBitrateVideo
(targetFile string, outputFile string, fileType constants.FILE_TYPE, watermark types.WaterMark, wg *sync.WaitG
service/dash.go:91
↓ 1 callers
Function
generateThumbnailFiles
(targetFile string, outputPath string, wg *sync.WaitGroup)
service/dash.go:64
↓ 1 callers
Function
generateThumbnails
generateThumbnail generates a thumbnail at given timestamp, from the target file and write it to output file
service/dash.go:116
↓ 1 callers
Function
generateVideoFiles
(targetFile string, outputPath string, watermark types.WaterMark, wg *sync.WaitGroup)
service/dash.go:56
↓ 1 callers
Function
getAWSSession
()
configs/cloud.go:52
↓ 1 callers
Function
getAzureCreds
()
configs/cloud.go:70
↓ 1 callers
Function
getEnv
(key, fallback string)
configs/configs.go:81
↓ 1 callers
Function
getInput
Returns input based on if the watermark is needed or not
service/dash.go:177
↓ 1 callers
Function
getOverlay
Returns an overlay of watermark which can be used in Filter
service/dash.go:199
↓ 1 callers
Function
makeRequest
* MakeRequest is a helper function that creates an HTTP request and sends it to the router, returning the response that the router returns. It takes i
controllers/test.go:32
↓ 1 callers
Function
processVideo
(video *types.Video, guard <-chan int)
service/consumer.go:67
↓ 1 callers
Function
router
router is a function that returns a new instance of the Gin router with a single route defined:
controllers/test.go:12
Function
GetPresignedURL
(c *gin.Context)
controllers/upload.go:11
Function
Ping
(c *gin.Context)
controllers/ping.go:9
Function
TestFetch
(t *testing.T)
utils/fetch_test.go:11
Function
TestFileIDGen
(t *testing.T)
utils/helper_test.go:10
Function
TestPing
* TestPing is a test function that sends a GET request to the "/api/v1/ping" route and verifies that the response has a 200 OK status code and a body
controllers/ping_test.go:13
Method
Upload
(walker fileWalk)
utils/upload.go:99
Method
Upload
(walker fileWalk)
utils/upload.go:141
Method
Upload
(walker fileWalk)
utils/upload.go:189
Method
Video
(c *gin.Context)
controllers/process.go:15
Method
WalkFunc
(path string, info os.FileInfo, err error)
utils/upload.go:80
Function
main
()
main.go:13