Documentation ¶
Overview ¶
Package config implements reading and writing of the syncthing configuration file.
Index ¶
- Constants
- Variables
- func CheckFreeSpace(minFree Size, usage fs.Usage) error
- type AuthMode
- type BlockPullOrder
- type Committer
- type Configuration
- func (cfg Configuration) Copy() Configuration
- func (*Configuration) Descriptor() ([]byte, []int)
- func (cfg *Configuration) Device(id protocol.DeviceID) (DeviceConfiguration, int, bool)
- func (cfg *Configuration) DeviceMap() map[protocol.DeviceID]DeviceConfiguration
- func (cfg *Configuration) Folder(id string) (FolderConfiguration, int, bool)
- func (cfg *Configuration) FolderMap() map[string]FolderConfiguration
- func (cfg Configuration) FolderPasswords(device protocol.DeviceID) map[string]string
- func (m *Configuration) Marshal() (dAtA []byte, err error)
- func (m *Configuration) MarshalTo(dAtA []byte) (int, error)
- func (m *Configuration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (cfg *Configuration) ProbeFreePorts() error
- func (*Configuration) ProtoMessage()
- func (m *Configuration) ProtoSize() (n int)
- func (m *Configuration) Reset()
- func (cfg *Configuration) SetDevice(device DeviceConfiguration)
- func (cfg *Configuration) SetDevices(devices []DeviceConfiguration)
- func (cfg *Configuration) SetFolder(folder FolderConfiguration)
- func (cfg *Configuration) SetFolders(folders []FolderConfiguration)
- func (m *Configuration) String() string
- func (m *Configuration) Unmarshal(dAtA []byte) error
- func (cfg *Configuration) WriteXML(w io.Writer) error
- func (m *Configuration) XXX_DiscardUnknown()
- func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Configuration) XXX_Merge(src proto.Message)
- func (m *Configuration) XXX_Size() int
- func (m *Configuration) XXX_Unmarshal(b []byte) error
- type Defaults
- func (*Defaults) Descriptor() ([]byte, []int)
- func (m *Defaults) Marshal() (dAtA []byte, err error)
- func (m *Defaults) MarshalTo(dAtA []byte) (int, error)
- func (m *Defaults) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Defaults) ProtoMessage()
- func (m *Defaults) ProtoSize() (n int)
- func (m *Defaults) Reset()
- func (m *Defaults) String() string
- func (m *Defaults) Unmarshal(dAtA []byte) error
- func (m *Defaults) XXX_DiscardUnknown()
- func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Defaults) XXX_Merge(src proto.Message)
- func (m *Defaults) XXX_Size() int
- func (m *Defaults) XXX_Unmarshal(b []byte) error
- type DeviceConfiguration
- func (cfg DeviceConfiguration) Copy() DeviceConfiguration
- func (cfg *DeviceConfiguration) Description() string
- func (*DeviceConfiguration) Descriptor() ([]byte, []int)
- func (cfg *DeviceConfiguration) IgnoredFolder(folder string) bool
- func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error)
- func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (cfg *DeviceConfiguration) NumConnections() int
- func (*DeviceConfiguration) ProtoMessage()
- func (m *DeviceConfiguration) ProtoSize() (n int)
- func (m *DeviceConfiguration) Reset()
- func (m *DeviceConfiguration) String() string
- func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error
- func (m *DeviceConfiguration) XXX_DiscardUnknown()
- func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeviceConfiguration) XXX_Merge(src proto.Message)
- func (m *DeviceConfiguration) XXX_Size() int
- func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error
- type FolderConfiguration
- func (f *FolderConfiguration) CheckAvailableSpace(req uint64) error
- func (f *FolderConfiguration) CheckPath() error
- func (f FolderConfiguration) Copy() FolderConfiguration
- func (f *FolderConfiguration) CreateMarker() error
- func (f *FolderConfiguration) CreateRoot() (err error)
- func (f FolderConfiguration) Description() string
- func (*FolderConfiguration) Descriptor() ([]byte, []int)
- func (f *FolderConfiguration) Device(device protocol.DeviceID) (FolderDeviceConfiguration, bool)
- func (f *FolderConfiguration) DeviceIDs() []protocol.DeviceID
- func (f FolderConfiguration) Filesystem(fset *db.FileSet) fs.Filesystem
- func (m *FolderConfiguration) Marshal() (dAtA []byte, err error)
- func (m *FolderConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *FolderConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (f FolderConfiguration) ModTimeWindow() time.Duration
- func (*FolderConfiguration) ProtoMessage()
- func (m *FolderConfiguration) ProtoSize() (n int)
- func (f *FolderConfiguration) RemoveMarker() error
- func (f FolderConfiguration) RequiresRestartOnly() FolderConfiguration
- func (m *FolderConfiguration) Reset()
- func (f *FolderConfiguration) SharedWith(device protocol.DeviceID) bool
- func (m *FolderConfiguration) String() string
- func (m *FolderConfiguration) Unmarshal(dAtA []byte) error
- func (m *FolderConfiguration) XXX_DiscardUnknown()
- func (m *FolderConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FolderConfiguration) XXX_Merge(src proto.Message)
- func (m *FolderConfiguration) XXX_Size() int
- func (m *FolderConfiguration) XXX_Unmarshal(b []byte) error
- type FolderDeviceConfiguration
- func (*FolderDeviceConfiguration) Descriptor() ([]byte, []int)
- func (m *FolderDeviceConfiguration) Marshal() (dAtA []byte, err error)
- func (m *FolderDeviceConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *FolderDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FolderDeviceConfiguration) ProtoMessage()
- func (m *FolderDeviceConfiguration) ProtoSize() (n int)
- func (m *FolderDeviceConfiguration) Reset()
- func (m *FolderDeviceConfiguration) String() string
- func (m *FolderDeviceConfiguration) Unmarshal(dAtA []byte) error
- func (m *FolderDeviceConfiguration) XXX_DiscardUnknown()
- func (m *FolderDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FolderDeviceConfiguration) XXX_Merge(src proto.Message)
- func (m *FolderDeviceConfiguration) XXX_Size() int
- func (m *FolderDeviceConfiguration) XXX_Unmarshal(b []byte) error
- type FolderType
- type GUIConfiguration
- func (c GUIConfiguration) Address() string
- func (c GUIConfiguration) CompareHashedPassword(password string) error
- func (c GUIConfiguration) Copy() GUIConfiguration
- func (*GUIConfiguration) Descriptor() ([]byte, []int)
- func (c GUIConfiguration) IsAuthEnabled() bool
- func (GUIConfiguration) IsOverridden() bool
- func (c GUIConfiguration) IsValidAPIKey(apiKey string) bool
- func (m *GUIConfiguration) Marshal() (dAtA []byte, err error)
- func (m *GUIConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *GUIConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (c GUIConfiguration) Network() string
- func (*GUIConfiguration) ProtoMessage()
- func (m *GUIConfiguration) ProtoSize() (n int)
- func (m *GUIConfiguration) Reset()
- func (c *GUIConfiguration) SetPassword(password string) error
- func (m *GUIConfiguration) String() string
- func (c GUIConfiguration) URL() string
- func (c GUIConfiguration) UnixSocketPermissions() os.FileMode
- func (m *GUIConfiguration) Unmarshal(dAtA []byte) error
- func (c GUIConfiguration) UseTLS() bool
- func (m *GUIConfiguration) XXX_DiscardUnknown()
- func (m *GUIConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GUIConfiguration) XXX_Merge(src proto.Message)
- func (m *GUIConfiguration) XXX_Size() int
- func (m *GUIConfiguration) XXX_Unmarshal(b []byte) error
- type Ignores
- func (i Ignores) Copy() Ignores
- func (*Ignores) Descriptor() ([]byte, []int)
- func (m *Ignores) Marshal() (dAtA []byte, err error)
- func (m *Ignores) MarshalTo(dAtA []byte) (int, error)
- func (m *Ignores) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Ignores) ProtoMessage()
- func (m *Ignores) ProtoSize() (n int)
- func (m *Ignores) Reset()
- func (m *Ignores) String() string
- func (m *Ignores) Unmarshal(dAtA []byte) error
- func (m *Ignores) XXX_DiscardUnknown()
- func (m *Ignores) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ignores) XXX_Merge(src proto.Message)
- func (m *Ignores) XXX_Size() int
- func (m *Ignores) XXX_Unmarshal(b []byte) error
- type LDAPConfiguration
- func (c LDAPConfiguration) Copy() LDAPConfiguration
- func (*LDAPConfiguration) Descriptor() ([]byte, []int)
- func (m *LDAPConfiguration) Marshal() (dAtA []byte, err error)
- func (m *LDAPConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *LDAPConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LDAPConfiguration) ProtoMessage()
- func (m *LDAPConfiguration) ProtoSize() (n int)
- func (m *LDAPConfiguration) Reset()
- func (m *LDAPConfiguration) String() string
- func (m *LDAPConfiguration) Unmarshal(dAtA []byte) error
- func (m *LDAPConfiguration) XXX_DiscardUnknown()
- func (m *LDAPConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LDAPConfiguration) XXX_Merge(src proto.Message)
- func (m *LDAPConfiguration) XXX_Size() int
- func (m *LDAPConfiguration) XXX_Unmarshal(b []byte) error
- type LDAPTransport
- type ModifyFunction
- type ObservedDevice
- func (*ObservedDevice) Descriptor() ([]byte, []int)
- func (m *ObservedDevice) Marshal() (dAtA []byte, err error)
- func (m *ObservedDevice) MarshalTo(dAtA []byte) (int, error)
- func (m *ObservedDevice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ObservedDevice) ProtoMessage()
- func (m *ObservedDevice) ProtoSize() (n int)
- func (m *ObservedDevice) Reset()
- func (m *ObservedDevice) String() string
- func (m *ObservedDevice) Unmarshal(dAtA []byte) error
- func (m *ObservedDevice) XXX_DiscardUnknown()
- func (m *ObservedDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ObservedDevice) XXX_Merge(src proto.Message)
- func (m *ObservedDevice) XXX_Size() int
- func (m *ObservedDevice) XXX_Unmarshal(b []byte) error
- type ObservedFolder
- func (*ObservedFolder) Descriptor() ([]byte, []int)
- func (m *ObservedFolder) Marshal() (dAtA []byte, err error)
- func (m *ObservedFolder) MarshalTo(dAtA []byte) (int, error)
- func (m *ObservedFolder) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ObservedFolder) ProtoMessage()
- func (m *ObservedFolder) ProtoSize() (n int)
- func (m *ObservedFolder) Reset()
- func (m *ObservedFolder) String() string
- func (m *ObservedFolder) Unmarshal(dAtA []byte) error
- func (m *ObservedFolder) XXX_DiscardUnknown()
- func (m *ObservedFolder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ObservedFolder) XXX_Merge(src proto.Message)
- func (m *ObservedFolder) XXX_Size() int
- func (m *ObservedFolder) XXX_Unmarshal(b []byte) error
- type OptionsConfiguration
- func (opts OptionsConfiguration) AutoUpgradeEnabled() bool
- func (opts OptionsConfiguration) Copy() OptionsConfiguration
- func (*OptionsConfiguration) Descriptor() ([]byte, []int)
- func (opts OptionsConfiguration) FeatureFlag(name string) bool
- func (opts OptionsConfiguration) GlobalDiscoveryServers() []string
- func (opts OptionsConfiguration) IsStunDisabled() bool
- func (opts OptionsConfiguration) ListenAddresses() []string
- func (opts OptionsConfiguration) LowestConnectionLimit() int
- func (m *OptionsConfiguration) Marshal() (dAtA []byte, err error)
- func (m *OptionsConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *OptionsConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (opts OptionsConfiguration) MaxConcurrentIncomingRequestKiB() int
- func (opts OptionsConfiguration) MaxFolderConcurrency() int
- func (*OptionsConfiguration) ProtoMessage()
- func (m *OptionsConfiguration) ProtoSize() (n int)
- func (opts OptionsConfiguration) RequiresRestartOnly() OptionsConfiguration
- func (m *OptionsConfiguration) Reset()
- func (m *OptionsConfiguration) String() string
- func (opts OptionsConfiguration) StunServers() []string
- func (m *OptionsConfiguration) Unmarshal(dAtA []byte) error
- func (m *OptionsConfiguration) XXX_DiscardUnknown()
- func (m *OptionsConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OptionsConfiguration) XXX_Merge(src proto.Message)
- func (m *OptionsConfiguration) XXX_Size() int
- func (m *OptionsConfiguration) XXX_Unmarshal(b []byte) error
- type PullOrder
- type Size
- func (s Size) BaseValue() float64
- func (*Size) Descriptor() ([]byte, []int)
- func (m *Size) Marshal() (dAtA []byte, err error)
- func (m *Size) MarshalTo(dAtA []byte) (int, error)
- func (m *Size) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (s *Size) ParseDefault(str string) error
- func (s Size) Percentage() bool
- func (*Size) ProtoMessage()
- func (m *Size) ProtoSize() (n int)
- func (m *Size) Reset()
- func (s Size) String() string
- func (m *Size) Unmarshal(dAtA []byte) error
- func (m *Size) XXX_DiscardUnknown()
- func (m *Size) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Size) XXX_Merge(src proto.Message)
- func (m *Size) XXX_Size() int
- func (m *Size) XXX_Unmarshal(b []byte) error
- type Tuning
- type Verifier
- type VersioningConfiguration
- func (c VersioningConfiguration) Copy() VersioningConfiguration
- func (*VersioningConfiguration) Descriptor() ([]byte, []int)
- func (m *VersioningConfiguration) Marshal() (dAtA []byte, err error)
- func (m *VersioningConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *VersioningConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (c VersioningConfiguration) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (*VersioningConfiguration) ProtoMessage()
- func (m *VersioningConfiguration) ProtoSize() (n int)
- func (m *VersioningConfiguration) Reset()
- func (m *VersioningConfiguration) String() string
- func (m *VersioningConfiguration) Unmarshal(dAtA []byte) error
- func (c *VersioningConfiguration) UnmarshalJSON(data []byte) error
- func (c *VersioningConfiguration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (m *VersioningConfiguration) XXX_DiscardUnknown()
- func (m *VersioningConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VersioningConfiguration) XXX_Merge(src proto.Message)
- func (m *VersioningConfiguration) XXX_Size() int
- func (m *VersioningConfiguration) XXX_Unmarshal(b []byte) error
- type Waiter
- type Wrapper
- type XattrFilter
- func (*XattrFilter) Descriptor() ([]byte, []int)
- func (f XattrFilter) GetMaxSingleEntrySize() int
- func (f XattrFilter) GetMaxTotalSize() int
- func (m *XattrFilter) Marshal() (dAtA []byte, err error)
- func (m *XattrFilter) MarshalTo(dAtA []byte) (int, error)
- func (m *XattrFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (f XattrFilter) Permit(s string) bool
- func (*XattrFilter) ProtoMessage()
- func (m *XattrFilter) ProtoSize() (n int)
- func (m *XattrFilter) Reset()
- func (m *XattrFilter) String() string
- func (m *XattrFilter) Unmarshal(dAtA []byte) error
- func (m *XattrFilter) XXX_DiscardUnknown()
- func (m *XattrFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *XattrFilter) XXX_Merge(src proto.Message)
- func (m *XattrFilter) XXX_Size() int
- func (m *XattrFilter) XXX_Unmarshal(b []byte) error
- type XattrFilterEntry
- func (*XattrFilterEntry) Descriptor() ([]byte, []int)
- func (m *XattrFilterEntry) Marshal() (dAtA []byte, err error)
- func (m *XattrFilterEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *XattrFilterEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*XattrFilterEntry) ProtoMessage()
- func (m *XattrFilterEntry) ProtoSize() (n int)
- func (m *XattrFilterEntry) Reset()
- func (m *XattrFilterEntry) String() string
- func (m *XattrFilterEntry) Unmarshal(dAtA []byte) error
- func (m *XattrFilterEntry) XXX_DiscardUnknown()
- func (m *XattrFilterEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *XattrFilterEntry) XXX_Merge(src proto.Message)
- func (m *XattrFilterEntry) XXX_Size() int
- func (m *XattrFilterEntry) XXX_Unmarshal(b []byte) error
Constants ¶
const ( OldestHandledVersion = 10 CurrentVersion = 37 MaxRescanIntervalS = 365 * 24 * 60 * 60 )
const ( DefaultMarkerName = ".stfolder" EncryptionTokenName = "syncthing-encryption_password_token" )
Variables ¶
var ( // DefaultTCPPort defines default TCP port used if the URI does not specify one, for example tcp://0.0.0.0 DefaultTCPPort = 22000 // DefaultQUICPort defines default QUIC port used if the URI does not specify one, for example quic://0.0.0.0 DefaultQUICPort = 22000 // DefaultListenAddresses should be substituted when the configuration // contains <listenAddress>default</listenAddress>. This is done by the // "consumer" of the configuration as we don't want these saved to the // config. DefaultListenAddresses = []string{ netutil.AddressURL("tcp", net.JoinHostPort("0.0.0.0", strconv.Itoa(DefaultTCPPort))), "dynamic+https://relays.syncthing.net/endpoint", netutil.AddressURL("quic", net.JoinHostPort("0.0.0.0", strconv.Itoa(DefaultQUICPort))), } DefaultGUIPort = 8384 // DefaultDiscoveryServersV4 should be substituted when the configuration // contains <globalAnnounceServer>default-v4</globalAnnounceServer>. DefaultDiscoveryServersV4 = []string{ "https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW", "https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW", } // DefaultDiscoveryServersV6 should be substituted when the configuration // contains <globalAnnounceServer>default-v6</globalAnnounceServer>. DefaultDiscoveryServersV6 = []string{ "https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW", "https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW", } // DefaultDiscoveryServers should be substituted when the configuration // contains <globalAnnounceServer>default</globalAnnounceServer>. DefaultDiscoveryServers = append(DefaultDiscoveryServersV4, DefaultDiscoveryServersV6...) // DefaultTheme is the default and fallback theme for the web UI. DefaultTheme = "default" // DefaultPrimaryStunServers are servers provided by us (to avoid causing the public servers burden) DefaultPrimaryStunServers = []string{ "stun.syncthing.net:3478", } DefaultSecondaryStunServers = []string{ "stun.callwithus.com:3478", "stun.counterpath.com:3478", "stun.counterpath.net:3478", "stun.ekiga.net:3478", "stun.ideasip.com:3478", "stun.internetcalls.com:3478", "stun.schlund.de:3478", "stun.sipgate.net:10000", "stun.sipgate.net:3478", "stun.voip.aebc.com:3478", "stun.voiparound.com:3478", "stun.voipbuster.com:3478", "stun.voipstunt.com:3478", "stun.xten.com:3478", } )
var ( ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthDeviceconfiguration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDeviceconfiguration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDeviceconfiguration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrPathNotDirectory = errors.New("folder path not a directory") ErrPathMissing = errors.New("folder path missing") ErrMarkerMissing = errors.New("folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)") )
var ( ErrInvalidLengthFolderconfiguration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowFolderconfiguration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupFolderconfiguration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGuiconfiguration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGuiconfiguration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGuiconfiguration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthLdapconfiguration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLdapconfiguration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLdapconfiguration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthObserved = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowObserved = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupObserved = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthOptionsconfiguration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOptionsconfiguration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupOptionsconfiguration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSize = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSize = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSize = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthVersioningconfiguration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVersioningconfiguration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupVersioningconfiguration = fmt.Errorf("proto: unexpected end of group") )
var AuthMode_name = map[int32]string{
0: "AUTH_MODE_STATIC",
1: "AUTH_MODE_LDAP",
}
var AuthMode_value = map[string]int32{
"AUTH_MODE_STATIC": 0,
"AUTH_MODE_LDAP": 1,
}
var BlockPullOrder_name = map[int32]string{
0: "BLOCK_PULL_ORDER_STANDARD",
1: "BLOCK_PULL_ORDER_RANDOM",
2: "BLOCK_PULL_ORDER_IN_ORDER",
}
var BlockPullOrder_value = map[string]int32{
"BLOCK_PULL_ORDER_STANDARD": 0,
"BLOCK_PULL_ORDER_RANDOM": 1,
"BLOCK_PULL_ORDER_IN_ORDER": 2,
}
var FolderType_name = map[int32]string{
0: "FOLDER_TYPE_SEND_RECEIVE",
1: "FOLDER_TYPE_SEND_ONLY",
2: "FOLDER_TYPE_RECEIVE_ONLY",
3: "FOLDER_TYPE_RECEIVE_ENCRYPTED",
}
var FolderType_value = map[string]int32{
"FOLDER_TYPE_SEND_RECEIVE": 0,
"FOLDER_TYPE_SEND_ONLY": 1,
"FOLDER_TYPE_RECEIVE_ONLY": 2,
"FOLDER_TYPE_RECEIVE_ENCRYPTED": 3,
}
var LDAPTransport_name = map[int32]string{
0: "LDAP_TRANSPORT_PLAIN",
2: "LDAP_TRANSPORT_TLS",
3: "LDAP_TRANSPORT_START_TLS",
}
var LDAPTransport_value = map[string]int32{
"LDAP_TRANSPORT_PLAIN": 0,
"LDAP_TRANSPORT_TLS": 2,
"LDAP_TRANSPORT_START_TLS": 3,
}
var PullOrder_name = map[int32]string{
0: "PULL_ORDER_RANDOM",
1: "PULL_ORDER_ALPHABETIC",
2: "PULL_ORDER_SMALLEST_FIRST",
3: "PULL_ORDER_LARGEST_FIRST",
4: "PULL_ORDER_OLDEST_FIRST",
5: "PULL_ORDER_NEWEST_FIRST",
}
var PullOrder_value = map[string]int32{
"PULL_ORDER_RANDOM": 0,
"PULL_ORDER_ALPHABETIC": 1,
"PULL_ORDER_SMALLEST_FIRST": 2,
"PULL_ORDER_LARGEST_FIRST": 3,
"PULL_ORDER_OLDEST_FIRST": 4,
"PULL_ORDER_NEWEST_FIRST": 5,
}
var Tuning_name = map[int32]string{
0: "TUNING_AUTO",
1: "TUNING_SMALL",
2: "TUNING_LARGE",
}
var Tuning_value = map[string]int32{
"TUNING_AUTO": 0,
"TUNING_SMALL": 1,
"TUNING_LARGE": 2,
}
Functions ¶
Types ¶
type AuthMode ¶ added in v0.14.51
type AuthMode int32
func (AuthMode) EnumDescriptor ¶ added in v1.10.0
func (AuthMode) MarshalText ¶ added in v0.14.51
func (*AuthMode) UnmarshalText ¶ added in v0.14.51
type BlockPullOrder ¶ added in v1.6.0
type BlockPullOrder int32
const ( BlockPullOrderStandard BlockPullOrder = 0 BlockPullOrderRandom BlockPullOrder = 1 BlockPullOrderInOrder BlockPullOrder = 2 )
func (BlockPullOrder) EnumDescriptor ¶ added in v1.10.0
func (BlockPullOrder) EnumDescriptor() ([]byte, []int)
func (BlockPullOrder) MarshalText ¶ added in v1.6.0
func (o BlockPullOrder) MarshalText() ([]byte, error)
func (BlockPullOrder) String ¶ added in v1.6.0
func (o BlockPullOrder) String() string
func (*BlockPullOrder) UnmarshalText ¶ added in v1.6.0
func (o *BlockPullOrder) UnmarshalText(bs []byte) error
type Committer ¶
type Committer interface { CommitConfiguration(from, to Configuration) (handled bool) String() string }
The Committer and Verifier interfaces are implemented by objects that need to know about or have a say in configuration changes.
When the configuration is about to be changed, VerifyConfiguration() is called for each subscribing object that implements it, with copies of the old and new configuration. A nil error is returned if the new configuration is acceptable (i.e., does not contain any errors that would prevent it from being a valid config). Otherwise an error describing the problem is returned.
If any subscriber returns an error from VerifyConfiguration(), the configuration change is not committed and an error is returned to whoever tried to commit the broken config.
If all verification calls returns nil, CommitConfiguration() is called for each subscribing object. The callee returns true if the new configuration has been successfully applied, otherwise false. Any Commit() call returning false will result in a "restart needed" response to the API/user. Note that the new configuration will still have been applied by those who were capable of doing so.
A Committer must take care not to hold any locks while changing the configuration (e.g. calling Wrapper.SetFolder), that are also acquired in any methods of the Committer interface.
type Configuration ¶
type Configuration struct { Version int `protobuf:"varint,1,opt,name=version,proto3,casttype=int" json:"version" xml:"version,attr"` Folders []FolderConfiguration `protobuf:"bytes,2,rep,name=folders,proto3" json:"folders" xml:"folder"` Devices []DeviceConfiguration `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices" xml:"device"` GUI GUIConfiguration `protobuf:"bytes,4,opt,name=gui,proto3" json:"gui" xml:"gui"` LDAP LDAPConfiguration `protobuf:"bytes,5,opt,name=ldap,proto3" json:"ldap" xml:"ldap"` Options OptionsConfiguration `protobuf:"bytes,6,opt,name=options,proto3" json:"options" xml:"options"` IgnoredDevices []ObservedDevice `protobuf:"bytes,7,rep,name=ignored_devices,json=ignoredDevices,proto3" json:"remoteIgnoredDevices" xml:"remoteIgnoredDevice"` DeprecatedPendingDevices []ObservedDevice `protobuf:"bytes,8,rep,name=pending_devices,json=pendingDevices,proto3" json:"-" xml:"pendingDevice,omitempty"` // Deprecated: Do not use. Defaults Defaults `protobuf:"bytes,9,opt,name=defaults,proto3" json:"defaults" xml:"defaults"` }
func New ¶
func New(myID protocol.DeviceID) Configuration
func (Configuration) Copy ¶
func (cfg Configuration) Copy() Configuration
func (*Configuration) Descriptor ¶ added in v1.10.0
func (*Configuration) Descriptor() ([]byte, []int)
func (*Configuration) Device ¶ added in v1.14.0
func (cfg *Configuration) Device(id protocol.DeviceID) (DeviceConfiguration, int, bool)
func (*Configuration) DeviceMap ¶ added in v0.14.47
func (cfg *Configuration) DeviceMap() map[protocol.DeviceID]DeviceConfiguration
DeviceMap returns a map of device ID to device configuration for the given configuration.
func (*Configuration) Folder ¶ added in v1.14.0
func (cfg *Configuration) Folder(id string) (FolderConfiguration, int, bool)
func (*Configuration) FolderMap ¶ added in v1.14.0
func (cfg *Configuration) FolderMap() map[string]FolderConfiguration
FolderMap returns a map of folder ID to folder configuration for the given configuration.
func (Configuration) FolderPasswords ¶ added in v1.12.0
func (cfg Configuration) FolderPasswords(device protocol.DeviceID) map[string]string
FolderPasswords returns the folder passwords set for this device, for folders that have an encryption password set.
func (*Configuration) Marshal ¶ added in v1.11.0
func (m *Configuration) Marshal() (dAtA []byte, err error)
func (*Configuration) MarshalTo ¶ added in v1.11.0
func (m *Configuration) MarshalTo(dAtA []byte) (int, error)
func (*Configuration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *Configuration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Configuration) ProbeFreePorts ¶ added in v1.19.0
func (cfg *Configuration) ProbeFreePorts() error
func (*Configuration) ProtoMessage ¶ added in v1.10.0
func (*Configuration) ProtoMessage()
func (*Configuration) ProtoSize ¶ added in v1.10.0
func (m *Configuration) ProtoSize() (n int)
func (*Configuration) Reset ¶ added in v1.10.0
func (m *Configuration) Reset()
func (*Configuration) SetDevice ¶ added in v1.14.0
func (cfg *Configuration) SetDevice(device DeviceConfiguration)
func (*Configuration) SetDevices ¶ added in v1.14.0
func (cfg *Configuration) SetDevices(devices []DeviceConfiguration)
func (*Configuration) SetFolder ¶ added in v1.14.0
func (cfg *Configuration) SetFolder(folder FolderConfiguration)
func (*Configuration) SetFolders ¶ added in v1.14.0
func (cfg *Configuration) SetFolders(folders []FolderConfiguration)
func (*Configuration) String ¶ added in v1.10.0
func (m *Configuration) String() string
func (*Configuration) Unmarshal ¶ added in v1.11.0
func (m *Configuration) Unmarshal(dAtA []byte) error
func (*Configuration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *Configuration) XXX_DiscardUnknown()
func (*Configuration) XXX_Marshal ¶ added in v1.10.0
func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Configuration) XXX_Merge ¶ added in v1.10.0
func (m *Configuration) XXX_Merge(src proto.Message)
func (*Configuration) XXX_Size ¶ added in v1.10.0
func (m *Configuration) XXX_Size() int
func (*Configuration) XXX_Unmarshal ¶ added in v1.10.0
func (m *Configuration) XXX_Unmarshal(b []byte) error
type Defaults ¶ added in v1.14.0
type Defaults struct { Folder FolderConfiguration `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"` Device DeviceConfiguration `protobuf:"bytes,2,opt,name=device,proto3" json:"device" xml:"device"` Ignores Ignores `protobuf:"bytes,3,opt,name=ignores,proto3" json:"ignores" xml:"ignores"` }
func (*Defaults) Descriptor ¶ added in v1.14.0
func (*Defaults) MarshalToSizedBuffer ¶ added in v1.14.0
func (*Defaults) ProtoMessage ¶ added in v1.14.0
func (*Defaults) ProtoMessage()
func (*Defaults) XXX_DiscardUnknown ¶ added in v1.14.0
func (m *Defaults) XXX_DiscardUnknown()
func (*Defaults) XXX_Marshal ¶ added in v1.14.0
func (*Defaults) XXX_Unmarshal ¶ added in v1.14.0
type DeviceConfiguration ¶
type DeviceConfiguration struct { DeviceID github_com_syncthing_syncthing_lib_protocol.DeviceID `` /* 169-byte string literal not displayed */ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name,attr,omitempty"` Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses" xml:"address,omitempty"` Compression protocol.Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression" xml:"compression,attr"` CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"certName" xml:"certName,attr,omitempty"` Introducer bool `protobuf:"varint,6,opt,name=introducer,proto3" json:"introducer" xml:"introducer,attr"` SkipIntroductionRemovals bool `` /* 160-byte string literal not displayed */ IntroducedBy github_com_syncthing_syncthing_lib_protocol.DeviceID `` /* 191-byte string literal not displayed */ Paused bool `protobuf:"varint,9,opt,name=paused,proto3" json:"paused" xml:"paused"` AllowedNetworks []string `` /* 127-byte string literal not displayed */ AutoAcceptFolders bool `` /* 128-byte string literal not displayed */ MaxSendKbps int `protobuf:"varint,12,opt,name=max_send_kbps,json=maxSendKbps,proto3,casttype=int" json:"maxSendKbps" xml:"maxSendKbps"` MaxRecvKbps int `protobuf:"varint,13,opt,name=max_recv_kbps,json=maxRecvKbps,proto3,casttype=int" json:"maxRecvKbps" xml:"maxRecvKbps"` IgnoredFolders []ObservedFolder `protobuf:"bytes,14,rep,name=ignored_folders,json=ignoredFolders,proto3" json:"ignoredFolders" xml:"ignoredFolder"` DeprecatedPendingFolders []ObservedFolder `protobuf:"bytes,15,rep,name=pending_folders,json=pendingFolders,proto3" json:"-" xml:"pendingFolder,omitempty"` // Deprecated: Do not use. MaxRequestKiB int `protobuf:"varint,16,opt,name=max_request_kib,json=maxRequestKib,proto3,casttype=int" json:"maxRequestKiB" xml:"maxRequestKiB"` Untrusted bool `protobuf:"varint,17,opt,name=untrusted,proto3" json:"untrusted" xml:"untrusted"` RemoteGUIPort int `protobuf:"varint,18,opt,name=remote_gui_port,json=remoteGuiPort,proto3,casttype=int" json:"remoteGUIPort" xml:"remoteGUIPort"` RawNumConnections int `` /* 128-byte string literal not displayed */ }
func (DeviceConfiguration) Copy ¶
func (cfg DeviceConfiguration) Copy() DeviceConfiguration
func (*DeviceConfiguration) Description ¶ added in v1.20.3
func (cfg *DeviceConfiguration) Description() string
func (*DeviceConfiguration) Descriptor ¶ added in v1.10.0
func (*DeviceConfiguration) Descriptor() ([]byte, []int)
func (*DeviceConfiguration) IgnoredFolder ¶ added in v0.14.51
func (cfg *DeviceConfiguration) IgnoredFolder(folder string) bool
func (*DeviceConfiguration) Marshal ¶ added in v1.11.0
func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error)
func (*DeviceConfiguration) MarshalTo ¶ added in v1.11.0
func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*DeviceConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DeviceConfiguration) NumConnections ¶ added in v1.25.0
func (cfg *DeviceConfiguration) NumConnections() int
func (*DeviceConfiguration) ProtoMessage ¶ added in v1.10.0
func (*DeviceConfiguration) ProtoMessage()
func (*DeviceConfiguration) ProtoSize ¶ added in v1.10.0
func (m *DeviceConfiguration) ProtoSize() (n int)
func (*DeviceConfiguration) Reset ¶ added in v1.10.0
func (m *DeviceConfiguration) Reset()
func (*DeviceConfiguration) String ¶ added in v1.10.0
func (m *DeviceConfiguration) String() string
func (*DeviceConfiguration) Unmarshal ¶ added in v1.11.0
func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error
func (*DeviceConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *DeviceConfiguration) XXX_DiscardUnknown()
func (*DeviceConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeviceConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *DeviceConfiguration) XXX_Merge(src proto.Message)
func (*DeviceConfiguration) XXX_Size ¶ added in v1.10.0
func (m *DeviceConfiguration) XXX_Size() int
func (*DeviceConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error
type FolderConfiguration ¶
type FolderConfiguration struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" xml:"id,attr" nodefault:"true"` Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label" xml:"label,attr" restart:"false"` FilesystemType fs.FilesystemType `` /* 137-byte string literal not displayed */ Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path" xml:"path,attr" default:"~"` Type FolderType `protobuf:"varint,5,opt,name=type,proto3,enum=config.FolderType" json:"type" xml:"type,attr"` Devices []FolderDeviceConfiguration `protobuf:"bytes,6,rep,name=devices,proto3" json:"devices" xml:"device"` RescanIntervalS int `` /* 152-byte string literal not displayed */ FSWatcherEnabled bool `` /* 143-byte string literal not displayed */ FSWatcherDelayS float64 `` /* 139-byte string literal not displayed */ FSWatcherTimeoutS float64 `` /* 135-byte string literal not displayed */ IgnorePerms bool `protobuf:"varint,10,opt,name=ignore_perms,json=ignorePerms,proto3" json:"ignorePerms" xml:"ignorePerms,attr"` AutoNormalize bool `` /* 131-byte string literal not displayed */ MinDiskFree Size `protobuf:"bytes,12,opt,name=min_disk_free,json=minDiskFree,proto3" json:"minDiskFree" xml:"minDiskFree" default:"1 %"` Versioning VersioningConfiguration `protobuf:"bytes,13,opt,name=versioning,proto3" json:"versioning" xml:"versioning"` Copiers int `protobuf:"varint,14,opt,name=copiers,proto3,casttype=int" json:"copiers" xml:"copiers"` PullerMaxPendingKiB int `` /* 150-byte string literal not displayed */ Hashers int `protobuf:"varint,16,opt,name=hashers,proto3,casttype=int" json:"hashers" xml:"hashers"` Order PullOrder `protobuf:"varint,17,opt,name=order,proto3,enum=config.PullOrder" json:"order" xml:"order"` IgnoreDelete bool `protobuf:"varint,18,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignoreDelete" xml:"ignoreDelete"` ScanProgressIntervalS int `` /* 158-byte string literal not displayed */ PullerPauseS int `protobuf:"varint,20,opt,name=puller_pause_s,json=pullerPauseS,proto3,casttype=int" json:"pullerPauseS" xml:"pullerPauseS"` MaxConflicts int `` /* 133-byte string literal not displayed */ DisableSparseFiles bool `` /* 132-byte string literal not displayed */ DisableTempIndexes bool `` /* 132-byte string literal not displayed */ Paused bool `protobuf:"varint,24,opt,name=paused,proto3" json:"paused" xml:"paused"` WeakHashThresholdPct int `` /* 154-byte string literal not displayed */ MarkerName string `protobuf:"bytes,26,opt,name=marker_name,json=markerName,proto3" json:"markerName" xml:"markerName"` CopyOwnershipFromParent bool `` /* 153-byte string literal not displayed */ RawModTimeWindowS int `` /* 130-byte string literal not displayed */ MaxConcurrentWrites int `` /* 161-byte string literal not displayed */ DisableFsync bool `protobuf:"varint,30,opt,name=disable_fsync,json=disableFsync,proto3" json:"disableFsync" xml:"disableFsync"` BlockPullOrder BlockPullOrder `` /* 143-byte string literal not displayed */ CopyRangeMethod fs.CopyRangeMethod `` /* 163-byte string literal not displayed */ CaseSensitiveFS bool `protobuf:"varint,33,opt,name=case_sensitive_fs,json=caseSensitiveFs,proto3" json:"caseSensitiveFS" xml:"caseSensitiveFS"` JunctionsAsDirs bool `protobuf:"varint,34,opt,name=follow_junctions,json=followJunctions,proto3" json:"junctionsAsDirs" xml:"junctionsAsDirs"` SyncOwnership bool `protobuf:"varint,35,opt,name=sync_ownership,json=syncOwnership,proto3" json:"syncOwnership" xml:"syncOwnership"` SendOwnership bool `protobuf:"varint,36,opt,name=send_ownership,json=sendOwnership,proto3" json:"sendOwnership" xml:"sendOwnership"` SyncXattrs bool `protobuf:"varint,37,opt,name=sync_xattrs,json=syncXattrs,proto3" json:"syncXattrs" xml:"syncXattrs"` SendXattrs bool `protobuf:"varint,38,opt,name=send_xattrs,json=sendXattrs,proto3" json:"sendXattrs" xml:"sendXattrs"` XattrFilter XattrFilter `protobuf:"bytes,39,opt,name=xattr_filter,json=xattrFilter,proto3" json:"xattrFilter" xml:"xattrFilter"` // Legacy deprecated DeprecatedReadOnly bool `protobuf:"varint,9000,opt,name=read_only,json=readOnly,proto3" json:"-" xml:"ro,attr,omitempty"` // Deprecated: Do not use. DeprecatedMinDiskFreePct float64 `protobuf:"fixed64,9001,opt,name=min_disk_free_pct,json=minDiskFreePct,proto3" json:"-" xml:"minDiskFreePct,omitempty"` // Deprecated: Do not use. DeprecatedPullers int `protobuf:"varint,9002,opt,name=pullers,proto3,casttype=int" json:"-" xml:"pullers,omitempty"` // Deprecated: Do not use. DeprecatedScanOwnership bool `protobuf:"varint,9003,opt,name=scan_ownership,json=scanOwnership,proto3" json:"-" xml:"scanOwnership,omitempty"` // Deprecated: Do not use. }
func (*FolderConfiguration) CheckAvailableSpace ¶ added in v0.14.51
func (f *FolderConfiguration) CheckAvailableSpace(req uint64) error
func (*FolderConfiguration) CheckPath ¶ added in v0.14.40
func (f *FolderConfiguration) CheckPath() error
CheckPath returns nil if the folder root exists and contains the marker file
func (FolderConfiguration) Copy ¶
func (f FolderConfiguration) Copy() FolderConfiguration
func (*FolderConfiguration) CreateMarker ¶
func (f *FolderConfiguration) CreateMarker() error
func (*FolderConfiguration) CreateRoot ¶ added in v0.14.28
func (f *FolderConfiguration) CreateRoot() (err error)
func (FolderConfiguration) Description ¶ added in v0.14.12
func (f FolderConfiguration) Description() string
func (*FolderConfiguration) Descriptor ¶ added in v1.10.0
func (*FolderConfiguration) Descriptor() ([]byte, []int)
func (*FolderConfiguration) Device ¶ added in v1.12.0
func (f *FolderConfiguration) Device(device protocol.DeviceID) (FolderDeviceConfiguration, bool)
func (*FolderConfiguration) DeviceIDs ¶
func (f *FolderConfiguration) DeviceIDs() []protocol.DeviceID
func (FolderConfiguration) Filesystem ¶ added in v0.14.37
func (f FolderConfiguration) Filesystem(fset *db.FileSet) fs.Filesystem
Filesystem creates a filesystem for the path and options of this folder. The fset parameter may be nil, in which case no mtime handling on top of the filesystem is provided.
func (*FolderConfiguration) Marshal ¶ added in v1.11.0
func (m *FolderConfiguration) Marshal() (dAtA []byte, err error)
func (*FolderConfiguration) MarshalTo ¶ added in v1.11.0
func (m *FolderConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*FolderConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *FolderConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (FolderConfiguration) ModTimeWindow ¶ added in v1.2.2
func (f FolderConfiguration) ModTimeWindow() time.Duration
func (*FolderConfiguration) ProtoMessage ¶ added in v1.10.0
func (*FolderConfiguration) ProtoMessage()
func (*FolderConfiguration) ProtoSize ¶ added in v1.10.0
func (m *FolderConfiguration) ProtoSize() (n int)
func (*FolderConfiguration) RemoveMarker ¶ added in v1.27.8
func (f *FolderConfiguration) RemoveMarker() error
func (FolderConfiguration) RequiresRestartOnly ¶ added in v0.14.42
func (f FolderConfiguration) RequiresRestartOnly() FolderConfiguration
RequiresRestartOnly returns a copy with only the attributes that require restart on change.
func (*FolderConfiguration) Reset ¶ added in v1.10.0
func (m *FolderConfiguration) Reset()
func (*FolderConfiguration) SharedWith ¶ added in v0.14.49
func (f *FolderConfiguration) SharedWith(device protocol.DeviceID) bool
func (*FolderConfiguration) String ¶ added in v1.10.0
func (m *FolderConfiguration) String() string
func (*FolderConfiguration) Unmarshal ¶ added in v1.11.0
func (m *FolderConfiguration) Unmarshal(dAtA []byte) error
func (*FolderConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *FolderConfiguration) XXX_DiscardUnknown()
func (*FolderConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *FolderConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FolderConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *FolderConfiguration) XXX_Merge(src proto.Message)
func (*FolderConfiguration) XXX_Size ¶ added in v1.10.0
func (m *FolderConfiguration) XXX_Size() int
func (*FolderConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *FolderConfiguration) XXX_Unmarshal(b []byte) error
type FolderDeviceConfiguration ¶
type FolderDeviceConfiguration struct { DeviceID github_com_syncthing_syncthing_lib_protocol.DeviceID `` /* 152-byte string literal not displayed */ IntroducedBy github_com_syncthing_syncthing_lib_protocol.DeviceID `` /* 174-byte string literal not displayed */ EncryptionPassword string `` /* 129-byte string literal not displayed */ }
func (*FolderDeviceConfiguration) Descriptor ¶ added in v1.10.0
func (*FolderDeviceConfiguration) Descriptor() ([]byte, []int)
func (*FolderDeviceConfiguration) Marshal ¶ added in v1.11.0
func (m *FolderDeviceConfiguration) Marshal() (dAtA []byte, err error)
func (*FolderDeviceConfiguration) MarshalTo ¶ added in v1.11.0
func (m *FolderDeviceConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*FolderDeviceConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *FolderDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FolderDeviceConfiguration) ProtoMessage ¶ added in v1.10.0
func (*FolderDeviceConfiguration) ProtoMessage()
func (*FolderDeviceConfiguration) ProtoSize ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) ProtoSize() (n int)
func (*FolderDeviceConfiguration) Reset ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) Reset()
func (*FolderDeviceConfiguration) String ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) String() string
func (*FolderDeviceConfiguration) Unmarshal ¶ added in v1.11.0
func (m *FolderDeviceConfiguration) Unmarshal(dAtA []byte) error
func (*FolderDeviceConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) XXX_DiscardUnknown()
func (*FolderDeviceConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FolderDeviceConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) XXX_Merge(src proto.Message)
func (*FolderDeviceConfiguration) XXX_Size ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) XXX_Size() int
func (*FolderDeviceConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *FolderDeviceConfiguration) XXX_Unmarshal(b []byte) error
type FolderType ¶ added in v0.13.0
type FolderType int32
const ( FolderTypeSendReceive FolderType = 0 FolderTypeSendOnly FolderType = 1 FolderTypeReceiveOnly FolderType = 2 FolderTypeReceiveEncrypted FolderType = 3 )
func (FolderType) EnumDescriptor ¶ added in v1.10.0
func (FolderType) EnumDescriptor() ([]byte, []int)
func (FolderType) MarshalText ¶ added in v0.13.0
func (t FolderType) MarshalText() ([]byte, error)
func (FolderType) String ¶ added in v0.13.0
func (t FolderType) String() string
func (*FolderType) UnmarshalText ¶ added in v0.13.0
func (t *FolderType) UnmarshalText(bs []byte) error
type GUIConfiguration ¶
type GUIConfiguration struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled" xml:"enabled,attr" default:"true"` RawAddress string `protobuf:"bytes,2,opt,name=address,proto3" json:"address" xml:"address" default:"127.0.0.1:8384"` RawUnixSocketPermissions string `` /* 152-byte string literal not displayed */ User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user" xml:"user,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password" xml:"password,omitempty"` AuthMode AuthMode `protobuf:"varint,6,opt,name=auth_mode,json=authMode,proto3,enum=config.AuthMode" json:"authMode" xml:"authMode,omitempty"` RawUseTLS bool `protobuf:"varint,7,opt,name=use_tls,json=useTls,proto3" json:"useTLS" xml:"tls,attr"` APIKey string `protobuf:"bytes,8,opt,name=api_key,json=apiKey,proto3" json:"apiKey" xml:"apikey,omitempty"` InsecureAdminAccess bool `` /* 145-byte string literal not displayed */ Theme string `protobuf:"bytes,10,opt,name=theme,proto3" json:"theme" xml:"theme" default:"default"` Debugging bool `protobuf:"varint,11,opt,name=debugging,proto3" json:"debugging" xml:"debugging,attr"` InsecureSkipHostCheck bool `` /* 155-byte string literal not displayed */ InsecureAllowFrameLoading bool `` /* 171-byte string literal not displayed */ SendBasicAuthPrompt bool `` /* 142-byte string literal not displayed */ }
func (GUIConfiguration) Address ¶
func (c GUIConfiguration) Address() string
func (GUIConfiguration) CompareHashedPassword ¶ added in v1.18.5
func (c GUIConfiguration) CompareHashedPassword(password string) error
CompareHashedPassword returns nil when the given plaintext password matches the stored hash.
func (GUIConfiguration) Copy ¶ added in v0.14.50
func (c GUIConfiguration) Copy() GUIConfiguration
func (*GUIConfiguration) Descriptor ¶ added in v1.10.0
func (*GUIConfiguration) Descriptor() ([]byte, []int)
func (GUIConfiguration) IsAuthEnabled ¶ added in v0.14.51
func (c GUIConfiguration) IsAuthEnabled() bool
func (GUIConfiguration) IsOverridden ¶ added in v0.14.52
func (GUIConfiguration) IsOverridden() bool
func (GUIConfiguration) IsValidAPIKey ¶ added in v0.12.18
func (c GUIConfiguration) IsValidAPIKey(apiKey string) bool
IsValidAPIKey returns true when the given API key is valid, including both the value in config and any overrides
func (*GUIConfiguration) Marshal ¶ added in v1.11.0
func (m *GUIConfiguration) Marshal() (dAtA []byte, err error)
func (*GUIConfiguration) MarshalTo ¶ added in v1.11.0
func (m *GUIConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*GUIConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *GUIConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (GUIConfiguration) Network ¶ added in v0.14.52
func (c GUIConfiguration) Network() string
func (*GUIConfiguration) ProtoMessage ¶ added in v1.10.0
func (*GUIConfiguration) ProtoMessage()
func (*GUIConfiguration) ProtoSize ¶ added in v1.10.0
func (m *GUIConfiguration) ProtoSize() (n int)
func (*GUIConfiguration) Reset ¶ added in v1.10.0
func (m *GUIConfiguration) Reset()
func (*GUIConfiguration) SetPassword ¶ added in v1.25.0
func (c *GUIConfiguration) SetPassword(password string) error
SetPassword takes a bcrypt hash or a plaintext password and stores it. Plaintext passwords are hashed. Returns an error if the password is not valid.
func (*GUIConfiguration) String ¶ added in v1.10.0
func (m *GUIConfiguration) String() string
func (GUIConfiguration) URL ¶ added in v0.12.0
func (c GUIConfiguration) URL() string
func (GUIConfiguration) UnixSocketPermissions ¶ added in v1.4.1
func (c GUIConfiguration) UnixSocketPermissions() os.FileMode
func (*GUIConfiguration) Unmarshal ¶ added in v1.11.0
func (m *GUIConfiguration) Unmarshal(dAtA []byte) error
func (GUIConfiguration) UseTLS ¶
func (c GUIConfiguration) UseTLS() bool
func (*GUIConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *GUIConfiguration) XXX_DiscardUnknown()
func (*GUIConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *GUIConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GUIConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *GUIConfiguration) XXX_Merge(src proto.Message)
func (*GUIConfiguration) XXX_Size ¶ added in v1.10.0
func (m *GUIConfiguration) XXX_Size() int
func (*GUIConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *GUIConfiguration) XXX_Unmarshal(b []byte) error
type Ignores ¶ added in v1.19.0
type Ignores struct {
Lines []string `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines" xml:"line"`
}
func (*Ignores) Descriptor ¶ added in v1.19.0
func (*Ignores) MarshalToSizedBuffer ¶ added in v1.19.0
func (*Ignores) ProtoMessage ¶ added in v1.19.0
func (*Ignores) ProtoMessage()
func (*Ignores) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *Ignores) XXX_DiscardUnknown()
func (*Ignores) XXX_Marshal ¶ added in v1.19.0
func (*Ignores) XXX_Unmarshal ¶ added in v1.19.0
type LDAPConfiguration ¶ added in v0.14.51
type LDAPConfiguration struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address" xml:"address,omitempty"` BindDN string `protobuf:"bytes,2,opt,name=bind_dn,json=bindDn,proto3" json:"bindDN" xml:"bindDN,omitempty"` Transport LDAPTransport `protobuf:"varint,3,opt,name=transport,proto3,enum=config.LDAPTransport" json:"transport" xml:"transport,omitempty"` InsecureSkipVerify bool `` /* 157-byte string literal not displayed */ SearchBaseDN string `protobuf:"bytes,5,opt,name=search_base_dn,json=searchBaseDn,proto3" json:"searchBaseDN" xml:"searchBaseDN,omitempty"` SearchFilter string `protobuf:"bytes,6,opt,name=search_filter,json=searchFilter,proto3" json:"searchFilter" xml:"searchFilter,omitempty"` }
func (LDAPConfiguration) Copy ¶ added in v0.14.51
func (c LDAPConfiguration) Copy() LDAPConfiguration
func (*LDAPConfiguration) Descriptor ¶ added in v1.10.0
func (*LDAPConfiguration) Descriptor() ([]byte, []int)
func (*LDAPConfiguration) Marshal ¶ added in v1.11.0
func (m *LDAPConfiguration) Marshal() (dAtA []byte, err error)
func (*LDAPConfiguration) MarshalTo ¶ added in v1.11.0
func (m *LDAPConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*LDAPConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *LDAPConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LDAPConfiguration) ProtoMessage ¶ added in v1.10.0
func (*LDAPConfiguration) ProtoMessage()
func (*LDAPConfiguration) ProtoSize ¶ added in v1.10.0
func (m *LDAPConfiguration) ProtoSize() (n int)
func (*LDAPConfiguration) Reset ¶ added in v1.10.0
func (m *LDAPConfiguration) Reset()
func (*LDAPConfiguration) String ¶ added in v1.10.0
func (m *LDAPConfiguration) String() string
func (*LDAPConfiguration) Unmarshal ¶ added in v1.11.0
func (m *LDAPConfiguration) Unmarshal(dAtA []byte) error
func (*LDAPConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *LDAPConfiguration) XXX_DiscardUnknown()
func (*LDAPConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *LDAPConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LDAPConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *LDAPConfiguration) XXX_Merge(src proto.Message)
func (*LDAPConfiguration) XXX_Size ¶ added in v1.10.0
func (m *LDAPConfiguration) XXX_Size() int
func (*LDAPConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *LDAPConfiguration) XXX_Unmarshal(b []byte) error
type LDAPTransport ¶ added in v0.14.51
type LDAPTransport int32
const ( LDAPTransportPlain LDAPTransport = 0 LDAPTransportTLS LDAPTransport = 2 LDAPTransportStartTLS LDAPTransport = 3 )
func (LDAPTransport) EnumDescriptor ¶ added in v1.10.0
func (LDAPTransport) EnumDescriptor() ([]byte, []int)
func (LDAPTransport) MarshalText ¶ added in v0.14.51
func (t LDAPTransport) MarshalText() ([]byte, error)
func (LDAPTransport) String ¶ added in v0.14.51
func (t LDAPTransport) String() string
func (*LDAPTransport) UnmarshalText ¶ added in v0.14.51
func (t *LDAPTransport) UnmarshalText(bs []byte) error
type ModifyFunction ¶ added in v1.14.0
type ModifyFunction func(*Configuration)
ModifyFunction gets a pointer to a copy of the currently active configuration for modification.
type ObservedDevice ¶ added in v0.14.51
type ObservedDevice struct { Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time" xml:"time,attr"` ID github_com_syncthing_syncthing_lib_protocol.DeviceID `` /* 131-byte string literal not displayed */ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name" xml:"name,attr"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address" xml:"address,attr"` }
func (*ObservedDevice) Descriptor ¶ added in v1.10.0
func (*ObservedDevice) Descriptor() ([]byte, []int)
func (*ObservedDevice) Marshal ¶ added in v1.11.0
func (m *ObservedDevice) Marshal() (dAtA []byte, err error)
func (*ObservedDevice) MarshalTo ¶ added in v1.11.0
func (m *ObservedDevice) MarshalTo(dAtA []byte) (int, error)
func (*ObservedDevice) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *ObservedDevice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ObservedDevice) ProtoMessage ¶ added in v1.10.0
func (*ObservedDevice) ProtoMessage()
func (*ObservedDevice) ProtoSize ¶ added in v1.10.0
func (m *ObservedDevice) ProtoSize() (n int)
func (*ObservedDevice) Reset ¶ added in v1.10.0
func (m *ObservedDevice) Reset()
func (*ObservedDevice) String ¶ added in v1.10.0
func (m *ObservedDevice) String() string
func (*ObservedDevice) Unmarshal ¶ added in v1.11.0
func (m *ObservedDevice) Unmarshal(dAtA []byte) error
func (*ObservedDevice) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *ObservedDevice) XXX_DiscardUnknown()
func (*ObservedDevice) XXX_Marshal ¶ added in v1.10.0
func (m *ObservedDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObservedDevice) XXX_Merge ¶ added in v1.10.0
func (m *ObservedDevice) XXX_Merge(src proto.Message)
func (*ObservedDevice) XXX_Size ¶ added in v1.10.0
func (m *ObservedDevice) XXX_Size() int
func (*ObservedDevice) XXX_Unmarshal ¶ added in v1.10.0
func (m *ObservedDevice) XXX_Unmarshal(b []byte) error
type ObservedFolder ¶ added in v0.14.51
type ObservedFolder struct { Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time" xml:"time,attr"` ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id" xml:"id,attr"` Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label" xml:"label,attr"` }
func (*ObservedFolder) Descriptor ¶ added in v1.10.0
func (*ObservedFolder) Descriptor() ([]byte, []int)
func (*ObservedFolder) Marshal ¶ added in v1.11.0
func (m *ObservedFolder) Marshal() (dAtA []byte, err error)
func (*ObservedFolder) MarshalTo ¶ added in v1.11.0
func (m *ObservedFolder) MarshalTo(dAtA []byte) (int, error)
func (*ObservedFolder) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *ObservedFolder) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ObservedFolder) ProtoMessage ¶ added in v1.10.0
func (*ObservedFolder) ProtoMessage()
func (*ObservedFolder) ProtoSize ¶ added in v1.10.0
func (m *ObservedFolder) ProtoSize() (n int)
func (*ObservedFolder) Reset ¶ added in v1.10.0
func (m *ObservedFolder) Reset()
func (*ObservedFolder) String ¶ added in v1.10.0
func (m *ObservedFolder) String() string
func (*ObservedFolder) Unmarshal ¶ added in v1.11.0
func (m *ObservedFolder) Unmarshal(dAtA []byte) error
func (*ObservedFolder) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *ObservedFolder) XXX_DiscardUnknown()
func (*ObservedFolder) XXX_Marshal ¶ added in v1.10.0
func (m *ObservedFolder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObservedFolder) XXX_Merge ¶ added in v1.10.0
func (m *ObservedFolder) XXX_Merge(src proto.Message)
func (*ObservedFolder) XXX_Size ¶ added in v1.10.0
func (m *ObservedFolder) XXX_Size() int
func (*ObservedFolder) XXX_Unmarshal ¶ added in v1.10.0
func (m *ObservedFolder) XXX_Unmarshal(b []byte) error
type OptionsConfiguration ¶
type OptionsConfiguration struct { RawListenAddresses []string `` /* 133-byte string literal not displayed */ RawGlobalAnnServers []string `` /* 161-byte string literal not displayed */ GlobalAnnEnabled bool `` /* 160-byte string literal not displayed */ LocalAnnEnabled bool `` /* 156-byte string literal not displayed */ LocalAnnPort int `` /* 156-byte string literal not displayed */ LocalAnnMCAddr string `` /* 184-byte string literal not displayed */ MaxSendKbps int `protobuf:"varint,7,opt,name=max_send_kbps,json=maxSendKbps,proto3,casttype=int" json:"maxSendKbps" xml:"maxSendKbps"` MaxRecvKbps int `protobuf:"varint,8,opt,name=max_recv_kbps,json=maxRecvKbps,proto3,casttype=int" json:"maxRecvKbps" xml:"maxRecvKbps"` ReconnectIntervalS int `` /* 169-byte string literal not displayed */ RelaysEnabled bool `` /* 126-byte string literal not displayed */ RelayReconnectIntervalM int `` /* 181-byte string literal not displayed */ StartBrowser bool `protobuf:"varint,12,opt,name=start_browser,json=startBrowser,proto3" json:"startBrowser" xml:"startBrowser" default:"true"` NATEnabled bool `` /* 133-byte string literal not displayed */ NATLeaseM int `` /* 153-byte string literal not displayed */ NATRenewalM int `` /* 161-byte string literal not displayed */ NATTimeoutS int `` /* 161-byte string literal not displayed */ URAccepted int `` /* 137-byte string literal not displayed */ URSeen int `protobuf:"varint,19,opt,name=usage_reporting_seen,json=usageReportingSeen,proto3,casttype=int" json:"urSeen" xml:"urSeen"` URUniqueID string `protobuf:"bytes,20,opt,name=usage_reporting_unique_id,json=usageReportingUniqueId,proto3" json:"urUniqueId" xml:"urUniqueID"` URURL string `` /* 148-byte string literal not displayed */ URPostInsecurely bool `` /* 165-byte string literal not displayed */ URInitialDelayS int `` /* 174-byte string literal not displayed */ AutoUpgradeIntervalH int `` /* 167-byte string literal not displayed */ UpgradeToPreReleases bool `` /* 141-byte string literal not displayed */ KeepTemporariesH int `` /* 150-byte string literal not displayed */ CacheIgnoredFiles bool `` /* 144-byte string literal not displayed */ ProgressUpdateIntervalS int `` /* 178-byte string literal not displayed */ LimitBandwidthInLan bool `` /* 153-byte string literal not displayed */ MinHomeDiskFree Size `` /* 134-byte string literal not displayed */ ReleasesURL string `` /* 153-byte string literal not displayed */ AlwaysLocalNets []string `protobuf:"bytes,33,rep,name=always_local_nets,json=alwaysLocalNets,proto3" json:"alwaysLocalNets" xml:"alwaysLocalNet"` OverwriteRemoteDevNames bool `` /* 219-byte string literal not displayed */ TempIndexMinBlocks int `` /* 159-byte string literal not displayed */ UnackedNotificationIDs []string `` /* 146-byte string literal not displayed */ TrafficClass int `protobuf:"varint,37,opt,name=traffic_class,json=trafficClass,proto3,casttype=int" json:"trafficClass" xml:"trafficClass"` DeprecatedDefaultFolderPath string `protobuf:"bytes,38,opt,name=default_folder_path,json=defaultFolderPath,proto3" json:"-" xml:"defaultFolderPath,omitempty"` // Deprecated: Do not use. SetLowPriority bool `` /* 131-byte string literal not displayed */ RawMaxFolderConcurrency int `` /* 153-byte string literal not displayed */ CRURL string `` /* 162-byte string literal not displayed */ CREnabled bool `` /* 159-byte string literal not displayed */ StunKeepaliveStartS int `` /* 164-byte string literal not displayed */ StunKeepaliveMinS int `` /* 155-byte string literal not displayed */ RawStunServers []string `protobuf:"bytes,45,rep,name=stun_servers,json=stunServers,proto3" json:"stunServers" xml:"stunServer" default:"default"` DatabaseTuning Tuning `` /* 149-byte string literal not displayed */ RawMaxCIRequestKiB int `` /* 199-byte string literal not displayed */ AnnounceLANAddresses bool `` /* 155-byte string literal not displayed */ SendFullIndexOnUpgrade bool `` /* 150-byte string literal not displayed */ FeatureFlags []string `protobuf:"bytes,50,rep,name=feature_flags,json=featureFlags,proto3" json:"featureFlags" xml:"featureFlag"` // The number of connections at which we stop trying to connect to more // devices, zero meaning no limit. Does not affect incoming connections. ConnectionLimitEnough int `` /* 157-byte string literal not displayed */ // The maximum number of connections which we will allow in total, zero // meaning no limit. Affects incoming connections and prevents // attempting outgoing connections. ConnectionLimitMax int `` /* 145-byte string literal not displayed */ // When set, this allows TLS 1.2 on sync connections, where we otherwise // default to TLS 1.3+ only. InsecureAllowOldTLSVersions bool `` /* 170-byte string literal not displayed */ ConnectionPriorityTCPLAN int `` /* 183-byte string literal not displayed */ ConnectionPriorityQUICLAN int `` /* 187-byte string literal not displayed */ ConnectionPriorityTCPWAN int `` /* 183-byte string literal not displayed */ ConnectionPriorityQUICWAN int `` /* 187-byte string literal not displayed */ ConnectionPriorityRelay int `` /* 178-byte string literal not displayed */ ConnectionPriorityUpgradeThreshold int `` /* 222-byte string literal not displayed */ // Legacy deprecated DeprecatedUPnPEnabled bool `protobuf:"varint,9000,opt,name=upnp_enabled,json=upnpEnabled,proto3" json:"-" xml:"upnpEnabled,omitempty"` // Deprecated: Do not use. DeprecatedUPnPLeaseM int `protobuf:"varint,9001,opt,name=upnp_lease_m,json=upnpLeaseM,proto3,casttype=int" json:"-" xml:"upnpLeaseMinutes,omitempty"` // Deprecated: Do not use. DeprecatedUPnPRenewalM int `` // Deprecated: Do not use. /* 128-byte string literal not displayed */ DeprecatedUPnPTimeoutS int `` // Deprecated: Do not use. /* 128-byte string literal not displayed */ DeprecatedRelayServers []string `protobuf:"bytes,9004,rep,name=relay_servers,json=relayServers,proto3" json:"-" xml:"relayServer,omitempty"` // Deprecated: Do not use. DeprecatedMinHomeDiskFreePct float64 `` // Deprecated: Do not use. /* 130-byte string literal not displayed */ DeprecatedMaxConcurrentScans int `` // Deprecated: Do not use. /* 140-byte string literal not displayed */ }
func (OptionsConfiguration) AutoUpgradeEnabled ¶ added in v1.9.0
func (opts OptionsConfiguration) AutoUpgradeEnabled() bool
func (OptionsConfiguration) Copy ¶
func (opts OptionsConfiguration) Copy() OptionsConfiguration
func (*OptionsConfiguration) Descriptor ¶ added in v1.10.0
func (*OptionsConfiguration) Descriptor() ([]byte, []int)
func (OptionsConfiguration) FeatureFlag ¶ added in v1.12.0
func (opts OptionsConfiguration) FeatureFlag(name string) bool
func (OptionsConfiguration) GlobalDiscoveryServers ¶ added in v1.3.3
func (opts OptionsConfiguration) GlobalDiscoveryServers() []string
func (OptionsConfiguration) IsStunDisabled ¶ added in v1.2.0
func (opts OptionsConfiguration) IsStunDisabled() bool
func (OptionsConfiguration) ListenAddresses ¶ added in v0.13.0
func (opts OptionsConfiguration) ListenAddresses() []string
func (OptionsConfiguration) LowestConnectionLimit ¶ added in v1.13.0
func (opts OptionsConfiguration) LowestConnectionLimit() int
LowestConnectionLimit is the lower of ConnectionLimitEnough or ConnectionLimitMax, or whichever of them is actually set if only one of them is set. It's the point where we should stop dialing.
func (*OptionsConfiguration) Marshal ¶ added in v1.11.0
func (m *OptionsConfiguration) Marshal() (dAtA []byte, err error)
func (*OptionsConfiguration) MarshalTo ¶ added in v1.11.0
func (m *OptionsConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*OptionsConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *OptionsConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (OptionsConfiguration) MaxConcurrentIncomingRequestKiB ¶ added in v1.4.0
func (opts OptionsConfiguration) MaxConcurrentIncomingRequestKiB() int
func (OptionsConfiguration) MaxFolderConcurrency ¶ added in v1.4.0
func (opts OptionsConfiguration) MaxFolderConcurrency() int
func (*OptionsConfiguration) ProtoMessage ¶ added in v1.10.0
func (*OptionsConfiguration) ProtoMessage()
func (*OptionsConfiguration) ProtoSize ¶ added in v1.10.0
func (m *OptionsConfiguration) ProtoSize() (n int)
func (OptionsConfiguration) RequiresRestartOnly ¶ added in v0.14.42
func (opts OptionsConfiguration) RequiresRestartOnly() OptionsConfiguration
RequiresRestartOnly returns a copy with only the attributes that require restart on change.
func (*OptionsConfiguration) Reset ¶ added in v1.10.0
func (m *OptionsConfiguration) Reset()
func (*OptionsConfiguration) String ¶ added in v1.10.0
func (m *OptionsConfiguration) String() string
func (OptionsConfiguration) StunServers ¶ added in v0.14.25
func (opts OptionsConfiguration) StunServers() []string
func (*OptionsConfiguration) Unmarshal ¶ added in v1.11.0
func (m *OptionsConfiguration) Unmarshal(dAtA []byte) error
func (*OptionsConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *OptionsConfiguration) XXX_DiscardUnknown()
func (*OptionsConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *OptionsConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OptionsConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *OptionsConfiguration) XXX_Merge(src proto.Message)
func (*OptionsConfiguration) XXX_Size ¶ added in v1.10.0
func (m *OptionsConfiguration) XXX_Size() int
func (*OptionsConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *OptionsConfiguration) XXX_Unmarshal(b []byte) error
type PullOrder ¶
type PullOrder int32
func (PullOrder) EnumDescriptor ¶ added in v1.10.0
func (PullOrder) MarshalText ¶
func (*PullOrder) UnmarshalText ¶
type Size ¶ added in v0.14.28
type Size struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value" xml:",chardata"` Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit" xml:"unit,attr"` }
func (*Size) Descriptor ¶ added in v1.10.0
func (*Size) MarshalToSizedBuffer ¶ added in v1.11.0
func (*Size) ParseDefault ¶ added in v0.14.28
func (Size) Percentage ¶ added in v0.14.28
func (*Size) ProtoMessage ¶ added in v1.10.0
func (*Size) ProtoMessage()
func (*Size) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *Size) XXX_DiscardUnknown()
func (*Size) XXX_Marshal ¶ added in v1.10.0
func (*Size) XXX_Unmarshal ¶ added in v1.10.0
type Tuning ¶ added in v1.3.0
type Tuning int32
func (Tuning) EnumDescriptor ¶ added in v1.10.0
func (Tuning) MarshalText ¶ added in v1.3.0
func (*Tuning) UnmarshalText ¶ added in v1.3.0
type Verifier ¶ added in v1.18.5
type Verifier interface {
VerifyConfiguration(from, to Configuration) error
}
A Verifier can determine if a new configuration is acceptable. See the description for Committer, above.
type VersioningConfiguration ¶
type VersioningConfiguration struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type" xml:"type,attr"` Params map[string]string `` /* 163-byte string literal not displayed */ CleanupIntervalS int `` /* 151-byte string literal not displayed */ FSPath string `protobuf:"bytes,4,opt,name=fs_path,json=fsPath,proto3" json:"fsPath" xml:"fsPath"` FSType fs.FilesystemType `protobuf:"varint,5,opt,name=fs_type,json=fsType,proto3,enum=fs.FilesystemType" json:"fsType" xml:"fsType"` }
VersioningConfiguration is used in the code and for JSON serialization
func (VersioningConfiguration) Copy ¶ added in v0.12.0
func (c VersioningConfiguration) Copy() VersioningConfiguration
func (*VersioningConfiguration) Descriptor ¶ added in v1.10.0
func (*VersioningConfiguration) Descriptor() ([]byte, []int)
func (*VersioningConfiguration) Marshal ¶ added in v1.11.0
func (m *VersioningConfiguration) Marshal() (dAtA []byte, err error)
func (*VersioningConfiguration) MarshalTo ¶ added in v1.11.0
func (m *VersioningConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*VersioningConfiguration) MarshalToSizedBuffer ¶ added in v1.11.0
func (m *VersioningConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (VersioningConfiguration) MarshalXML ¶
func (c VersioningConfiguration) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*VersioningConfiguration) ProtoMessage ¶ added in v1.10.0
func (*VersioningConfiguration) ProtoMessage()
func (*VersioningConfiguration) ProtoSize ¶ added in v1.10.0
func (m *VersioningConfiguration) ProtoSize() (n int)
func (*VersioningConfiguration) Reset ¶ added in v1.10.0
func (m *VersioningConfiguration) Reset()
func (*VersioningConfiguration) String ¶ added in v1.10.0
func (m *VersioningConfiguration) String() string
func (*VersioningConfiguration) Unmarshal ¶ added in v1.11.0
func (m *VersioningConfiguration) Unmarshal(dAtA []byte) error
func (*VersioningConfiguration) UnmarshalJSON ¶ added in v1.8.0
func (c *VersioningConfiguration) UnmarshalJSON(data []byte) error
func (*VersioningConfiguration) UnmarshalXML ¶
func (c *VersioningConfiguration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
func (*VersioningConfiguration) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *VersioningConfiguration) XXX_DiscardUnknown()
func (*VersioningConfiguration) XXX_Marshal ¶ added in v1.10.0
func (m *VersioningConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VersioningConfiguration) XXX_Merge ¶ added in v1.10.0
func (m *VersioningConfiguration) XXX_Merge(src proto.Message)
func (*VersioningConfiguration) XXX_Size ¶ added in v1.10.0
func (m *VersioningConfiguration) XXX_Size() int
func (*VersioningConfiguration) XXX_Unmarshal ¶ added in v1.10.0
func (m *VersioningConfiguration) XXX_Unmarshal(b []byte) error
type Waiter ¶ added in v0.14.42
type Waiter interface {
Wait()
}
Waiter allows to wait for the given config operation to complete.
type Wrapper ¶
type Wrapper interface { ConfigPath() string MyID() protocol.DeviceID RawCopy() Configuration RequiresRestart() bool Save() error Modify(ModifyFunction) (Waiter, error) RemoveFolder(id string) (Waiter, error) RemoveDevice(id protocol.DeviceID) (Waiter, error) GUI() GUIConfiguration LDAP() LDAPConfiguration Options() OptionsConfiguration DefaultIgnores() Ignores Folder(id string) (FolderConfiguration, bool) Folders() map[string]FolderConfiguration FolderList() []FolderConfiguration FolderPasswords(device protocol.DeviceID) map[string]string DefaultFolder() FolderConfiguration Device(id protocol.DeviceID) (DeviceConfiguration, bool) Devices() map[protocol.DeviceID]DeviceConfiguration DeviceList() []DeviceConfiguration DefaultDevice() DeviceConfiguration IgnoredDevices() []ObservedDevice IgnoredDevice(id protocol.DeviceID) bool IgnoredFolder(device protocol.DeviceID, folder string) bool Subscribe(c Committer) Configuration Unsubscribe(c Committer) suture.Service }
Wrapper handles a Configuration, i.e. it provides methods to access, change and save the config, and notifies registered subscribers (Committer) of changes.
Modify allows changing the currently active configuration through the given ModifyFunction. It can be called concurrently: All calls will be queued and called in order.
type XattrFilter ¶ added in v1.22.0
type XattrFilter struct { Entries []XattrFilterEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries" xml:"entry"` MaxSingleEntrySize int `` /* 160-byte string literal not displayed */ MaxTotalSize int `` /* 135-byte string literal not displayed */ }
Extended attribute filter. This is a list of patterns to match (glob style), each with an action (permit or deny). First match is used. If the filter is empty, all strings are permitted. If the filter is non-empty, the default action becomes deny. To counter this, you can use the "*" pattern to match all strings at the end of the filter. There are also limits on the size of accepted attributes.
func (*XattrFilter) Descriptor ¶ added in v1.22.0
func (*XattrFilter) Descriptor() ([]byte, []int)
func (XattrFilter) GetMaxSingleEntrySize ¶ added in v1.22.0
func (f XattrFilter) GetMaxSingleEntrySize() int
func (XattrFilter) GetMaxTotalSize ¶ added in v1.22.0
func (f XattrFilter) GetMaxTotalSize() int
func (*XattrFilter) Marshal ¶ added in v1.22.0
func (m *XattrFilter) Marshal() (dAtA []byte, err error)
func (*XattrFilter) MarshalTo ¶ added in v1.22.0
func (m *XattrFilter) MarshalTo(dAtA []byte) (int, error)
func (*XattrFilter) MarshalToSizedBuffer ¶ added in v1.22.0
func (m *XattrFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (XattrFilter) Permit ¶ added in v1.22.0
func (f XattrFilter) Permit(s string) bool
func (*XattrFilter) ProtoMessage ¶ added in v1.22.0
func (*XattrFilter) ProtoMessage()
func (*XattrFilter) ProtoSize ¶ added in v1.22.0
func (m *XattrFilter) ProtoSize() (n int)
func (*XattrFilter) Reset ¶ added in v1.22.0
func (m *XattrFilter) Reset()
func (*XattrFilter) String ¶ added in v1.22.0
func (m *XattrFilter) String() string
func (*XattrFilter) Unmarshal ¶ added in v1.22.0
func (m *XattrFilter) Unmarshal(dAtA []byte) error
func (*XattrFilter) XXX_DiscardUnknown ¶ added in v1.22.0
func (m *XattrFilter) XXX_DiscardUnknown()
func (*XattrFilter) XXX_Marshal ¶ added in v1.22.0
func (m *XattrFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*XattrFilter) XXX_Merge ¶ added in v1.22.0
func (m *XattrFilter) XXX_Merge(src proto.Message)
func (*XattrFilter) XXX_Size ¶ added in v1.22.0
func (m *XattrFilter) XXX_Size() int
func (*XattrFilter) XXX_Unmarshal ¶ added in v1.22.0
func (m *XattrFilter) XXX_Unmarshal(b []byte) error
type XattrFilterEntry ¶ added in v1.22.0
type XattrFilterEntry struct { Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match" xml:"match,attr"` Permit bool `protobuf:"varint,2,opt,name=permit,proto3" json:"permit" xml:"permit,attr"` }
func (*XattrFilterEntry) Descriptor ¶ added in v1.22.0
func (*XattrFilterEntry) Descriptor() ([]byte, []int)
func (*XattrFilterEntry) Marshal ¶ added in v1.22.0
func (m *XattrFilterEntry) Marshal() (dAtA []byte, err error)
func (*XattrFilterEntry) MarshalTo ¶ added in v1.22.0
func (m *XattrFilterEntry) MarshalTo(dAtA []byte) (int, error)
func (*XattrFilterEntry) MarshalToSizedBuffer ¶ added in v1.22.0
func (m *XattrFilterEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*XattrFilterEntry) ProtoMessage ¶ added in v1.22.0
func (*XattrFilterEntry) ProtoMessage()
func (*XattrFilterEntry) ProtoSize ¶ added in v1.22.0
func (m *XattrFilterEntry) ProtoSize() (n int)
func (*XattrFilterEntry) Reset ¶ added in v1.22.0
func (m *XattrFilterEntry) Reset()
func (*XattrFilterEntry) String ¶ added in v1.22.0
func (m *XattrFilterEntry) String() string
func (*XattrFilterEntry) Unmarshal ¶ added in v1.22.0
func (m *XattrFilterEntry) Unmarshal(dAtA []byte) error
func (*XattrFilterEntry) XXX_DiscardUnknown ¶ added in v1.22.0
func (m *XattrFilterEntry) XXX_DiscardUnknown()
func (*XattrFilterEntry) XXX_Marshal ¶ added in v1.22.0
func (m *XattrFilterEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*XattrFilterEntry) XXX_Merge ¶ added in v1.22.0
func (m *XattrFilterEntry) XXX_Merge(src proto.Message)
func (*XattrFilterEntry) XXX_Size ¶ added in v1.22.0
func (m *XattrFilterEntry) XXX_Size() int
func (*XattrFilterEntry) XXX_Unmarshal ¶ added in v1.22.0
func (m *XattrFilterEntry) XXX_Unmarshal(b []byte) error
Source Files ¶
- authmode.go
- authmode.pb.go
- blockpullorder.go
- blockpullorder.pb.go
- config.go
- config.pb.go
- debug.go
- deviceconfiguration.go
- deviceconfiguration.pb.go
- folderconfiguration.go
- folderconfiguration.pb.go
- foldertype.go
- foldertype.pb.go
- guiconfiguration.go
- guiconfiguration.pb.go
- ldapconfiguration.go
- ldapconfiguration.pb.go
- ldaptransport.go
- ldaptransport.pb.go
- migrations.go
- observed.pb.go
- optionsconfiguration.go
- optionsconfiguration.pb.go
- pullorder.go
- pullorder.pb.go
- size.go
- size.pb.go
- tuning.go
- tuning.pb.go
- versioningconfiguration.go
- versioningconfiguration.pb.go
- wrapper.go