Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTUSHeadFileUploadOffsetMissing = errors.New("filebrowserui-session: tus api endpoint response is missing the upload-offset header") ErrTUSHeadFileUploadOffsetInvalid = errors.New("filebrowserui-session: tus api endpoint response upload-offset < 0, this is invalid TUS") )
Functions ¶
func NewNodeWidget ¶
func NewNodeWidget() *nodeWidget
func ShowDismissablePopup ¶
Types ¶
type Config ¶
type Config struct {
User string `json:"user"`
Pass string `json:"pass"`
// Host is the full URI of the host.
// Ex: https://filebrowser.clayton.coffee
Host string `json:"host"`
// Dir is the parent folder that contains our files.
// Ex: ~/.config/filebrowser/
Dir string `json:"-"`
// contains filtered or unexported fields
}
type ErrResumable ¶
type ErrResumable struct {
// contains filtered or unexported fields
}
ErrResumable instructs the caller that the error that was returned is resumable, and likely should be called until it returns no error. This happens because of transient errors like io.ErrUnexpectedEOF when the http request unexpectedly is closed before finishing.
func (ErrResumable) Error ¶
func (e ErrResumable) Error() string
func (ErrResumable) Unwrap ¶
func (e ErrResumable) Unwrap() error
type NodeCache ¶
type NodeCache struct {
// contains filtered or unexported fields
}
NodeCache is a non-optimal cache that does cache things but sometimes multiple requests for the same object will result in multiple filebrowser request, but eventually will keep them in cache
func NewNodeCache ¶
func NewNodeCache(sess *filebrowserSession) *NodeCache
type Resource ¶
type Resource struct {
// These fields exist only for Directories
// TODO: maybe make these fields pointers, or move them to another struct
Items []struct {
Path string `json:"path"`
Name string `json:"name"`
Size int `json:"size"`
Extension string `json:"extension"`
Modified time.Time `json:"modified"`
Mode int64 `json:"mode"`
IsDir bool `json:"isDir"`
IsSymlink bool `json:"isSymlink"`
Type string `json:"type"`
} `json:"items"`
NumDirs int `json:"numDirs"`
NumFiles int `json:"numFiles"`
Sorting struct {
By string `json:"by"`
Asc bool `json:"asc"`
} `json:"sorting"`
// Every resource will have these aspects
Path string `json:"path"`
Name string `json:"name"`
Size int `json:"size"`
Extension string `json:"extension"`
Modified time.Time `json:"modified"`
Mode int64 `json:"mode"`
IsDir bool `json:"isDir"`
IsSymlink bool `json:"isSymlink"`
Type string `json:"type"`
}
Click to show internal directories.
Click to hide internal directories.