core

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFileParts

func DeleteFileParts(fileID int) error

The function deletes all the file parts of a file then finally deletes the file itself

It deletes the file first then it's registration in the parts table.

'TODO: Add a way to check for sudden stops in delete i.e. program crash in middle of function'

func DownloadAndReassembleFile

func DownloadAndReassembleFile(fileID int, outputFileName string) error

Assembles the binary files in one big file

func FileHash

func FileHash(ctx context.Context, file *os.File) (string, error)

FileHash calculates the SHA-256 hash of the given file.

func FilePartsCalc

func FilePartsCalc(fileSize int64) int

FilePartsCalc calculates the number of parts required to split the file.

func Upload

func Upload(inputFile string, groupID int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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