Documentation
¶
Index ¶
- func ParseRangeHeader(rangeHeader string, fileSize int64) (start, end int64, err error)
- type DownloadOptions
- type FileInfo
- type ListOptions
- type Manager
- func (m *Manager) Copy(ctx context.Context, srcPath, dstPath string, user string) error
- func (m *Manager) CreateDir(ctx context.Context, path string, user string) error
- func (m *Manager) CreateHardlink(ctx context.Context, target, linkPath string, user string) error
- func (m *Manager) CreateSymlink(ctx context.Context, target, linkPath string, user string) error
- func (m *Manager) Delete(ctx context.Context, path string, user string) error
- func (m *Manager) Download(ctx context.Context, writer io.Writer, opts DownloadOptions, user string) (int64, error)
- func (m *Manager) GetChecksum(ctx context.Context, path string, user string) (string, error)
- func (m *Manager) GetInfo(ctx context.Context, path string, user string) (*FileInfo, error)
- func (m *Manager) List(ctx context.Context, opts ListOptions, user string) ([]FileInfo, error)
- func (m *Manager) Move(ctx context.Context, srcPath, dstPath string, user string) error
- func (m *Manager) Rename(ctx context.Context, oldPath, newPath string, user string) error
- func (m *Manager) Upload(ctx context.Context, reader io.Reader, opts UploadOptions, user string) error
- type PathValidator
- type UploadOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DownloadOptions ¶
type FileInfo ¶
type FileInfo struct {
Name string `json:"name"`
Path string `json:"path"`
Size int64 `json:"size"`
Mode os.FileMode `json:"mode"`
ModTime time.Time `json:"mod_time"`
IsDir bool `json:"is_dir"`
IsSymlink bool `json:"is_symlink"`
Owner uint32 `json:"owner,omitempty"`
Group uint32 `json:"group,omitempty"`
Permissions string `json:"permissions"`
MimeType string `json:"mime_type,omitempty"`
}
type ListOptions ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CreateHardlink ¶
func (*Manager) CreateSymlink ¶
func (*Manager) GetChecksum ¶
type PathValidator ¶
type PathValidator struct {
// contains filtered or unexported fields
}
func NewPathValidator ¶
func NewPathValidator(allowedPaths []string) *PathValidator
func (*PathValidator) ValidateName ¶
func (v *PathValidator) ValidateName(name string) error
func (*PathValidator) ValidatePath ¶
func (v *PathValidator) ValidatePath(path string) error
Click to show internal directories.
Click to hide internal directories.