webdav

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToCreateDirectory = errors.New("webdav: failed to create directory")
	ErrFailedToWriteFile       = errors.New("webdav: failed to write file")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL  string
	Username string
	Password string
	// contains filtered or unexported fields
}

func NewClient added in v0.15.0

func NewClient(baseURL, username, password string, httpClient *http.Client) *Client

func (*Client) MkDir added in v0.15.0

func (c *Client) MkDir(ctx context.Context, dirPath string) error

func (*Client) WriteFile added in v0.15.0

func (c *Client) WriteFile(ctx context.Context, remotePath string, content io.Reader) error

type Webdav

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

func (*Webdav) Init

func (w *Webdav) Init(cfg config.StorageConfig) error

func (*Webdav) JoinStoragePath added in v0.11.0

func (w *Webdav) JoinStoragePath(task types.Task) string

func (*Webdav) Name added in v0.11.0

func (w *Webdav) Name() string

func (*Webdav) NewUploadStream added in v0.15.0

func (w *Webdav) NewUploadStream(ctx context.Context, storagePath string) (io.WriteCloser, error)

func (*Webdav) Save

func (w *Webdav) Save(ctx context.Context, filePath, storagePath string) error

func (*Webdav) Type added in v0.11.0

func (w *Webdav) Type() types.StorageType

type WebdavWriter added in v0.15.0

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

func (*WebdavWriter) Close added in v0.15.0

func (w *WebdavWriter) Close() error

func (*WebdavWriter) Write added in v0.15.0

func (w *WebdavWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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