Documentation ¶
Index ¶
- Constants
- func CompressFile(source, target string) error
- func CompressedFilePath() string
- func ConfigFile() string
- func ConfigFileSQLITE() string
- func ConfigFileServerEndPoint(settings SettingsShare) string
- func ConfigFolder() string
- func ConfigServerEndPoint(settings SettingsShare) string
- func CreateConfigFile(outputFile string, settings SettingsShare) error
- func CreateTable() error
- func FileServerGET(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func GenerateQR(uuid, input string) (string, error)
- func GetLocalIps(port int, uuid string) []string
- func GetPublicIps(port int, uuid string) []string
- func GetServerIps(upnpOpened bool, port int, uuid string) []string
- func InitDB(settings_params SettingsShare) error
- func InitSettings(configFile string, settings *SettingsShare) error
- func OpenDatabase() (*sql.DB, error)
- func OpenUpnpPort(port int) bool
- func RandomFreePort() (int, error)
- func RemoveServer(uuid string) error
- func RunFileServer(settings SettingsShare)
- func StoreServer(server Server) error
- func TempFilename(prefix string, extension string) string
- func UserHomeDir(runtime_goos string) string
- type FileServerDaemon
- type Server
- type SettingsShare
- type ShareDaemon
Constants ¶
View Source
const BLACK = "\033[40m \033[0m"
View Source
const DIR_MASK = 0770
View Source
const WHITE = "\033[47m \033[0m"
Variables ¶
This section is empty.
Functions ¶
func CompressFile ¶ added in v0.0.3
func CompressedFilePath ¶ added in v0.0.3
func CompressedFilePath() string
func ConfigFile ¶
func ConfigFile() string
func ConfigFileSQLITE ¶
func ConfigFileSQLITE() string
func ConfigFileServerEndPoint ¶ added in v0.0.3
func ConfigFileServerEndPoint(settings SettingsShare) string
func ConfigFolder ¶
func ConfigFolder() string
func ConfigServerEndPoint ¶
func ConfigServerEndPoint(settings SettingsShare) string
func CreateConfigFile ¶
func CreateConfigFile(outputFile string, settings SettingsShare) error
func CreateTable ¶
func CreateTable() error
func FileServerGET ¶ added in v0.0.3
func FileServerGET(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func GenerateQR ¶ added in v0.0.3
func GetLocalIps ¶
func GetPublicIps ¶
func GetServerIps ¶ added in v0.0.3
func InitDB ¶
func InitDB(settings_params SettingsShare) error
func InitSettings ¶
func InitSettings(configFile string, settings *SettingsShare) error
func OpenDatabase ¶
func OpenUpnpPort ¶
func RandomFreePort ¶
func RemoveServer ¶
func RunFileServer ¶ added in v0.0.3
func RunFileServer(settings SettingsShare)
func StoreServer ¶
func TempFilename ¶ added in v0.0.3
func UserHomeDir ¶
Types ¶
type FileServerDaemon ¶ added in v0.0.3
type Server ¶
type Server struct { UUID string `json:"uuid"` Path string `json:"path"` Source string `json:"source"` CreatedAt time.Time `json:"created_at"` ListIps []string `json:"list_ips"` Flags []string `json:"flags"` }
func FindServer ¶ added in v0.0.3
func ListServers ¶
func SearchServerByPath ¶ added in v0.0.3
func SearchServerByUUID ¶ added in v0.0.3
type SettingsShare ¶
type SettingsShare struct {}
func NewSettings ¶
func NewSettings() SettingsShare
type ShareDaemon ¶ added in v0.0.3
type ShareDaemon struct {}
Click to show internal directories.
Click to hide internal directories.