Documentation ¶
Index ¶
- func FileWrite(path string, r io.Reader, uid, gid int, perms string) (int64, error)
- func GetAbsPath(listener, db_path string) string
- func GetListenerFromDir(dir string) string
- func GetListenerHomeDir(listener string) string
- func GetListenerUploadPath(listener string) string
- func GetLocalIp() string
- func GetMd5Checksum(filepath string) string
- func GetRelativePath(listener, local_path string) string
- func GetRelativeUploadPath(listener, local_path string) string
- func GetSystemHostname() string
- func ItemExists(path string) (bool, error)
- func MatchesIgnore(directory_path, filename string) bool
- func ReadConfigFromFile(configfile string)
- type AppError
- type BaseConfig
- type Configuration
- type DataTable
- type Database
- type FsItem
- type Listener
- type NodeTable
- type StorageGDrive
- type StorageS3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAbsPath ¶
func GetListenerFromDir ¶
func GetListenerHomeDir ¶
Fetches the home directory of the listener from the config file
func GetListenerUploadPath ¶
Fetches the base directory (upload path) from configuration file
func GetLocalIp ¶
func GetLocalIp() string
func GetMd5Checksum ¶
func GetRelativePath ¶
Gets the relative path based on the home directory, essentially stripping the listener, home directory from the absolute path
func GetRelativeUploadPath ¶
Gets the relative path for the item by trimming the absolute path with the home dir, it then appends the base directory (Upload Path) to the front of the relative path.
func GetSystemHostname ¶
func GetSystemHostname() string
func ItemExists ¶
exists returns whether the given file or directory exists or not
func MatchesIgnore ¶
func ReadConfigFromFile ¶
func ReadConfigFromFile(configfile string)
Types ¶
type BaseConfig ¶
type Configuration ¶
type Configuration struct { ServerConfig BaseConfig S3Config StorageS3 `toml:"StorageS3"` GDConfig StorageGDrive Database Database Listeners map[string]Listener }
func GetConfig ¶
func GetConfig() *Configuration
type DataTable ¶
type DataTable struct { Id int `db:"id"` Path string `db:"path"` IsDirectory bool `db:"is_dir"` Filename string `db:"filename"` Directory string `db:"directory"` Checksum string `db:"checksum"` Atime time.Time `db:"atime"` Mtime time.Time `db:"mtime"` Perms string `db:"perms"` HostUpdated string `db:"host_updated"` HostIPs string `db:"host_ips"` LastUpdate time.Time `db:"last_update"` }
type FsItem ¶
type FsItem struct { Filename string Path string Checksum string IsDir bool Mtime time.Time Perms string }
func GetFileInfo ¶
func ListFilesInDir ¶
type StorageGDrive ¶
Click to show internal directories.
Click to hide internal directories.