Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var VaildFiletypes = []string{"jpeg", "jpg", "png", "gif", "mp4", "mp3", "wav", "avi", "mkv", "mov", "webm"}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// Host is the URL to the server where the files are hosted.
Host string
// Folders contains folder and the amount of files they contain.
Folders map[string]int
// RootFolder is the root folder of the media files.
// It's only used to generate a correct URL to the media being served.
RootFolder string
}
func (*Client) HandleFolder ¶
HandleFolder will update the `Client.Folders` variable depending on what has happened with the supplied path.
A path with no extension will be treated as a folder.
func (*Client) RandomFile ¶
Click to show internal directories.
Click to hide internal directories.