Documentation
¶
Index ¶
- Constants
- func ApiBase() string
- func ApiLogin() string
- func ApiPublic() string
- func ApiPublicDL() string
- func ApiRaw() string
- func ApiResources() string
- func ApiShare() string
- func ApiShares() string
- func BaseUrl() string
- func CheckFalseShareConfig(config ShareConfig) bool
- func ChecksumsDefine() []string
- func SetApiBase(baseUrl string)
- func ShareUnitDefine() []string
- func ShareUrlBase() string
- type FileInfo
- type LoginRequest
- type Resources
- type ResourcesSorting
- type ShareConfig
- type ShareLink
Constants ¶
View Source
const ( ChecksumMd5 = "md5" ChecksumSha1 = "sha1" ChecksumSha256 = "sha256" ChecksumSha512 = "sha512" )
View Source
const ( )
View Source
const (
AuthHeadKey = "X-Auth"
)
View Source
const (
)
Variables ¶
This section is empty.
Functions ¶
func ApiPublicDL ¶
func ApiPublicDL() string
ApiPublicDL to download file for share if share file has password can use file_browser_client.SharesGet by password add token
func ApiResources ¶
func ApiResources() string
func CheckFalseShareConfig ¶
func CheckFalseShareConfig(config ShareConfig) bool
CheckFalseShareConfig config pass will return false
func ChecksumsDefine ¶
func ChecksumsDefine() []string
func SetApiBase ¶
func SetApiBase(baseUrl string)
func ShareUnitDefine ¶
func ShareUnitDefine() []string
func ShareUrlBase ¶
func ShareUrlBase() string
Types ¶
type FileInfo ¶
type FileInfo struct {
// at file browser path
Path string `json:"path"`
// Name file name
Name string `json:"name"`
// unit byte
Size int64 `json:"size"`
// Extension name of extension
Extension string `json:"extension"`
// Modified time utc string
Modified string `json:"modified"`
//
Mode os.FileMode `json:"mode"`
// Type [ blob text ] text will send content
Type string `json:"type"`
Subtitles []string `json:"subtitles,omitempty"`
Content string `json:"content,omitempty"`
// Checksums
// key will be [ md5 sha1 sha256 sha512 ]
Checksums map[string]string `json:"checksums,omitempty"`
Token string `json:"token,omitempty"`
}
type LoginRequest ¶
type Resources ¶
type Resources struct {
Sorting ResourcesSorting `json:"sorting"`
// IsDir true item Items NumDirs NumFiles
// false no Items NumDirs NumFiles
IsDir bool `json:"isDir"`
IsSymlink bool `json:"isSymlink"`
Items []FileInfo `json:"items"`
NumDirs int `json:"numDirs"`
NumFiles int `json:"numFiles"`
// at file browser path
Path string `json:"path"`
// Name file name
Name string `json:"name"`
// unit byte
Size int64 `json:"size"`
// Extension name of extension
Extension string `json:"extension"`
// Modified time utc string
Modified string `json:"modified"`
//
Mode os.FileMode `json:"mode"`
// Type [ blob text ] text will send content
Type string `json:"type"`
Subtitles []string `json:"subtitles,omitempty"`
Content string `json:"content,omitempty"`
// Checksums
// key will be [ md5 sha1 sha256 sha512 ]
Checksums map[string]string `json:"checksums,omitempty"`
Token string `json:"token,omitempty"`
}
type ResourcesSorting ¶
type ShareConfig ¶
type ShareConfig struct {
}
ShareConfig @doc https://github.com/filebrowser/filebrowser/blob/master/share/share.go
type ShareLink ¶
type ShareLink struct {
// share hash
Hash string `json:"hash" storm:"id,index"`
// Path
// this path start / , is filebrowser user root start.
// time of expire is utc seconds
Expire int64 `json:"expire"`
// password hash
PasswordHash string `json:"password_hash,omitempty"`
// URL-Safe and is used to download links in password-protected shares via a
// query arg.
Token string `json:"token,omitempty"`
}
ShareLink Link is the information needed to build a shareable link.
Click to show internal directories.
Click to hide internal directories.