fileshare

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

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

Go to latest
Published: Jun 15, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssetsFS embed.FS
View Source
var TemplatesFS embed.FS

Functions

func NewDirectoryController

func NewDirectoryController(service *Service) chi.Router

Types

type Service

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

func NewService

func NewService(db *storage.Storage, root *os.Root,
	mailer web.Mailer) *Service

func (*Service) AddFileChunk

func (s *Service) AddFileChunk(ctx context.Context, reference string, r io.Reader) error

func (*Service) CommitFile

func (s *Service) CommitFile(ctx context.Context, reference string) error

func (*Service) CreateDirectory

func (s *Service) CreateDirectory(ctx context.Context, path string) error

func (*Service) DeletePaths

func (s *Service) DeletePaths(ctx context.Context, paths []string) error

func (*Service) InitFile

func (s *Service) InitFile(ctx context.Context,
	path,
	name string,
	size uint) (string, error)

func (*Service) ListEntries

func (s *Service) ListEntries(ctx context.Context, path string) ([]fs.FileInfo, error)

func (Service) SendLoginEmail

func (s Service) SendLoginEmail(recipient mail.Address, token legacyweb.TokenID) error

func (*Service) ZipPaths

func (s *Service) ZipPaths(ctx context.Context, w io.Writer, paths []string) error

type UserData

type UserData struct {
	ID      uuid.UUID
	HomeDir string
}

func (*UserData) Bucket

func (ud *UserData) Bucket() string

func (*UserData) BucketKey

func (ud *UserData) BucketKey() []byte

Jump to

Keyboard shortcuts

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