Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultAPIVersion = "1" DefaultPort = "8000" DefaultSTHomeDir = "${HOME}/.xds/server/syncthing-config" DefaultSdkScriptsDir = "${EXEPATH}/sdks" )
Config default values
View Source
const ( // GlobalConfigFilename Global config filename GlobalConfigFilename = "server-config.json" // ServerDataFilename Server data filename ServerDataFilename = "server-data.xml" // FoldersConfigFilename Folders config filename FoldersConfigFilename = "server-config_folders.xml" )
Variables ¶
View Source
var ConfigDir = path.Join(".xds", "server")
ConfigDir Directory in user HOME directory where xds config will be saved
Functions ¶
func FoldersConfigFilenameGet ¶
FoldersConfigFilenameGet
func NewBuilderConfig ¶
func NewBuilderConfig(stID string) (xsapiv1.BuilderConfig, error)
NewBuilderConfig creates a new BuilderConfig instance
func ServerDataFilenameGet ¶ added in v1.0.0
ServerDataFilenameGet
Types ¶
type Config ¶
type Config struct {
// Public APIConfig fields
xsapiv1.APIConfig
// Private (un-exported fields in REST GET /config route)
Options Options `json:"-"`
FileConf FileConfig `json:"-"`
Log *logrus.Logger `json:"-"`
LogVerboseOut io.Writer `json:"-"`
}
Config parameters (json format) of /config command
type FileConfig ¶
type FileConfig struct {
WebAppDir string `json:"webAppDir"`
SdkScriptsDir string `json:"sdkScriptsDir"`
HTTPPort string `json:"httpPort"`
SThgConf *SyncThingConf `json:"syncthing"`
LogsDir string `json:"logsDir"`
}
FileConfig is the JSON structure of xds-server config file (server-config.json)
type ServerData ¶ added in v1.0.0
type ServerData struct {
ID string `xml:"id"`
}
Click to show internal directories.
Click to hide internal directories.