started adding the back to front api via websocket and json

This commit is contained in:
2017-12-24 10:42:12 -05:00
parent 2e1eb8e4e1
commit 8a5f7eaa09
37 changed files with 676 additions and 666 deletions

32
engine/settings.go Normal file
View File

@@ -0,0 +1,32 @@
package engine //Settings.go contains all of the program settings
import (
"github.com/anacrolix/dht"
"github.com/anacrolix/torrent"
)
//FullCLientSettings struct is a struct that can be read into anacrolix/torrent to setup a torrent client
type FullClientSettings struct {
Version int
torrent.Config
TFileUploadFolder string
}
//FullClientSettingsNew creates a new torrent client config TODO read from a TOML file
func FullClientSettingsNew() FullClientSettings {
//Config := fullClientSettings //generate a new struct
var Config FullClientSettings
Config.Version = 1.0
Config.DataDir = "downloads" //the full OR relative path of the default download directory for torrents
Config.TFileUploadFolder = "uploadedTorrents"
Config.Seed = true
Config.DHTConfig = dht.ServerConfig{
StartingNodes: dht.GlobalBootstrapAddrs,
}
return Config
}