datboxdiscord

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: GPL-3.0 Imports: 28 Imported by: 0

README

datbox

A re-implementation of Disbox, a Discord-based file storage service. Aims to run locally with some extra features.

File Versions

Datbox currently offers 2 file formats. The default is version 1.

Continuous Deflate (Version 0)

This is the legacy file format of this program. Due to poor early designs, some features are not supported with this format. It's almost certainly always worse to choose this format.

Pros
  • Fewer chunks uploaded: This version uses a continuous deflate stream for uploading
Cons
  • No encryption: The format does not support storing password within itself
  • Expensive dynamic read: To read a certain chunk, one must decode every chunk before it
  • Lack of header: This format has no special headers, making it indistinguishable from a random file

Chunked Deflate + Encrypt (Version 1)

The currently used file format.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscordProvider

func NewDiscordProvider(configPath string) (datboxcore.Provider, error)

Types

type DirEntry

type DirEntry struct {
	Name string
	Stat os.FileInfo
}

type DiscordProvider

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

func (*DiscordProvider) Copy

func (prov *DiscordProvider) Copy(src, dst string) error

func (*DiscordProvider) Delete

func (prov *DiscordProvider) Delete(path string, recursive, remote bool) error

func (*DiscordProvider) Get

func (prov *DiscordProvider) Get(path string, writer io.WriteCloser, progressCallback func(datboxcore.Progress)) error

func (*DiscordProvider) Info

func (prov *DiscordProvider) Info() (datboxcore.ProviderInfo, error)

func (*DiscordProvider) List

func (prov *DiscordProvider) List(path string) ([]fs.DirEntry, error)

func (*DiscordProvider) Mkdir

func (prov *DiscordProvider) Mkdir(path string, parents bool) error

func (*DiscordProvider) Move

func (prov *DiscordProvider) Move(src, dst string) error

func (*DiscordProvider) Put

func (prov *DiscordProvider) Put(path string, size int64, reader io.ReadCloser, progressCallback func(datboxcore.Progress)) error

type FileInfo

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

func (FileInfo) IsDir

func (info FileInfo) IsDir() bool

func (FileInfo) ModTime

func (info FileInfo) ModTime() time.Time

func (FileInfo) Mode

func (info FileInfo) Mode() os.FileMode

func (FileInfo) Name

func (info FileInfo) Name() string

func (FileInfo) Size

func (info FileInfo) Size() int64

func (FileInfo) Sys

func (info FileInfo) Sys() any

type TransferResult

type TransferResult struct {
	StartTime time.Time
	EndTime   time.Time
	Size      uint64
	Chunks    int
	Checksum  []byte
}

type UploadResult

type UploadResult struct {
	Path     string
	Chunks   int
	Checksum []byte
}

type WrappedDirEntry

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

func (*WrappedDirEntry) Info

func (e *WrappedDirEntry) Info() (fs.FileInfo, error)

func (*WrappedDirEntry) IsDir

func (e *WrappedDirEntry) IsDir() bool

func (*WrappedDirEntry) Name

func (e *WrappedDirEntry) Name() string

func (*WrappedDirEntry) Type

func (e *WrappedDirEntry) Type() fs.FileMode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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