webdav

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: AGPL-3.0 Imports: 14 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")
	ErrFailedToCheckFileExists = errors.New("webdav: failed to check if file exists")
)

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) Exists added in v0.19.2

func (c *Client) Exists(ctx context.Context, remotePath string) (bool, error)

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) Exists added in v0.23.0

func (w *Webdav) Exists(ctx context.Context, storagePath string) bool

func (*Webdav) Init

func (w *Webdav) Init(ctx context.Context, cfg config.StorageConfig) error

func (*Webdav) JoinStoragePath added in v0.11.0

func (w *Webdav) JoinStoragePath(p string) string

func (*Webdav) Name added in v0.11.0

func (w *Webdav) Name() string

func (*Webdav) Save

func (w *Webdav) Save(ctx context.Context, r io.Reader, storagePath string) error

func (*Webdav) Type added in v0.11.0

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

type WebdavMethod added in v0.20.2

type WebdavMethod string
const (
	WebdavMethodMkcol    WebdavMethod = "MKCOL"
	WebdavMethodPropfind WebdavMethod = "PROPFIND"
	WebdavMethodPut      WebdavMethod = "PUT"
)

Jump to

Keyboard shortcuts

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