config

package
v1.27.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MPL-2.0 Imports: 45 Imported by: 25

Documentation

Overview

Package config implements reading and writing of the syncthing configuration file.

Index

Constants

View Source
const (
	OldestHandledVersion = 10
	CurrentVersion       = 37
	MaxRescanIntervalS   = 365 * 24 * 60 * 60
)
View Source
const (
	DefaultMarkerName   = ".stfolder"
	EncryptionTokenName = "syncthing-encryption_password_token"
)

Variables

View Source
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",
	}
)
View Source
var (
	ErrInvalidLengthConfig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthDeviceconfiguration        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDeviceconfiguration          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDeviceconfiguration = fmt.Errorf("proto: unexpected end of group")
)
View Source
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)")
)
View Source
var (
	ErrInvalidLengthFolderconfiguration        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFolderconfiguration          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFolderconfiguration = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGuiconfiguration        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGuiconfiguration          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGuiconfiguration = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthLdapconfiguration        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLdapconfiguration          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLdapconfiguration = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthObserved        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowObserved          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupObserved = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthOptionsconfiguration        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOptionsconfiguration          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOptionsconfiguration = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSize        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSize          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSize = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthVersioningconfiguration        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVersioningconfiguration          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVersioningconfiguration = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AuthMode_name = map[int32]string{
	0: "AUTH_MODE_STATIC",
	1: "AUTH_MODE_LDAP",
}
View Source
var AuthMode_value = map[string]int32{
	"AUTH_MODE_STATIC": 0,
	"AUTH_MODE_LDAP":   1,
}
View Source
var BlockPullOrder_name = map[int32]string{
	0: "BLOCK_PULL_ORDER_STANDARD",
	1: "BLOCK_PULL_ORDER_RANDOM",
	2: "BLOCK_PULL_ORDER_IN_ORDER",
}
View Source
var BlockPullOrder_value = map[string]int32{
	"BLOCK_PULL_ORDER_STANDARD": 0,
	"BLOCK_PULL_ORDER_RANDOM":   1,
	"BLOCK_PULL_ORDER_IN_ORDER": 2,
}
View Source
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",
}
View Source
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,
}
View Source
var LDAPTransport_name = map[int32]string{
	0: "LDAP_TRANSPORT_PLAIN",
	2: "LDAP_TRANSPORT_TLS",
	3: "LDAP_TRANSPORT_START_TLS",
}
View Source
var LDAPTransport_value = map[string]int32{
	"LDAP_TRANSPORT_PLAIN":     0,
	"LDAP_TRANSPORT_TLS":       2,
	"LDAP_TRANSPORT_START_TLS": 3,
}
View Source
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",
}
View Source
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,
}
View Source
var Tuning_name = map[int32]string{
	0: "TUNING_AUTO",
	1: "TUNING_SMALL",
	2: "TUNING_LARGE",
}
View Source
var Tuning_value = map[string]int32{
	"TUNING_AUTO":  0,
	"TUNING_SMALL": 1,
	"TUNING_LARGE": 2,
}

Functions

func CheckFreeSpace added in v1.1.0

func CheckFreeSpace(minFree Size, usage fs.Usage) error

CheckFreeSpace checks that the free space does not fall below the minimum required free space.

Types

type AuthMode added in v0.14.51

type AuthMode int32
const (
	AuthModeStatic AuthMode = 0
	AuthModeLDAP   AuthMode = 1
)

func (AuthMode) EnumDescriptor added in v1.10.0

func (AuthMode) EnumDescriptor() ([]byte, []int)

func (AuthMode) MarshalText added in v0.14.51

func (t AuthMode) MarshalText() ([]byte, error)

func (AuthMode) String added in v0.14.51

func (t AuthMode) String() string

func (*AuthMode) UnmarshalText added in v0.14.51

func (t *AuthMode) UnmarshalText(bs []byte) error

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 ReadJSON added in v0.12.0

func ReadJSON(r io.Reader, myID protocol.DeviceID) (Configuration, error)

func ReadXML

func ReadXML(r io.Reader, myID protocol.DeviceID) (Configuration, int, error)

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 (*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) WriteXML

func (cfg *Configuration) WriteXML(w io.Writer) 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) Descriptor() ([]byte, []int)

func (*Defaults) Marshal added in v1.14.0

func (m *Defaults) Marshal() (dAtA []byte, err error)

func (*Defaults) MarshalTo added in v1.14.0

func (m *Defaults) MarshalTo(dAtA []byte) (int, error)

func (*Defaults) MarshalToSizedBuffer added in v1.14.0

func (m *Defaults) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Defaults) ProtoMessage added in v1.14.0

func (*Defaults) ProtoMessage()

func (*Defaults) ProtoSize added in v1.14.0

func (m *Defaults) ProtoSize() (n int)

func (*Defaults) Reset added in v1.14.0

func (m *Defaults) Reset()

func (*Defaults) String added in v1.14.0

func (m *Defaults) String() string

func (*Defaults) Unmarshal added in v1.14.0

func (m *Defaults) Unmarshal(dAtA []byte) error

func (*Defaults) XXX_DiscardUnknown added in v1.14.0

func (m *Defaults) XXX_DiscardUnknown()

func (*Defaults) XXX_Marshal added in v1.14.0

func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Defaults) XXX_Merge added in v1.14.0

func (m *Defaults) XXX_Merge(src proto.Message)

func (*Defaults) XXX_Size added in v1.14.0

func (m *Defaults) XXX_Size() int

