Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Exists(ctx context.Context, remotePath string) (bool, error)
- func (c *Client) ListDir(ctx context.Context, dirPath string) ([]Response, error)
- func (c *Client) MkDir(ctx context.Context, dirPath string) error
- func (c *Client) ReadFile(ctx context.Context, filePath string) (io.ReadCloser, int64, error)
- func (c *Client) WriteFile(ctx context.Context, remotePath string, content io.Reader) error
- type Multistatus
- type Prop
- type Propstat
- type ResourceType
- type Response
- type Webdav
- func (w *Webdav) Exists(ctx context.Context, storagePath string) bool
- func (w *Webdav) Init(ctx context.Context, cfg config.StorageConfig) error
- func (w *Webdav) JoinStoragePath(p string) string
- func (w *Webdav) ListFiles(ctx context.Context, dirPath string) ([]storagetypes.FileInfo, error)
- func (w *Webdav) Name() string
- func (w *Webdav) OpenFile(ctx context.Context, filePath string) (io.ReadCloser, int64, error)
- func (w *Webdav) Save(ctx context.Context, r io.Reader, storagePath string) error
- func (w *Webdav) Type() storenum.StorageType
- type WebdavMethod
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BaseURL string
Username string
Password string
// contains filtered or unexported fields
}
type Multistatus ¶ added in v0.52.0
type Multistatus struct {
XMLName xml.Name `xml:"multistatus"`
Responses []Response `xml:"response"`
}
WebDAV XML structures for PROPFIND response
type Prop ¶ added in v0.52.0
type Prop struct {
ResourceType ResourceType `xml:"resourcetype"`
GetContentLength int64 `xml:"getcontentlength"`
GetLastModified string `xml:"getlastmodified"`
DisplayName string `xml:"displayname"`
}
type ResourceType ¶ added in v0.52.0
type ResourceType struct {
Collection *struct{} `xml:"collection"`
}
func (ResourceType) IsCollection ¶ added in v0.52.0
func (rt ResourceType) IsCollection() bool
type Webdav ¶
type Webdav struct {
// contains filtered or unexported fields
}
func (*Webdav) JoinStoragePath ¶ added in v0.11.0
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" WebdavMethodGet WebdavMethod = "GET" )
Click to show internal directories.
Click to hide internal directories.