Documentation ¶
Index ¶
- Constants
- Variables
- func FoldersConfigFilenameGet() (string, error)
- func NewBuilderConfig(stID string) (xsapiv1.BuilderConfig, error)
- func ServerDataFilenameGet() (string, error)
- func ServerIDGet() (string, error)
- func TargetsConfigFilenameGet() (string, error)
- type Config
- type FileConfig
- type Options
- type ServerData
- type SyncThingConf
Constants ¶
View Source
const ( DefaultAPIVersion = "1" DefaultPort = "8000" DefaultSTHomeDir = "${HOME}/.xds/server/syncthing-config" DefaultSdkScriptsDir = "${EXEPATH}/sdks" DefaultSdkDbUpdate = "startup" )
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" // TargetsConfigFilename Targets config filename TargetsConfigFilename = "server-config_targets.xml" )
Variables ¶
ConfigDir Directory in user HOME directory where xds config will be saved
Functions ¶
func FoldersConfigFilenameGet ¶
FoldersConfigFilenameGet Return the FoldersConfig filename
func NewBuilderConfig ¶
func NewBuilderConfig(stID string) (xsapiv1.BuilderConfig, error)
NewBuilderConfig creates a new BuilderConfig instance
func ServerDataFilenameGet ¶ added in v1.0.0
ServerDataFilenameGet Return the ServerData filename
func ServerIDGet ¶ added in v1.0.0
ServerIDGet Get Server unique ID
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"` SdkDbUpdate string `json:"sdkDbUpdate"` 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 Options ¶
Options set at the command line
Click to show internal directories.
Click to hide internal directories.