fs

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Secret *katana.Secret
	Path   string
	Mode   os.FileMode
}

Config is configuration for FS uploader

func (*Config) Validate

func (c *Config) Validate() error

Validate validates configuration

type FSUploader

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

FSUploader is FS uploader instance

func NewUploader

func NewUploader(config *Config) (*FSUploader, error)

NewUploader creates new FS uploader instance

func (*FSUploader) SetDispatcher

func (u *FSUploader) SetDispatcher(d *events.Dispatcher)

SetDispatcher sets events dispatcher

func (*FSUploader) Upload

func (u *FSUploader) Upload(file, fileName string) error

Upload uploads given file to storage

func (*FSUploader) Write added in v0.0.2

func (u *FSUploader) Write(r io.ReadCloser, fileName string, fileSize int64) error

Write writes data from given reader to given file

Jump to

Keyboard shortcuts

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