app

package
v0.0.0-...-0bee801 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config  config
	Session *discordgo.Session // Reuse a single session
)

Functions

func DownloadPart

func DownloadPart(partID string) ([]byte, error)

Downloads the parts in same order as uploaded and joins each part on the fly, since each file is added to the file before and then closed, no big memory usage is observed

`Tested with 775mb file, hashes match`
'TODO: Add a way to check for sudden stops in download or stich if possible i.e. program crash in middle of function'

func Init

func Init()

Initialize the discord bot configs

func UploadFile

func UploadFile(ctx context.Context, partName string, partsStruct *db.Parts) (string, error)

UploadFile uploads a file chunk using an existing Discord session

Types

This section is empty.

Jump to

Keyboard shortcuts

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