Documentation ¶
Overview ¶
Package config implements reading and writing of the syncthing configuration file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { Version int `xml:"version,attr" default:"2"` Repositories []RepositoryConfiguration `xml:"repository"` Nodes []NodeConfiguration `xml:"node"` GUI GUIConfiguration `xml:"gui"` Options OptionsConfiguration `xml:"options"` XMLName xml.Name `xml:"configuration" json:"-"` }
type GUIConfiguration ¶
type NodeConfiguration ¶
type NodeConfigurationList ¶
type NodeConfigurationList []NodeConfiguration
func (NodeConfigurationList) Len ¶
func (l NodeConfigurationList) Len() int
func (NodeConfigurationList) Less ¶
func (l NodeConfigurationList) Less(a, b int) bool
func (NodeConfigurationList) Swap ¶
func (l NodeConfigurationList) Swap(a, b int)
type OptionsConfiguration ¶
type OptionsConfiguration struct { ListenAddress []string `xml:"listenAddress" default:"0.0.0.0:22000"` GlobalAnnServer string `xml:"globalAnnounceServer" default:"announce.syncthing.net:22025"` GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" default:"true"` LocalAnnEnabled bool `xml:"localAnnounceEnabled" default:"true"` ParallelRequests int `xml:"parallelRequests" default:"16"` MaxSendKbps int `xml:"maxSendKbps"` RescanIntervalS int `xml:"rescanIntervalS" default:"60"` ReconnectIntervalS int `xml:"reconnectionIntervalS" default:"60"` MaxChangeKbps int `xml:"maxChangeKbps" default:"10000"` StartBrowser bool `xml:"startBrowser" default:"true"` UPnPEnabled bool `xml:"upnpEnabled" default:"true"` Deprecated_ReadOnly bool `xml:"readOnly,omitempty" json:"-"` Deprecated_GUIEnabled bool `xml:"guiEnabled,omitempty" json:"-"` Deprecated_GUIAddress string `xml:"guiAddress,omitempty" json:"-"` }
type RepositoryConfiguration ¶
type RepositoryConfiguration struct { ID string `xml:"id,attr"` Directory string `xml:"directory,attr"` Nodes []NodeConfiguration `xml:"node"` ReadOnly bool `xml:"ro,attr"` Invalid string `xml:"-"` // Set at runtime when there is an error, not saved // contains filtered or unexported fields }
func (*RepositoryConfiguration) NodeIDs ¶
func (r *RepositoryConfiguration) NodeIDs() []string
Click to show internal directories.
Click to hide internal directories.