func (*Defaults) XXX_Unmarshal added in v1.14.0

func (m *Defaults) XXX_Unmarshal(b []byte) error

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 (*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 */
	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 (*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 (*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) 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 (*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) Copy added in v1.19.0

func (i Ignores) Copy() Ignores

func (*Ignores) Descriptor added in v1.19.0

func (*Ignores) Descriptor() ([]byte, []int)

func (*Ignores) Marshal added in v1.19.0

func (m *Ignores) Marshal() (dAtA []byte, err error)

func (*Ignores) MarshalTo added in v1.19.0

func (m *Ignores) MarshalTo(dAtA []byte) (int, error)

func (*Ignores) MarshalToSizedBuffer added in v1.19.0

func (m *Ignores) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Ignores) ProtoMessage added in v1.19.0

func (*Ignores) ProtoMessage()

func (*Ignores) ProtoSize added in v1.19.0

func (m *Ignores) ProtoSize() (n int)

func (*Ignores) Reset added in v1.19.0

func (m *Ignores) Reset()

func (*Ignores) String added in v1.19.0

func (m *Ignores) String() string

func (*Ignores) Unmarshal added in v1.19.0

func (m *Ignores) Unmarshal(dAtA []byte) error

func (*Ignores) XXX_DiscardUnknown added in v1.19.0

func (m *Ignores) XXX_DiscardUnknown()

func (*Ignores) XXX_Marshal added in v1.19.0

func (m *Ignores) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ignores) XXX_Merge added in v1.19.0

func (m *Ignores) XXX_Merge(src proto.Message)

func (*Ignores) XXX_Size added in v1.19.0

func (m *Ignores) XXX_Size() int

func (*Ignores) XXX_Unmarshal added in v1.19.0

func (m *Ignores) XXX_Unmarshal(b []byte) error

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 (*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 (*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
const (
	PullOrderRandom        PullOrder = 0
	PullOrderAlphabetic    PullOrder = 1
	PullOrderSmallestFirst PullOrder = 2
	PullOrderLargestFirst  PullOrder = 3
	PullOrderOldestFirst   PullOrder = 4
	PullOrderNewestFirst   PullOrder = 5
)

func (PullOrder) EnumDescriptor added in v1.10.0

func (PullOrder) EnumDescriptor() ([]byte, []int)

func (PullOrder) MarshalText

func (o PullOrder) MarshalText() ([]byte, error)

func (PullOrder) String

func (o PullOrder) String() string

func (*PullOrder) UnmarshalText

func (o *PullOrder) UnmarshalText(bs []byte) error

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 ParseSize added in v0.14.28

func ParseSize(s string) (Size, error)

func (Size) BaseValue added in v0.14.28

func (s Size) BaseValue() float64

func (*Size) Descriptor added in v1.10.0

func (*Size) Descriptor() ([]byte, []int)

func (*Size) Marshal added in v1.11.0

func (m *Size) Marshal() (dAtA []byte, err error)

func (*Size) MarshalTo added in v1.11.0

func (m *Size) MarshalTo(dAtA []byte) (int, error)

func (*Size) MarshalToSizedBuffer added in v1.11.0

func (m *Size) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Size) ParseDefault added in v0.14.28

func (s *Size) ParseDefault(str string) error

func (Size) Percentage added in v0.14.28

func (s Size) Percentage() bool

func (*Size) ProtoMessage added in v1.10.0

func (*Size) ProtoMessage()

func (*Size) ProtoSize added in v1.10.0

func (m *Size) ProtoSize() (n int)

func (*Size) Reset added in v1.10.0

func (m *Size) Reset()

func (Size) String added in v0.14.28

func (s Size) String() string

func (*Size) Unmarshal added in v1.11.0

func (m *Size) Unmarshal(dAtA []byte) error

func (*Size) XXX_DiscardUnknown added in v1.10.0

func (m *Size) XXX_DiscardUnknown()

func (*Size) XXX_Marshal added in v1.10.0

func (m *Size) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Size) XXX_Merge added in v1.10.0

func (m *Size) XXX_Merge(src proto.Message)

func (*Size) XXX_Size added in v1.10.0

func (m *Size) XXX_Size() int

func (*Size) XXX_Unmarshal added in v1.10.0

func (m *Size) XXX_Unmarshal(b []byte) error

type Tuning added in v1.3.0

type Tuning int32
const (
	TuningAuto  Tuning = 0
	TuningSmall Tuning = 1
	TuningLarge Tuning = 2
)

func (Tuning) EnumDescriptor added in v1.10.0

func (Tuning) EnumDescriptor() ([]byte, []int)

func (Tuning) MarshalText added in v1.3.0

func (t Tuning) MarshalText() ([]byte, error)

func (Tuning) String added in v1.3.0

func (t Tuning) String() string

func (*Tuning) UnmarshalText added in v1.3.0

func (t *Tuning) UnmarshalText(bs []byte) error

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 (*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.

func Load

func Load(path string, myID protocol.DeviceID, evLogger events.Logger) (Wrapper, int, error)

Load loads an existing file on disk and returns a new configuration wrapper. The returned Wrapper is a suture.Service, thus needs to be started (added to a supervisor).

func Wrap

func Wrap(path string, cfg Configuration, myID protocol.DeviceID, evLogger events.Logger) Wrapper

Wrap wraps an existing Configuration structure and ties it to a file on disk. The returned Wrapper is a suture.Service, thus needs to be started (added to a supervisor).

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

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL