fileshare

package module
v0.0.0-...-13f2e2d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(n int) []byte

func Hex

func Hex(n int) string

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(workdir string, filename string) (*DB, error)

func (*DB) AddEntry

func (db *DB) AddEntry(ud UploadDescription) error

func (*DB) CheckFileName

func (db *DB) CheckFileName(filename string, folder string)

func (*DB) Close

func (db *DB) Close()

func (*DB) DeleteFile

func (db *DB) DeleteFile(filename string, folder string) error

func (*DB) GetFiles

func (db *DB) GetFiles() []UploadDescription

func (*DB) StartBackgroundPrune

func (db *DB) StartBackgroundPrune(folder string)

type UploadDescription

type UploadDescription struct {
	Name      string
	Extension string
	Size      int64
	Expiry    time.Time
}

func (*UploadDescription) GetFullName

func (ud *UploadDescription) GetFullName() string

func (*UploadDescription) GetHumanExpiry

func (ud *UploadDescription) GetHumanExpiry() string

func (*UploadDescription) GetHumanSize

func (ud *UploadDescription) GetHumanSize() string

func (*UploadDescription) GetJSON

func (ud *UploadDescription) GetJSON() ([]byte, error)

func (*UploadDescription) GetURL

func (ud *UploadDescription) GetURL() string

Directories

Path Synopsis
cmd
client command
server command

Jump to

Keyboard shortcuts

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