Documentation ¶
Index ¶
- func ConfigFile() string
- func ConfigFileSQLITE() string
- func ConfigFolder() string
- func ConfigServerEndPoint(settings SettingsShare) string
- func CreateConfigFile(outputFile string, settings SettingsShare) error
- func CreateHandler(filePathParam string) http.Handler
- func CreateTable() error
- func GetLocalIps(port int) []string
- func GetPublicIps(port int) []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
- func RemoveServer(uuid string) error
- func ServerDaemon(port int, handler http.Handler)
- func ServerDaemon2(port int, srv *graceful.Server)
- func StartServer(server *Server)
- func StoreServer(server Server) error
- func UserHomeDir() string
- type Daemon
- type Server
- type SettingsShare
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFile ¶
func ConfigFile() string
func ConfigFileSQLITE ¶
func ConfigFileSQLITE() string
func ConfigFolder ¶
func ConfigFolder() string
func ConfigServerEndPoint ¶
func ConfigServerEndPoint(settings SettingsShare) string
func CreateConfigFile ¶
func CreateConfigFile(outputFile string, settings SettingsShare) error
func CreateHandler ¶
func CreateTable ¶
func CreateTable() error
func GetLocalIps ¶
func GetPublicIps ¶
func InitDB ¶
func InitDB(settings_params SettingsShare) error
func InitSettings ¶
func InitSettings(configFile string, settings *SettingsShare) error
func OpenDatabase ¶
func OpenUpnpPort ¶
func RandomFreePort ¶
func RandomFreePort() int
func RemoveServer ¶
func ServerDaemon ¶
func ServerDaemon2 ¶
func StartServer ¶
func StartServer(server *Server)
func StoreServer ¶
func UserHomeDir ¶
func UserHomeDir() string
Types ¶
type Server ¶
type Server struct { UUID string `json:"uuid"` Path string `json:"path"` Port int `json:"port"` CreatedAt time.Time `json:"created_at"` ListIps []string `json:"list_ips"` Srv *graceful.Server }
func ListServers ¶
type SettingsShare ¶
type SettingsShare struct {}
func NewSettings ¶
func NewSettings() SettingsShare
Click to show internal directories.
Click to hide internal directories.