backend

package
v0.0.0-...-640912d Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileNotFound = errors.New("file not found")

Functions

This section is empty.

Types

type FSBackend

type FSBackend interface {
	Start() error
	Stop() error
	HeadFile(filename string) (*FileInfo, error)
	GetFile(filename string) (io.ReadCloser, error)
	PutFile(filename string, contentType string, override bool, fileReader io.Reader) (int64, error)
	DeleteFile(filename string) error
}

type FileInfo

type FileInfo struct {
	Size         int64
	LastModified int64
	ContentType  string
}

type MinioClient

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

func NewMinioClient

func NewMinioClient(config *configs.MinioConfig) *MinioClient

func (*MinioClient) DeleteFile

func (mc *MinioClient) DeleteFile(filename string) error

func (*MinioClient) GetFile

func (mc *MinioClient) GetFile(filename string) (io.ReadCloser, error)

func (*MinioClient) HeadFile

func (mc *MinioClient) HeadFile(filename string) (*FileInfo, error)

func (*MinioClient) ListFolder

func (mc *MinioClient) ListFolder(folder string) ([]string, error)

func (*MinioClient) PutFile

func (mc *MinioClient) PutFile(filename string, contentType string, override bool, fileReader io.Reader) (int64, error)

func (*MinioClient) Start

func (mc *MinioClient) Start() error

func (*MinioClient) Stop

func (mc *MinioClient) Stop() error

type SambaClient

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

func NewSambaClient

func NewSambaClient(config *configs.SambaConfig) *SambaClient

func (*SambaClient) DeleteFile

func (c *SambaClient) DeleteFile(filename string) error

func (*SambaClient) GetFile

func (c *SambaClient) GetFile(filename string) (io.ReadCloser, error)

func (*SambaClient) HeadFile

func (c *SambaClient) HeadFile(filename string) (*FileInfo, error)

func (*SambaClient) PutFile

func (c *SambaClient) PutFile(filename string, contentType string, override bool, fileReader io.Reader) (int64, error)

func (*SambaClient) Start

func (c *SambaClient) Start() error

func (*SambaClient) Stop

func (c *SambaClient) Stop() error

type WebdavClient

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

func NewWebdavClient

func NewWebdavClient(config *configs.WebdavConfig) *WebdavClient

func (*WebdavClient) DeleteFile

func (c *WebdavClient) DeleteFile(filename string) error

func (*WebdavClient) GetFile

func (c *WebdavClient) GetFile(filename string) (io.ReadCloser, error)

func (*WebdavClient) HeadFile

func (c *WebdavClient) HeadFile(filename string) (*FileInfo, error)

func (*WebdavClient) PutFile

func (c *WebdavClient) PutFile(filename string, contentType string, override bool, fileReader io.Reader) (int64, error)

func (*WebdavClient) Start

func (c *WebdavClient) Start() error

func (*WebdavClient) Stop

func (c *WebdavClient) Stop() error

Jump to

Keyboard shortcuts

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