filehandlers

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 16 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
	Aliases   []string
}

type ScpFileHooks

type ScpFileHooks interface {
	FileValidate(s ssh.Session, data *PostMetaData) (bool, error)
	FileMeta(s ssh.Session, data *PostMetaData) error
}

type ScpUploadHandler

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

func NewScpPostHandler

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

func (*ScpUploadHandler) GetLogger added in v1.3.0

func (h *ScpUploadHandler) GetLogger() *zap.SugaredLogger

func (*ScpUploadHandler) List

func (h *ScpUploadHandler) List(s ssh.Session, fpath string, isDir bool, recursive bool) ([]os.FileInfo, error)

func (*ScpUploadHandler) Read

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