filehandlers

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostMetaData

type PostMetaData struct {
	*db.Post
	Cur       *db.Post
	Tags      []string
	User      *db.User
	FileEntry *utils.FileEntry
}

type ScpFileHooks

type ScpFileHooks interface {
	FileValidate(data *PostMetaData) (bool, error)
	FileMeta(data *PostMetaData) error
}

type ScpUploadHandler

type ScpUploadHandler struct {
	DBPool    db.DB
	Cfg       *shared.ConfigSite
	Hooks     ScpFileHooks
	ImgClient *imgs.ImgsAPI
}

func NewScpPostHandler

func NewScpPostHandler(dbpool db.DB, cfg *shared.ConfigSite, hooks ScpFileHooks, st storage.ObjectStorage) *ScpUploadHandler

func (*ScpUploadHandler) List

func (h *ScpUploadHandler) List(s ssh.Session, filename string) ([]os.FileInfo, error)

func (*ScpUploadHandler) Read

func (h *ScpUploadHandler) Read(s ssh.Session, filename string) (os.FileInfo, io.ReaderAt, error)

func (*ScpUploadHandler) Validate

func (h *ScpUploadHandler) Validate(s ssh.Session) error

func (*ScpUploadHandler) Write

func (h *ScpUploadHandler) Write(s ssh.Session, entry *utils.FileEntry) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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