Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d828adb648 | ||
|
|
9d09fd6af3 | ||
|
|
b1db328931 | ||
|
|
14ae330eff | ||
|
|
977ee4f06b | ||
|
|
42de53c6c9 | ||
|
|
48da6f0f22 | ||
|
|
a20c6ca868 | ||
|
|
e027175446 | ||
|
|
7774932302 | ||
|
|
3fe331c2d0 | ||
|
|
1b1d38183d | ||
|
|
fb3281b647 | ||
|
|
e6b1f67ecf | ||
|
|
9e0b924d57 | ||
|
|
df99237a7f | ||
|
|
8452fd2ab4 | ||
|
|
c390565eef | ||
|
|
02744cd73f | ||
|
|
bd622b8edd | ||
|
|
67761d8795 | ||
|
|
9f8b01b1b9 | ||
|
|
d2e3295767 |
@@ -1,6 +1,6 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask a question
|
||||
- name: I need help / I have a question
|
||||
url: https://forum.syncthing.net/
|
||||
about: Ask questions, get support, and discuss with other community members.
|
||||
- name: Android issues
|
||||
|
||||
@@ -91,6 +91,7 @@ Erik Meitner (WSGCSysadmin) <e.meitner@willystreet.coop>
|
||||
Evgeny Kuznetsov <evgeny@kuznetsov.md>
|
||||
Federico Castagnini (facastagnini) <federico.castagnini@gmail.com>
|
||||
Felix Ableitner (Nutomic) <me@nutomic.com>
|
||||
Felix Lampe <mail@flampe.de>
|
||||
Felix Unterpaintner (bigbear2nd) <bigbear2nd@gmail.com>
|
||||
Francois-Xavier Gsell (zukoo) <fxgsell@gmail.com>
|
||||
Frank Isemann (fti7) <frank@isemann.name>
|
||||
@@ -232,6 +233,7 @@ Taylor Khan (nelsonkhan) <nelsonkhan@gmail.com>
|
||||
Thomas Hipp <thomashipp@gmail.com>
|
||||
Tim Abell (timabell) <tim@timwise.co.uk>
|
||||
Tim Howes (timhowes) <timhowes@berkeley.edu>
|
||||
Tobias Klauser <tobias.klauser@gmail.com>
|
||||
Tobias Nygren (tnn2) <tnn@nygren.pp.se>
|
||||
Tobias Tom (tobiastom) <t.tom@succont.de>
|
||||
Tom Jakubowski <tom@crystae.net>
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright (C) 2019 The Syncthing Authors.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
// Command stcrashreceiver is a trivial HTTP server that allows two things:
|
||||
//
|
||||
// - uploading files (crash reports) named like a SHA256 hash using a PUT request
|
||||
// - checking whether such file exists using a HEAD request
|
||||
//
|
||||
// Typically this should be deployed behind something that manages HTTPS.
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/sha256"
|
||||
"github.com/syncthing/syncthing/lib/ur"
|
||||
|
||||
raven "github.com/getsentry/raven-go"
|
||||
)
|
||||
|
||||
const maxRequestSize = 1 << 20 // 1 MiB
|
||||
|
||||
func main() {
|
||||
dir := flag.String("dir", ".", "Directory to store reports in")
|
||||
dsn := flag.String("dsn", "", "Sentry DSN")
|
||||
listen := flag.String("listen", ":22039", "HTTP listen address")
|
||||
flag.Parse()
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
cr := &crashReceiver{
|
||||
dir: *dir,
|
||||
dsn: *dsn,
|
||||
}
|
||||
mux.Handle("/", cr)
|
||||
|
||||
if *dsn != "" {
|
||||
mux.HandleFunc("/failure", handleFailureFn(*dsn))
|
||||
}
|
||||
|
||||
log.SetOutput(os.Stdout)
|
||||
if err := http.ListenAndServe(*listen, mux); err != nil {
|
||||
log.Fatalln("HTTP serve:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func handleFailureFn(dsn string) func(w http.ResponseWriter, req *http.Request) {
|
||||
return func(w http.ResponseWriter, req *http.Request) {
|
||||
lr := io.LimitReader(req.Body, maxRequestSize)
|
||||
bs, err := ioutil.ReadAll(lr)
|
||||
req.Body.Close()
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), 500)
|
||||
return
|
||||
}
|
||||
|
||||
var reports []ur.FailureReport
|
||||
err = json.Unmarshal(bs, &reports)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), 400)
|
||||
return
|
||||
}
|
||||
if len(reports) == 0 {
|
||||
// Shouldn't happen
|
||||
return
|
||||
}
|
||||
|
||||
version, err := parseVersion(reports[0].Version)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), 400)
|
||||
return
|
||||
}
|
||||
for _, r := range reports {
|
||||
pkt := packet(version)
|
||||
pkt.Message = r.Description
|
||||
pkt.Extra = raven.Extra{
|
||||
"count": r.Count,
|
||||
}
|
||||
pkt.Fingerprint = []string{r.Description}
|
||||
|
||||
if err := sendReport(dsn, pkt, userIDFor(req)); err != nil {
|
||||
log.Println("Failed to send crash report:", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// userIDFor returns a string we can use as the user ID for the purpose of
|
||||
// counting affected users. It's the truncated hash of a salt, the user
|
||||
// remote IP, and the current month.
|
||||
func userIDFor(req *http.Request) string {
|
||||
addr := req.RemoteAddr
|
||||
if fwd := req.Header.Get("x-forwarded-for"); fwd != "" {
|
||||
addr = fwd
|
||||
}
|
||||
if host, _, err := net.SplitHostPort(addr); err == nil {
|
||||
addr = host
|
||||
}
|
||||
now := time.Now().Format("200601")
|
||||
salt := "stcrashreporter"
|
||||
hash := sha256.Sum256([]byte(salt + addr + now))
|
||||
return fmt.Sprintf("%x", hash[:8])
|
||||
}
|
||||
@@ -31,12 +31,7 @@ var (
|
||||
clientsMut sync.Mutex
|
||||
)
|
||||
|
||||
func sendReport(dsn, path string, report []byte, userID string) error {
|
||||
pkt, err := parseReport(path, report)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
func sendReport(dsn string, pkt *raven.Packet, userID string) error {
|
||||
pkt.Interfaces = append(pkt.Interfaces, &raven.User{ID: userID})
|
||||
|
||||
clientsMut.Lock()
|
||||
@@ -44,6 +39,7 @@ func sendReport(dsn, path string, report []byte, userID string) error {
|
||||
|
||||
cli, ok := clients[dsn]
|
||||
if !ok {
|
||||
var err error
|
||||
cli, err = raven.New(dsn)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -62,7 +58,7 @@ func sendReport(dsn, path string, report []byte, userID string) error {
|
||||
return <-errC
|
||||
}
|
||||
|
||||
func parseReport(path string, report []byte) (*raven.Packet, error) {
|
||||
func parseCrashReport(path string, report []byte) (*raven.Packet, error) {
|
||||
parts := bytes.SplitN(report, []byte("\n"), 2)
|
||||
if len(parts) != 2 {
|
||||
return nil, errors.New("no first line")
|
||||
@@ -126,35 +122,50 @@ func parseReport(path string, report []byte) (*raven.Packet, error) {
|
||||
}
|
||||
}
|
||||
|
||||
pkt := &raven.Packet{
|
||||
Message: string(subjectLine),
|
||||
Platform: "go",
|
||||
Release: version.tag,
|
||||
Environment: version.environment(),
|
||||
Tags: raven.Tags{
|
||||
raven.Tag{Key: "version", Value: version.version},
|
||||
raven.Tag{Key: "tag", Value: version.tag},
|
||||
raven.Tag{Key: "codename", Value: version.codename},
|
||||
raven.Tag{Key: "runtime", Value: version.runtime},
|
||||
raven.Tag{Key: "goos", Value: version.goos},
|
||||
raven.Tag{Key: "goarch", Value: version.goarch},
|
||||
raven.Tag{Key: "builder", Value: version.builder},
|
||||
},
|
||||
Extra: raven.Extra{
|
||||
"url": reportServer + path,
|
||||
},
|
||||
Interfaces: []raven.Interface{&trace},
|
||||
}
|
||||
if version.commit != "" {
|
||||
pkt.Tags = append(pkt.Tags, raven.Tag{Key: "commit", Value: version.commit})
|
||||
}
|
||||
for _, tag := range version.extra {
|
||||
pkt.Tags = append(pkt.Tags, raven.Tag{Key: tag, Value: "1"})
|
||||
pkt := packet(version)
|
||||
pkt.Message = string(subjectLine)
|
||||
pkt.Extra = raven.Extra{
|
||||
"url": reportServer + path,
|
||||
}
|
||||
pkt.Interfaces = []raven.Interface{&trace}
|
||||
pkt.Fingerprint = crashReportFingerprint(pkt.Message)
|
||||
|
||||
return pkt, nil
|
||||
}
|
||||
|
||||
var (
|
||||
indexRe = regexp.MustCompile(`\[[-:0-9]+\]`)
|
||||
sizeRe = regexp.MustCompile(`(length|capacity) [0-9]+`)
|
||||
ldbPosRe = regexp.MustCompile(`(\(pos=)([0-9]+)\)`)
|
||||
ldbChecksumRe = regexp.MustCompile(`(want=0x)([a-z0-9]+)( got=0x)([a-z0-9]+)`)
|
||||
ldbFileRe = regexp.MustCompile(`(\[file=)([0-9]+)(\.ldb\])`)
|
||||
ldbInternalKeyRe = regexp.MustCompile(`(internal key ")[^"]+(", len=)[0-9]+`)
|
||||
ldbPathRe = regexp.MustCompile(`(open|write|read) .+[\\/].+[\\/]index[^\\/]+[\\/][^\\/]+: `)
|
||||
)
|
||||
|
||||
func crashReportFingerprint(message string) []string {
|
||||
// Do not fingerprint on the stack in case of db corruption or fatal
|
||||
// db io error - where it occurs doesn't matter.
|
||||
orig := message
|
||||
message = ldbPosRe.ReplaceAllString(message, "${1}x)")
|
||||
message = ldbFileRe.ReplaceAllString(message, "${1}x${3}")
|
||||
message = ldbChecksumRe.ReplaceAllString(message, "${1}X${3}X")
|
||||
message = ldbInternalKeyRe.ReplaceAllString(message, "${1}x${2}x")
|
||||
message = ldbPathRe.ReplaceAllString(message, "$1 x: ")
|
||||
if message != orig {
|
||||
return []string{message}
|
||||
}
|
||||
|
||||
message = indexRe.ReplaceAllString(message, "[x]")
|
||||
message = sizeRe.ReplaceAllString(message, "$1 x")
|
||||
|
||||
// {{ default }} is what sentry uses as a fingerprint by default. While
|
||||
// never specified, the docs point at this being some hash derived from the
|
||||
// stack trace. Here we include the filtered panic message on top of that.
|
||||
// https://docs.sentry.io/platforms/go/data-management/event-grouping/sdk-fingerprinting/#basic-example
|
||||
return []string{"{{ default }}", message}
|
||||
}
|
||||
|
||||
// syncthing v1.1.4-rc.1+30-g6aaae618-dirty-crashrep "Erbium Earthworm" (go1.12.5 darwin-amd64) jb@kvin.kastelo.net 2019-05-23 16:08:14 UTC [foo, bar]
|
||||
var longVersionRE = regexp.MustCompile(`syncthing\s+(v[^\s]+)\s+"([^"]+)"\s\(([^\s]+)\s+([^-]+)-([^)]+)\)\s+([^\s]+)[^\[]*(?:\[(.+)\])?$`)
|
||||
|
||||
@@ -217,3 +228,27 @@ func parseVersion(line string) (version, error) {
|
||||
|
||||
return v, nil
|
||||
}
|
||||
|
||||
func packet(version version) *raven.Packet {
|
||||
pkt := &raven.Packet{
|
||||
Platform: "go",
|
||||
Release: version.tag,
|
||||
Environment: version.environment(),
|
||||
Tags: raven.Tags{
|
||||
raven.Tag{Key: "version", Value: version.version},
|
||||
raven.Tag{Key: "tag", Value: version.tag},
|
||||
raven.Tag{Key: "codename", Value: version.codename},
|
||||
raven.Tag{Key: "runtime", Value: version.runtime},
|
||||
raven.Tag{Key: "goos", Value: version.goos},
|
||||
raven.Tag{Key: "goarch", Value: version.goarch},
|
||||
raven.Tag{Key: "builder", Value: version.builder},
|
||||
},
|
||||
}
|
||||
if version.commit != "" {
|
||||
pkt.Tags = append(pkt.Tags, raven.Tag{Key: "commit", Value: version.commit})
|
||||
}
|
||||
for _, tag := range version.extra {
|
||||
pkt.Tags = append(pkt.Tags, raven.Tag{Key: tag, Value: "1"})
|
||||
}
|
||||
return pkt
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ func TestParseReport(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
pkt, err := parseReport("1/2/345", bs)
|
||||
pkt, err := parseCrashReport("1/2/345", bs)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -76,3 +76,66 @@ func TestParseReport(t *testing.T) {
|
||||
|
||||
fmt.Printf("%s\n", bs)
|
||||
}
|
||||
|
||||
func TestCrashReportFingerprint(t *testing.T) {
|
||||
cases := []struct {
|
||||
message, exp string
|
||||
ldb bool
|
||||
}{
|
||||
{
|
||||
message: "panic: leveldb/table: corruption on data-block (pos=51308946): checksum mismatch, want=0xa89f9aa0 got=0xd27cc4c7 [file=004003.ldb]",
|
||||
exp: "panic: leveldb/table: corruption on data-block (pos=x): checksum mismatch, want=0xX got=0xX [file=x.ldb]",
|
||||
ldb: true,
|
||||
},
|
||||
{
|
||||
message: "panic: leveldb/table: corruption on table-footer (pos=248): bad magic number [file=001370.ldb]",
|
||||
exp: "panic: leveldb/table: corruption on table-footer (pos=x): bad magic number [file=x.ldb]",
|
||||
ldb: true,
|
||||
},
|
||||
{
|
||||
message: "panic: runtime error: slice bounds out of range [4294967283:4194304]",
|
||||
exp: "panic: runtime error: slice bounds out of range [x]",
|
||||
},
|
||||
{
|
||||
message: "panic: runtime error: slice bounds out of range [-2:]",
|
||||
exp: "panic: runtime error: slice bounds out of range [x]",
|
||||
},
|
||||
{
|
||||
message: "panic: runtime error: slice bounds out of range [:4294967283] with capacity 32768",
|
||||
exp: "panic: runtime error: slice bounds out of range [x] with capacity x",
|
||||
},
|
||||
{
|
||||
message: "panic: runtime error: index out of range [0] with length 0",
|
||||
exp: "panic: runtime error: index out of range [x] with length x",
|
||||
},
|
||||
{
|
||||
message: `panic: leveldb: internal key "\x01", len=1: invalid length`,
|
||||
exp: `panic: leveldb: internal key "x", len=x: invalid length`,
|
||||
ldb: true,
|
||||
},
|
||||
{
|
||||
message: `panic: write /var/syncthing/config/index-v0.14.0.db/2732813.log: cannot allocate memory`,
|
||||
exp: `panic: write x: cannot allocate memory`,
|
||||
ldb: true,
|
||||
},
|
||||
{
|
||||
message: `panic: filling Blocks: read C:\Users\Serv-Resp-Tizayuca\AppData\Local\Syncthing\index-v0.14.0.db\006561.ldb: Error de datos (comprobación de redundancia cíclica).`,
|
||||
exp: `panic: filling Blocks: read x: Error de datos (comprobación de redundancia cíclica).`,
|
||||
ldb: true,
|
||||
},
|
||||
}
|
||||
|
||||
for i, tc := range cases {
|
||||
fingerprint := crashReportFingerprint(tc.message)
|
||||
|
||||
expLen := 2
|
||||
if tc.ldb {
|
||||
expLen = 1
|
||||
}
|
||||
if l := len(fingerprint); l != expLen {
|
||||
t.Errorf("tc %v: Unexpected fingerprint length: %v != %v", i, l, expLen)
|
||||
} else if msg := fingerprint[expLen-1]; msg != tc.exp {
|
||||
t.Errorf("tc %v:\n\"%v\" !=\n\"%v\"", i, msg, tc.exp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,52 +4,21 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
// Command stcrashreceiver is a trivial HTTP server that allows two things:
|
||||
//
|
||||
// - uploading files (crash reports) named like a SHA256 hash using a PUT request
|
||||
// - checking whether such file exists using a HEAD request
|
||||
//
|
||||
// Typically this should be deployed behind something that manages HTTPS.
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/sha256"
|
||||
)
|
||||
|
||||
const maxRequestSize = 1 << 20 // 1 MiB
|
||||
|
||||
func main() {
|
||||
dir := flag.String("dir", ".", "Directory to store reports in")
|
||||
dsn := flag.String("dsn", "", "Sentry DSN")
|
||||
listen := flag.String("listen", ":22039", "HTTP listen address")
|
||||
flag.Parse()
|
||||
|
||||
cr := &crashReceiver{
|
||||
dir: *dir,
|
||||
dsn: *dsn,
|
||||
}
|
||||
|
||||
log.SetOutput(os.Stdout)
|
||||
if err := http.ListenAndServe(*listen, cr); err != nil {
|
||||
log.Fatalln("HTTP serve:", err)
|
||||
}
|
||||
}
|
||||
|
||||
type crashReceiver struct {
|
||||
dir string
|
||||
dsn string
|
||||
@@ -155,8 +124,13 @@ func (r *crashReceiver) servePut(reportID, fullPath string, w http.ResponseWrite
|
||||
|
||||
go func() {
|
||||
// There's no need for the client to have to wait for this part.
|
||||
if err := sendReport(r.dsn, reportID, bs, user); err != nil {
|
||||
log.Println("Failed to send report:", err)
|
||||
pkt, err := parseCrashReport(reportID, bs)
|
||||
if err != nil {
|
||||
log.Println("Failed to parse crash report:", err)
|
||||
return
|
||||
}
|
||||
if err := sendReport(r.dsn, pkt, user); err != nil {
|
||||
log.Println("Failed to send crash report:", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
@@ -166,20 +140,3 @@ func (r *crashReceiver) servePut(reportID, fullPath string, w http.ResponseWrite
|
||||
func (r *crashReceiver) dirFor(base string) string {
|
||||
return filepath.Join(base[0:2], base[2:4])
|
||||
}
|
||||
|
||||
// userIDFor returns a string we can use as the user ID for the purpose of
|
||||
// counting affected users. It's the truncated hash of a salt, the user
|
||||
// remote IP, and the current month.
|
||||
func userIDFor(req *http.Request) string {
|
||||
addr := req.RemoteAddr
|
||||
if fwd := req.Header.Get("x-forwarded-for"); fwd != "" {
|
||||
addr = fwd
|
||||
}
|
||||
if host, _, err := net.SplitHostPort(addr); err == nil {
|
||||
addr = host
|
||||
}
|
||||
now := time.Now().Format("200601")
|
||||
salt := "stcrashreporter"
|
||||
hash := sha256.Sum256([]byte(salt + addr + now))
|
||||
return fmt.Sprintf("%x", hash[:8])
|
||||
}
|
||||
|
||||
+5
-2
@@ -28,6 +28,7 @@ import (
|
||||
|
||||
"github.com/oschwald/geoip2-golang"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/upgrade"
|
||||
"github.com/syncthing/syncthing/lib/ur/contract"
|
||||
)
|
||||
|
||||
@@ -919,7 +920,7 @@ func getReport(db *sql.DB) map[string]interface{} {
|
||||
}
|
||||
|
||||
var (
|
||||
plusRe = regexp.MustCompile(`\+.*$`)
|
||||
plusRe = regexp.MustCompile(`(\+.*|\.dev\..*)$`)
|
||||
plusStr = "(+dev)"
|
||||
)
|
||||
|
||||
@@ -978,7 +979,9 @@ func (s *summary) MarshalJSON() ([]byte, error) {
|
||||
for v := range s.versions {
|
||||
versions = append(versions, v)
|
||||
}
|
||||
sort.Strings(versions)
|
||||
sort.Slice(versions, func(a, b int) bool {
|
||||
return upgrade.CompareVersions(versions[a], versions[b]) < 0
|
||||
})
|
||||
|
||||
var filtered []string
|
||||
for _, v := range versions {
|
||||
|
||||
@@ -45,7 +45,7 @@ require (
|
||||
github.com/vitrun/qart v0.0.0-20160531060029-bf64b92db6b0
|
||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
|
||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc
|
||||
golang.org/x/sys v0.0.0-20200819171115-d785dc25833f
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
|
||||
golang.org/x/text v0.3.3
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
|
||||
google.golang.org/protobuf v1.25.0 // indirect
|
||||
|
||||
@@ -199,19 +199,10 @@ github.com/marten-seemann/qtls v0.10.0 h1:ECsuYUKalRL240rRD4Ri33ISb7kAQ3qGDlrrl5
|
||||
github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs=
|
||||
github.com/marten-seemann/qtls-go1-15 v0.1.0 h1:i/YPXVxz8q9umso/5y474CNcHmTpA+5DH+mFPjx6PZg=
|
||||
github.com/marten-seemann/qtls-go1-15 v0.1.0/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I=
|
||||
github.com/maruel/panicparse v1.3.0 h1:1Ep/RaYoSL1r5rTILHQQbyzHG8T4UP5ZbQTYTo4bdDc=
|
||||
github.com/maruel/panicparse v1.3.0/go.mod h1:vszMjr5QQ4F5FSRfraldcIA/BCw5xrdLL+zEcU2nRBs=
|
||||
github.com/maruel/panicparse v1.5.1 h1:hUPcXI7ubtEqj/k+P34KsHQqb86zuVk7zBfkP6tBBPc=
|
||||
github.com/maruel/panicparse v1.5.1/go.mod h1:aOutY/MUjdj80R0AEVI9qE2zHqig+67t2ffUDDiLzAM=
|
||||
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
|
||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
@@ -412,8 +403,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -423,8 +412,6 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY=
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76 h1:Dho5nD6R3PcW2SH1or8vS0dszDaXRxIw55lBX7XiE5g=
|
||||
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -435,8 +422,8 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200819171115-d785dc25833f h1:KJuwZVtZBVzDmEDtB2zro9CXkD9O0dpCv4o2LHbQIAw=
|
||||
golang.org/x/sys v0.0.0-20200819171115-d785dc25833f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 h1:YEu4SMq7D0cmT7CBbXfcH0NZeuChAXwsHe/9XueUO6o=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
||||
@@ -301,9 +301,9 @@
|
||||
"The cleanup interval cannot be blank.": "L'intervalle de purge ne peut pas être vide.",
|
||||
"The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.": "La configuration a été enregistrée mais pas activée. Syncthing doit redémarrer afin d'activer la nouvelle configuration.",
|
||||
"The device ID cannot be blank.": "L'ID de l'appareil ne peut être vide.",
|
||||
"The device ID to enter here can be found in the \"Actions > Show ID\" dialog on the other device. Spaces and dashes are optional (ignored).": "L'ID d'appareil à saisir ici se trouve dans le menu \"Actions > Afficher mon ID\" de l'appareil distant. Espaces et tirets sont optionnels (ignorés).",
|
||||
"The device ID to enter here can be found in the \"Actions > Show ID\" dialog on the other device. Spaces and dashes are optional (ignored).": "L'ID d'appareil à saisir ici se trouve dans le menu \"Actions > Afficher mon ID\" de l'appareil distant. Espaces et tirets sont optionnels (ignorés, comme la casse).",
|
||||
"The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.": "Le rapport d'utilisation chiffré est envoyé quotidiennement. Il sert à répertorier les plates-formes utilisées, la taille des partages et les versions de l'application. Si le jeu de données rapportées devait être changé, il vous serait demandé de valider de nouveau son envoi via ce message. Vous pouvez revenir sur votre décision via Actions/Configuration, et agir sur la fréquence d'envoi via Actions/Avancé/Options (Ur Initial Delay (seconds)).",
|
||||
"The entered device ID does not look valid. It should be a 52 or 56 character string consisting of letters and numbers, with spaces and dashes being optional.": "L'ID de l'appareil inséré ne semble pas valide. Il devrait ressembler à une chaîne de 52 ou 56 caractères comprenant des lettres, des chiffres et potentiellement des espaces et des traits d'union.",
|
||||
"The entered device ID does not look valid. It should be a 52 or 56 character string consisting of letters and numbers, with spaces and dashes being optional.": "L'ID de l'appareil inséré ne semble pas valide. Il devrait ressembler à une chaîne de 52 ou 56 caractères comprenant des lettres (casse ignorée), des chiffres et potentiellement des espaces et des traits d'union.",
|
||||
"The folder ID cannot be blank.": "L'ID du partage ne peut être vide.",
|
||||
"The folder ID must be unique.": "L'ID du partage doit être unique.",
|
||||
"The folder path cannot be blank.": "Le chemin vers le répertoire ne peut pas être vide.",
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
"Copied from original": "Orijinalinden kopyalandı",
|
||||
"Copyright © 2014-2019 the following Contributors:": "Telif hakkı © 2014-2020 Katkıda Bulunanlar:",
|
||||
"Creating ignore patterns, overwriting an existing file at {%path%}.": "Yoksayma şekilleri oluşturuluyor, {{path}} yolunda varolan bir dosyanın üzerine yazılıyor.",
|
||||
"Currently Shared With Devices": "Şu Anda Cihazlarla Paylaşılan",
|
||||
"Currently Shared With Devices": "Şu Anda Paylaşıldığı Cihazlar",
|
||||
"Danger!": "Tehlike!",
|
||||
"Debugging Facilities": "Hata Ayıklama Olanakları",
|
||||
"Default Folder Path": "Varsayılan Klasör Yolu",
|
||||
"Deleted": "Silindi",
|
||||
"Deleted": "Silinen",
|
||||
"Deselect All": "Tüm Seçimi Kaldır",
|
||||
"Deselect devices to stop sharing this folder with.": "Bu klasörün paylaşımının durdurulacağı cihazların seçimini kaldırın.",
|
||||
"Device": "Cihaz",
|
||||
@@ -243,7 +243,7 @@
|
||||
"Reused": "Yeniden Kullanılan",
|
||||
"Revert Local Changes": "Yerel Değişiklikleri Geri Döndür",
|
||||
"Save": "Kaydet",
|
||||
"Scan Time Remaining": "Kalan Tarama Zamanı",
|
||||
"Scan Time Remaining": "Kalan Tarama Süresi",
|
||||
"Scanning": "Tarama",
|
||||
"See external versioning help for supported templated command line parameters.": "Desteklenen şablonlu komut satırı parametreleri için harici sürümlendirme yardımına bakın.",
|
||||
"Select All": "Tümünü Seç",
|
||||
@@ -345,7 +345,7 @@
|
||||
"Upgrade To {%version%}": "{{version}} Sürümüne Yükselt",
|
||||
"Upgrading": "Yükseltiliyor",
|
||||
"Upload Rate": "Gönderme Hızı",
|
||||
"Uptime": "Çalışma Zamanı",
|
||||
"Uptime": "Çalışma Süresi",
|
||||
"Usage reporting is always enabled for candidate releases.": "Kullanım bildirme aday yayımlar için her zaman etkinleştirilmiştir.",
|
||||
"Use HTTPS for GUI": "GKA için HTTPS kullan",
|
||||
"Username/Password has not been set for the GUI authentication. Please consider setting it up.": "Kullanıcı adı/Parola, GKA kimlik doğrulaması için ayarlanmadı. Lütfen ayarlamayı düşünün.",
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
"Downloaded": "Завантажено",
|
||||
"Downloading": "Завантаження",
|
||||
"Edit": "Редагувати",
|
||||
"Edit Device": "Edit Device",
|
||||
"Edit Folder": "Edit Folder",
|
||||
"Edit Device": "Налаштування пристрою",
|
||||
"Edit Folder": "Налаштування директорії",
|
||||
"Editing {%path%}.": "Редагування {{path}}.",
|
||||
"Enable Crash Reporting": "Увімкнути звітування про збої",
|
||||
"Enable NAT traversal": "Увімкнути NAT traversal",
|
||||
@@ -375,7 +375,7 @@
|
||||
"You have unsaved changes. Do you really want to discard them?": "Внесені зміни не збережено, чи дійсно відмовитись від змін?",
|
||||
"You must keep at least one version.": "Ви повинні зберігати щонайменше одну версію.",
|
||||
"days": "днів",
|
||||
"directories": "directories",
|
||||
"directories": "директорії",
|
||||
"files": "файли",
|
||||
"full documentation": "повна документація",
|
||||
"items": "елементи",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<h4 class="text-center" translate>The Syncthing Authors</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="contributor-list">
|
||||
Jakob Borg, Audrius Butkevicius, Simon Frei, Alexander Graf, Alexandre Viau, Anderson Mesquita, Antony Male, Ben Schulz, Caleb Callaway, Daniel Harte, Evgeny Kuznetsov, Lars K.W. Gohlke, Lode Hoste, Michael Ploujnikov, Nate Morrison, Philippe Schommers, Ryan Sullivan, Sergey Mishin, Stefan Tatschner, Wulf Weich, dependabot-preview[bot], greatroar, Aaron Bieber, Adam Piggott, Adel Qalieh, Alan Pope, Alberto Donato, Alessandro G., Alex Lindeman, Alex Xu, Aman Gupta, Andrew Dunham, Andrew Rabert, Andrey D, André Colomb, Anjan Momi, Antoine Lamielle, Aranjedeath, Arkadiusz Tymiński, Arthur Axel fREW Schmidt, Artur Zubilewicz, Aurélien Rainone, BAHADIR YILMAZ, Bart De Vries, Ben Curthoys, Ben Shepherd, Ben Sidhom, Benedikt Heine, Benedikt Morbach, Benno Fünfstück, Benny Ng, Boqin Qin, Boris Rybalkin, Brandon Philips, Brendan Long, Brian R. Becker, Carsten Hagemann, Cathryne Linenweaver, Cedric Staniewski, Chris Howie, Chris Joel, Chris Tonkinson, Colin Kennedy, Cromefire_, Cyprien Devillez, Dale Visser, Dan, Daniel Bergmann, Daniel Martí, Darshil Chanpura, David Rimmer, Denis A., Dennis Wilson, Dmitry Saveliev, Domenic Horner, Dominik Heidler, Elias Jarlebring, Elliot Huffman, Emil Hessman, Erik Meitner, Federico Castagnini, Felix Ableitner, Felix Unterpaintner, Francois-Xavier Gsell, Frank Isemann, Gilli Sigurdsson, Gleb Sinyavskiy, Graham Miln, Han Boetes, HansK-p, Harrison Jones, Heiko Zuerker, Hugo Locurcio, Iain Barnett, Ian Johnson, Ilya Brin, Iskander Sharipov, Jaakko Hannikainen, Jacek Szafarkiewicz, Jack Croft, Jacob, Jake Peterson, James Patterson, Jaroslav Lichtblau, Jaroslav Malec, Jaya Chithra, Jens Diemer, Jerry Jacobs, Jochen Voss, Johan Andersson, Johan Vromans, John Rinehart, Jonas Thelemann, Jonathan, Jonathan Cross, Jose Manuel Delicado, Jörg Thalheim, Jędrzej Kula, Kalle Laine, Karol Różycki, Keith Turner, Kelong Cong, Ken'ichi Kamada, Kevin Allen, Kevin Bushiri, Kevin White, Jr., Kurt Fitzner, Laurent Arnoud, Laurent Etiemble, Leo Arias, Liu Siyuan, Lord Landon Agahnim, Lukas Lihotzki, Majed Abdulaziz, Marc Laporte, Marc Pujol, Marcin Dziadus, Marcus Legendre, Mario Majila, Mark Pulford, Mateusz Naściszewski, Mateusz Ż, Matic Potočnik, Matt Burke, Matt Robenolt, Matteo Ruina, Maurizio Tomasi, Max Schulze, MaximAL, Maxime Thirouin, Michael Jephcote, Michael Rienstra, Michael Tilli, Mike Boone, MikeLund, MikolajTwarog, Mingxuan Lin, Nicholas Rishel, Nico Stapelbroek, Nicolas Braud-Santoni, Nicolas Perraut, Niels Peter Roest, Nils Jakobi, NinoM4ster, Nitroretro, NoLooseEnds, Oliver Freyermuth, Otiel, Oyebanji Jacob Mayowa, Pablo, Pascal Jungblut, Paul Brit, Pawel Palenica, Paweł Rozlach, Peter Badida, Peter Dave Hello, Peter Hoeg, Peter Marquardt, Phil Davis, Phill Luby, Pier Paolo Ramon, Piotr Bejda, Pramodh KP, Rahmi Pruitt, Richard Hartmann, Robert Carosi, Robin Schoonover, Roman Zaynetdinov, Ross Smith II, Ruslan Yevdokymov, Sacheendra Talluri, Scott Klupfel, Shaarad Dalvi, Simon Mwepu, Sly_tom_cat, Stefan Kuntz, Suhas Gundimeda, Taylor Khan, Thomas Hipp, Tim Abell, Tim Howes, Tobias Nygren, Tobias Tom, Tom Jakubowski, Tomasz Wilczyński, Tommy Thorn, Tully Robinson, Tyler Brazier, Tyler Kropp, Unrud, Veeti Paananen, Victor Buinsky, Vil Brekin, Vladimir Rusinov, William A. Kennington III, Xavier O., Yannic A., andresvia, andyleap, boomsquared, chenrui, chucic, dependabot[bot], derekriemer, desbma, georgespatton, ghjklw, janost, jaseg, jelle van der Waa, klemens, marco-m, mv1005, otbutz, perewa, rubenbe, wangguoliang, xarx00, xjtdy888, 佛跳墙
|
||||
Jakob Borg, Audrius Butkevicius, Simon Frei, Alexander Graf, Alexandre Viau, Anderson Mesquita, Antony Male, Ben Schulz, Caleb Callaway, Daniel Harte, Evgeny Kuznetsov, Lars K.W. Gohlke, Lode Hoste, Michael Ploujnikov, Nate Morrison, Philippe Schommers, Ryan Sullivan, Sergey Mishin, Stefan Tatschner, Wulf Weich, dependabot-preview[bot], greatroar, Aaron Bieber, Adam Piggott, Adel Qalieh, Alan Pope, Alberto Donato, Alessandro G., Alex Lindeman, Alex Xu, Aman Gupta, Andrew Dunham, Andrew Rabert, Andrey D, André Colomb, Anjan Momi, Antoine Lamielle, Aranjedeath, Arkadiusz Tymiński, Arthur Axel fREW Schmidt, Artur Zubilewicz, Aurélien Rainone, BAHADIR YILMAZ, Bart De Vries, Ben Curthoys, Ben Shepherd, Ben Sidhom, Benedikt Heine, Benedikt Morbach, Benno Fünfstück, Benny Ng, Boqin Qin, Boris Rybalkin, Brandon Philips, Brendan Long, Brian R. Becker, Carsten Hagemann, Cathryne Linenweaver, Cedric Staniewski, Chris Howie, Chris Joel, Chris Tonkinson, Colin Kennedy, Cromefire_, Cyprien Devillez, Dale Visser, Dan, Daniel Bergmann, Daniel Martí, Darshil Chanpura, David Rimmer, Denis A., Dennis Wilson, Dmitry Saveliev, Domenic Horner, Dominik Heidler, Elias Jarlebring, Elliot Huffman, Emil Hessman, Erik Meitner, Federico Castagnini, Felix Ableitner, Felix Lampe, Felix Unterpaintner, Francois-Xavier Gsell, Frank Isemann, Gilli Sigurdsson, Gleb Sinyavskiy, Graham Miln, Han Boetes, HansK-p, Harrison Jones, Heiko Zuerker, Hugo Locurcio, Iain Barnett, Ian Johnson, Ilya Brin, Iskander Sharipov, Jaakko Hannikainen, Jacek Szafarkiewicz, Jack Croft, Jacob, Jake Peterson, James Patterson, Jaroslav Lichtblau, Jaroslav Malec, Jaya Chithra, Jens Diemer, Jerry Jacobs, Jochen Voss, Johan Andersson, Johan Vromans, John Rinehart, Jonas Thelemann, Jonathan, Jonathan Cross, Jose Manuel Delicado, Jörg Thalheim, Jędrzej Kula, Kalle Laine, Karol Różycki, Keith Turner, Kelong Cong, Ken'ichi Kamada, Kevin Allen, Kevin Bushiri, Kevin White, Jr., Kurt Fitzner, Laurent Arnoud, Laurent Etiemble, Leo Arias, Liu Siyuan, Lord Landon Agahnim, Lukas Lihotzki, Majed Abdulaziz, Marc Laporte, Marc Pujol, Marcin Dziadus, Marcus Legendre, Mario Majila, Mark Pulford, Mateusz Naściszewski, Mateusz Ż, Matic Potočnik, Matt Burke, Matt Robenolt, Matteo Ruina, Maurizio Tomasi, Max Schulze, MaximAL, Maxime Thirouin, Michael Jephcote, Michael Rienstra, Michael Tilli, Mike Boone, MikeLund, MikolajTwarog, Mingxuan Lin, Nicholas Rishel, Nico Stapelbroek, Nicolas Braud-Santoni, Nicolas Perraut, Niels Peter Roest, Nils Jakobi, NinoM4ster, Nitroretro, NoLooseEnds, Oliver Freyermuth, Otiel, Oyebanji Jacob Mayowa, Pablo, Pascal Jungblut, Paul Brit, Pawel Palenica, Paweł Rozlach, Peter Badida, Peter Dave Hello, Peter Hoeg, Peter Marquardt, Phil Davis, Phill Luby, Pier Paolo Ramon, Piotr Bejda, Pramodh KP, Rahmi Pruitt, Richard Hartmann, Robert Carosi, Robin Schoonover, Roman Zaynetdinov, Ross Smith II, Ruslan Yevdokymov, Sacheendra Talluri, Scott Klupfel, Shaarad Dalvi, Simon Mwepu, Sly_tom_cat, Stefan Kuntz, Suhas Gundimeda, Taylor Khan, Thomas Hipp, Tim Abell, Tim Howes, Tobias Klauser, Tobias Nygren, Tobias Tom, Tom Jakubowski, Tomasz Wilczyński, Tommy Thorn, Tully Robinson, Tyler Brazier, Tyler Kropp, Unrud, Veeti Paananen, Victor Buinsky, Vil Brekin, Vladimir Rusinov, William A. Kennington III, Xavier O., Yannic A., andresvia, andyleap, boomsquared, chenrui, chucic, dependabot[bot], derekriemer, desbma, georgespatton, ghjklw, janost, jaseg, jelle van der Waa, klemens, marco-m, mv1005, otbutz, perewa, rubenbe, wangguoliang, xarx00, xjtdy888, 佛跳墙
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
@@ -848,10 +848,11 @@ angular.module('syncthing.core')
|
||||
if ($scope.model[folder].needTotalItems === 0) {
|
||||
return 100;
|
||||
}
|
||||
if ($scope.model[folder].needBytes == 0 && $scope.model[folder].needDeletes > 0) {
|
||||
if (($scope.model[folder].needBytes == 0 && $scope.model[folder].needDeletes > 0) || $scope.model[folder].globalBytes == 0) {
|
||||
// We don't need any data, but we have deletes that we need
|
||||
// to do. Drop down the completion percentage to indicate
|
||||
// that we have stuff to do.
|
||||
// Do the same thing in case we only have zero byte files to sync.
|
||||
return 95;
|
||||
}
|
||||
var pct = 100 * $scope.model[folder].inSyncBytes / $scope.model[folder].globalBytes;
|
||||
|
||||
@@ -149,9 +149,9 @@ func (m *mockedModel) DownloadProgress(deviceID protocol.DeviceID, folder string
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *mockedModel) AddConnection(conn connections.Connection, hello protocol.HelloResult) {}
|
||||
func (m *mockedModel) AddConnection(conn connections.Connection, hello protocol.Hello) {}
|
||||
|
||||
func (m *mockedModel) OnHello(protocol.DeviceID, net.Addr, protocol.HelloResult) error {
|
||||
func (m *mockedModel) OnHello(protocol.DeviceID, net.Addr, protocol.Hello) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/authmode.proto", fileDescriptor_8e30b562e1bcea1e) }
|
||||
|
||||
var fileDescriptor_8e30b562e1bcea1e = []byte{
|
||||
// 230 bytes of a gzipped FileDescriptorProto
|
||||
// 234 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x4f, 0x2c, 0x2d, 0xc9, 0xc8, 0xcd, 0x4f, 0x49, 0xd5,
|
||||
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x08, 0x4b, 0x29, 0x17, 0xa5, 0x16, 0xe4, 0x17,
|
||||
@@ -60,10 +60,10 @@ var fileDescriptor_8e30b562e1bcea1e = []byte{
|
||||
0x8d, 0x0f, 0x0e, 0x71, 0x0c, 0xf1, 0x74, 0x16, 0x60, 0x90, 0x12, 0xea, 0x9a, 0xab, 0xc0, 0x07,
|
||||
0x53, 0x13, 0x5c, 0x92, 0x58, 0x92, 0x99, 0x2c, 0x64, 0xc2, 0xc5, 0x87, 0x50, 0xe9, 0xe3, 0xe2,
|
||||
0x18, 0x20, 0xc0, 0x28, 0xa5, 0xd0, 0x35, 0x57, 0x81, 0x07, 0xa6, 0x0e, 0x24, 0x76, 0xa9, 0x4f,
|
||||
0x15, 0x85, 0x2f, 0xc5, 0xb2, 0x62, 0x89, 0x1c, 0x83, 0x93, 0xfb, 0x89, 0x87, 0x72, 0x0c, 0x17,
|
||||
0x1e, 0xca, 0x31, 0xbc, 0x78, 0x24, 0xc7, 0x30, 0xe1, 0xb1, 0x1c, 0xc3, 0x82, 0xc7, 0x72, 0x8c,
|
||||
0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x99, 0x9e, 0x59, 0x92, 0x51, 0x9a,
|
||||
0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x5c, 0x99, 0x97, 0x5c, 0x92, 0x91, 0x99, 0x97, 0x8e, 0xc4,
|
||||
0x42, 0x84, 0x40, 0x12, 0x1b, 0xd8, 0x07, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x8c,
|
||||
0xb9, 0xb3, 0x16, 0x01, 0x00, 0x00,
|
||||
0x15, 0x85, 0x2f, 0xc5, 0xb2, 0x62, 0x89, 0x1c, 0x83, 0x93, 0xf7, 0x89, 0x87, 0x72, 0x0c, 0x17,
|
||||
0x1e, 0xca, 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c,
|
||||
0x0b, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x66, 0x7a,
|
||||
0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x65, 0x5e, 0x72, 0x49, 0x46,
|
||||
0x66, 0x5e, 0x3a, 0x12, 0x0b, 0x11, 0x0a, 0x49, 0x6c, 0x60, 0x5f, 0x18, 0x03, 0x02, 0x00, 0x00,
|
||||
0xff, 0xff, 0x48, 0x80, 0x1f, 0x0c, 0x1a, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ package config
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
@@ -51,20 +52,22 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/blockpullorder.proto", fileDescriptor_3c46a5289006da6c) }
|
||||
|
||||
var fileDescriptor_3c46a5289006da6c = []byte{
|
||||
// 237 bytes of a gzipped FileDescriptorProto
|
||||
// 271 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcf, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0x2e, 0x28, 0xcd, 0xc9,
|
||||
0xc9, 0x2f, 0x4a, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x48, 0x6a,
|
||||
0xed, 0x61, 0xe4, 0xe2, 0x73, 0x02, 0x29, 0x08, 0x28, 0xcd, 0xc9, 0xf1, 0x07, 0x29, 0x10, 0xb2,
|
||||
0xe4, 0x92, 0x74, 0xf2, 0xf1, 0x77, 0xf6, 0x8e, 0x0f, 0x08, 0xf5, 0xf1, 0x89, 0xf7, 0x0f, 0x72,
|
||||
0x71, 0x0d, 0x8a, 0x0f, 0x0e, 0x71, 0xf4, 0x73, 0x71, 0x0c, 0x72, 0x11, 0x60, 0x90, 0x92, 0xea,
|
||||
0x9a, 0xab, 0x20, 0x86, 0xaa, 0x25, 0xb8, 0x24, 0x31, 0x2f, 0x25, 0xb1, 0x28, 0x45, 0xc8, 0x94,
|
||||
0x4b, 0x1c, 0x43, 0x6b, 0x90, 0xa3, 0x9f, 0x8b, 0xbf, 0xaf, 0x00, 0xa3, 0x94, 0x44, 0xd7, 0x5c,
|
||||
0x05, 0x11, 0x54, 0x8d, 0x41, 0x89, 0x79, 0x29, 0xf9, 0xb9, 0x42, 0x16, 0x58, 0x6c, 0xf4, 0xf4,
|
||||
0x83, 0x30, 0x04, 0x98, 0xa4, 0x24, 0xbb, 0xe6, 0x2a, 0x88, 0xa2, 0x6a, 0xf4, 0xcc, 0x03, 0x53,
|
||||
0x4e, 0xee, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0xf0, 0xe2, 0x91, 0x1c, 0xc3, 0x84,
|
||||
0xc7, 0x72, 0x0c, 0x0b, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43,
|
||||
0x94, 0x66, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x65, 0x5e,
|
||||
0x72, 0x49, 0x46, 0x66, 0x5e, 0x3a, 0x12, 0x0b, 0x11, 0x48, 0x49, 0x6c, 0xe0, 0x60, 0x31, 0x06,
|
||||
0x04, 0x00, 0x00, 0xff, 0xff, 0x46, 0xfd, 0xeb, 0xcf, 0x39, 0x01, 0x00, 0x00,
|
||||
0xc9, 0x2f, 0x4a, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x48, 0x4a,
|
||||
0x29, 0x17, 0xa5, 0x16, 0xe4, 0x17, 0xeb, 0x83, 0x05, 0x93, 0x4a, 0xd3, 0xf4, 0xd3, 0xf3, 0xd3,
|
||||
0xf3, 0xc1, 0x1c, 0x30, 0x0b, 0xa2, 0x58, 0xeb, 0x10, 0x23, 0x17, 0x9f, 0x13, 0xc8, 0x94, 0x80,
|
||||
0xd2, 0x9c, 0x1c, 0x7f, 0x90, 0x29, 0x42, 0x96, 0x5c, 0x92, 0x4e, 0x3e, 0xfe, 0xce, 0xde, 0xf1,
|
||||
0x01, 0xa1, 0x3e, 0x3e, 0xf1, 0xfe, 0x41, 0x2e, 0xae, 0x41, 0xf1, 0xc1, 0x21, 0x8e, 0x7e, 0x2e,
|
||||
0x8e, 0x41, 0x2e, 0x02, 0x0c, 0x52, 0x52, 0x5d, 0x73, 0x15, 0xc4, 0x50, 0xb5, 0x04, 0x97, 0x24,
|
||||
0xe6, 0xa5, 0x24, 0x16, 0xa5, 0x08, 0x99, 0x72, 0x89, 0x63, 0x68, 0x0d, 0x72, 0xf4, 0x73, 0xf1,
|
||||
0xf7, 0x15, 0x60, 0x94, 0x92, 0xe8, 0x9a, 0xab, 0x20, 0x82, 0xaa, 0x31, 0x28, 0x31, 0x2f, 0x25,
|
||||
0x3f, 0x57, 0xc8, 0x02, 0x8b, 0x8d, 0x9e, 0x7e, 0x10, 0x86, 0x00, 0x93, 0x94, 0x64, 0xd7, 0x5c,
|
||||
0x05, 0x51, 0x54, 0x8d, 0x9e, 0x79, 0x60, 0x4a, 0x8a, 0x65, 0xc5, 0x12, 0x39, 0x06, 0x27, 0xef,
|
||||
0x13, 0x0f, 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39,
|
||||
0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x16, 0x3c, 0x96, 0x63, 0xbc, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63,
|
||||
0x39, 0x86, 0x28, 0xcd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xe2,
|
||||
0xca, 0xbc, 0xe4, 0x92, 0x8c, 0xcc, 0xbc, 0x74, 0x24, 0x16, 0x22, 0x4c, 0x93, 0xd8, 0xc0, 0x01,
|
||||
0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x0c, 0xb7, 0x46, 0x68, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+564
-37
@@ -7,6 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
@@ -40,16 +41,25 @@ func (*Configuration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_baadf209193dc627, []int{0}
|
||||
}
|
||||
func (m *Configuration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Configuration.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *Configuration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Configuration.Merge(m, src)
|
||||
}
|
||||
func (m *Configuration) XXX_Size() int {
|
||||
return xxx_messageInfo_Configuration.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *Configuration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Configuration.DiscardUnknown(m)
|
||||
@@ -64,43 +74,169 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/config.proto", fileDescriptor_baadf209193dc627) }
|
||||
|
||||
var fileDescriptor_baadf209193dc627 = []byte{
|
||||
// 544 bytes of a gzipped FileDescriptorProto
|
||||
// 547 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x8b, 0xd3, 0x40,
|
||||
0x18, 0xc6, 0x53, 0xdb, 0x6d, 0xdd, 0xec, 0x3f, 0xc8, 0x8a, 0xa6, 0x2a, 0x99, 0x3a, 0x54, 0xa9,
|
||||
0xa2, 0x5d, 0x58, 0x2f, 0xe2, 0xcd, 0x5a, 0x2c, 0x05, 0x41, 0x19, 0x58, 0x51, 0x2f, 0xd2, 0x36,
|
||||
0xb3, 0xe9, 0x40, 0x3b, 0x53, 0x92, 0xb4, 0xac, 0xdf, 0x42, 0xfc, 0x04, 0x5e, 0xfd, 0x06, 0x7e,
|
||||
0x84, 0xbd, 0xb5, 0x47, 0x4f, 0x03, 0xbb, 0xbd, 0x48, 0x8e, 0x39, 0x7a, 0x92, 0xf9, 0xd7, 0x4d,
|
||||
0x24, 0x7a, 0x6a, 0xde, 0xf7, 0x79, 0x9e, 0xdf, 0xfb, 0xf2, 0x36, 0xb1, 0x6f, 0x4d, 0xc8, 0xf0,
|
||||
0x68, 0xc4, 0xe8, 0x29, 0x09,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 0x66, 0xc3, 0x55, 0x35, 0x44, 0x46, 0x70, 0x90, 0x5d, 0x0e, 0xe6, 0xc4, 0xad,
|
||||
0x34, 0x4a, 0xad, 0x9d, 0x63, 0xd7, 0x30, 0x7b, 0x27, 0xfd, 0x3c, 0xf0, 0x81, 0x00, 0x5e, 0x72,
|
||||
0x50, 0xee, 0x9d, 0xf4, 0x13, 0x0e, 0x44, 0x26, 0xe5, 0x60, 0x5b, 0x32, 0x83, 0x39, 0x81, 0x5f,
|
||||
0x57, 0x4d, 0x21, 0x21, 0x21, 0x38, 0x1f, 0xec, 0x8a, 0xf8, 0x47, 0xdd, 0x2d, 0x09, 0xad, 0x1b,
|
||||
0xe8, 0xeb, 0xee, 0x8b, 0xb7, 0x79, 0xea, 0x23, 0x4d, 0xad, 0x08, 0x29, 0xe1, 0x40, 0xc6, 0x52,
|
||||
0x0e, 0x6c, 0xc9, 0x15, 0x85, 0x00, 0x4b, 0x15, 0x49, 0xcd, 0x79, 0x6f, 0xd7, 0xf4, 0x8b, 0xe0,
|
||||
0x56, 0x25, 0xfd, 0xae, 0xa1, 0xbf, 0x51, 0xed, 0xfc, 0x80, 0x86, 0xb9, 0x83, 0x0e, 0xa5, 0x1c,
|
||||
0xec, 0x49, 0xb6, 0xae, 0x21, 0x32, 0x8a, 0xf3, 0xbd, 0x64, 0x1f, 0x90, 0x80, 0xb2, 0x10, 0xfb,
|
||||
0x9f, 0xcc, 0xa5, 0x6b, 0xf2, 0xd2, 0x37, 0x37, 0x23, 0xf4, 0xbb, 0xa5, 0x2e, 0xde, 0x19, 0x6b,
|
||||
0xf8, 0x8d, 0x10, 0x4f, 0x59, 0x8c, 0xfb, 0x2a, 0xdc, 0xdd, 0x5c, 0xbc, 0x2e, 0x27, 0x15, 0x88,
|
||||
0x30, 0x59, 0x36, 0x0f, 0x0b, 0xfa, 0xe9, 0xb2, 0x59, 0xc8, 0x42, 0xfb, 0x24, 0x57, 0x3b, 0xd4,
|
||||
0x3e, 0x98, 0x61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xfb, 0x8c, 0x9e, 0x93, 0x50, 0xff, 0x34, 0xc7, 0x11, 0x4b, 0x98, 0x5b, 0x56, 0xd5, 0xed, 0x7a,
|
||||
0xc6, 0x70, 0xce, 0x86, 0x01, 0x8e, 0x54, 0x31, 0x89, 0xba, 0x09, 0x61, 0x54, 0xb9, 0x73, 0xae,
|
||||
0x00, 0x4f, 0x49, 0x1f, 0x17, 0xb9, 0xee, 0x65, 0x5c, 0xe1, 0x84, 0x14, 0x59, 0x60, 0xc6, 0x32,
|
||||
0x0c, 0xba, 0xe3, 0x22, 0xcf, 0xfd, 0x8c, 0x87, 0x8d, 0x85, 0x10, 0x17, 0xd9, 0xaa, 0x59, 0x5b,
|
||||
0x2f, 0xc6, 0xd1, 0x14, 0x07, 0x5a, 0xda, 0xc1, 0x17, 0x89, 0x7a, 0x84, 0x3f, 0xcb, 0xce, 0xfe,
|
||||
0xcb, 0x6c, 0xda, 0x45, 0x4e, 0x65, 0x8a, 0xa3, 0x98, 0x30, 0xea, 0xd9, 0x35, 0xbb, 0xb1, 0xdd,
|
||||
0x7a, 0xb6, 0xe6, 0xc0, 0xb4, 0x52, 0x0e, 0xdc, 0x8b, 0xd1, 0xf0, 0x39, 0xd4, 0xf5, 0xe3, 0x6e,
|
||||
0x92, 0x44, 0xf0, 0x37, 0x07, 0x25, 0x42, 0x93, 0xf5, 0xbc, 0xbe, 0x97, 0xed, 0x23, 0x93, 0x72,
|
||||
0xdf, 0x3b, 0x15, 0x75, 0xbc, 0xd8, 0xbb, 0x56, 0x2b, 0x35, 0x76, 0x4f, 0xee, 0x34, 0xf5, 0xb5,
|
||||
0x5f, 0xc9, 0x76, 0x6e, 0x83, 0x16, 0x98, 0x71, 0x60, 0x89, 0xa1, 0x3a, 0x93, 0x72, 0xb0, 0x27,
|
||||
0x87, 0xaa, 0x1a, 0x22, 0x23, 0x08, 0xae, 0x3a, 0x77, 0xec, 0x95, 0xf2, 0xdc, 0xb6, 0x6c, 0xff,
|
||||
0x83, 0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0x39, 0x1c, 0x63, 0x1a, 0x10, 0x1a, 0x6e, 0x56, 0xbd, 0xfe, 0xdf, 0x55, 0x9f, 0xe8, 0x55, 0x0f,
|
||||
0x74, 0xec, 0x6a, 0xc9, 0x23, 0xb9, 0x64, 0xae, 0x0d, 0xd1, 0x5f, 0xb6, 0xd6, 0xeb, 0xd9, 0xa5,
|
||||
0x6f, 0x2d, 0x2e, 0x7d, 0x6b, 0xb6, 0xf4, 0xed, 0xc5, 0xd2, 0xb7, 0xbf, 0xae, 0x7c, 0xeb, 0xfb,
|
||||
0xca, 0xb7, 0x17, 0x2b, 0xdf, 0xfa, 0xb5, 0xf2, 0xad, 0x4f, 0x0f, 0x43, 0x92, 0x0c, 0x26, 0xbd,
|
||||
0x66, 0x9f, 0x8d, 0x8e, 0xe3, 0x2f, 0xb4, 0x9f, 0x0c, 0x08, 0x0d, 0x33, 0x4f, 0x57, 0x5f, 0x68,
|
||||
0xaf, 0x2c, 0x3f, 0xc7, 0xa7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xcf, 0x98, 0x86, 0x91,
|
||||
0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Configuration) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *Configuration) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Configuration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.PendingDevices) > 0 {
|
||||
for iNdEx := len(m.PendingDevices) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.PendingDevices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
}
|
||||
if len(m.IgnoredDevices) > 0 {
|
||||
for iNdEx := len(m.IgnoredDevices) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.IgnoredDevices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
}
|
||||
{
|
||||
size, err := m.Options.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
{
|
||||
size, err := m.LDAP.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
{
|
||||
size, err := m.GUI.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
if len(m.Devices) > 0 {
|
||||
for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
}
|
||||
if len(m.Folders) > 0 {
|
||||
for iNdEx := len(m.Folders) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Folders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConfig(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if m.Version != 0 {
|
||||
i = encodeVarintConfig(dAtA, i, uint64(m.Version))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovConfig(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *Configuration) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -149,3 +285,394 @@ func sovConfig(x uint64) (n int) {
|
||||
func sozConfig(x uint64) (n int) {
|
||||
return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *Configuration) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: Configuration: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Configuration: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
||||
}
|
||||
m.Version = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Version |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Folders = append(m.Folders, FolderConfiguration{})
|
||||
if err := m.Folders[len(m.Folders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Devices = append(m.Devices, DeviceConfiguration{})
|
||||
if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field GUI", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.GUI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LDAP", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.LDAP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field IgnoredDevices", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.IgnoredDevices = append(m.IgnoredDevices, ObservedDevice{})
|
||||
if err := m.IgnoredDevices[len(m.IgnoredDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PendingDevices", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PendingDevices = append(m.PendingDevices, ObservedDevice{})
|
||||
if err := m.PendingDevices[len(m.PendingDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipConfig(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthConfig
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipConfig(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowConfig
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthConfig
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupConfig
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthConfig
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
@@ -137,7 +137,7 @@ func TestDeviceConfig(t *testing.T) {
|
||||
DeviceID: device1,
|
||||
Name: "node one",
|
||||
Addresses: []string{"tcp://a"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -146,7 +146,7 @@ func TestDeviceConfig(t *testing.T) {
|
||||
DeviceID: device4,
|
||||
Name: "node two",
|
||||
Addresses: []string{"tcp://b"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -265,7 +265,7 @@ func TestDeviceAddressesDynamic(t *testing.T) {
|
||||
DeviceID: device4,
|
||||
Name: name, // Set when auto created
|
||||
Addresses: []string{"dynamic"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -289,7 +289,7 @@ func TestDeviceCompression(t *testing.T) {
|
||||
device1: {
|
||||
DeviceID: device1,
|
||||
Addresses: []string{"dynamic"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -297,7 +297,7 @@ func TestDeviceCompression(t *testing.T) {
|
||||
device2: {
|
||||
DeviceID: device2,
|
||||
Addresses: []string{"dynamic"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -305,7 +305,7 @@ func TestDeviceCompression(t *testing.T) {
|
||||
device3: {
|
||||
DeviceID: device3,
|
||||
Addresses: []string{"dynamic"},
|
||||
Compression: protocol.CompressNever,
|
||||
Compression: protocol.CompressionNever,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -314,7 +314,7 @@ func TestDeviceCompression(t *testing.T) {
|
||||
DeviceID: device4,
|
||||
Name: name, // Set when auto created
|
||||
Addresses: []string{"dynamic"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
@@ -360,7 +360,7 @@ func TestDeviceAddressesStatic(t *testing.T) {
|
||||
DeviceID: device4,
|
||||
Name: name, // Set when auto created
|
||||
Addresses: []string{"dynamic"},
|
||||
Compression: protocol.CompressMetadata,
|
||||
Compression: protocol.CompressionMetadata,
|
||||
AllowedNetworks: []string{},
|
||||
IgnoredFolders: []ObservedFolder{},
|
||||
PendingFolders: []ObservedFolder{},
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
|
||||
protocol "github.com/syncthing/syncthing/lib/protocol"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
@@ -50,16 +51,25 @@ func (*DeviceConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_744b782bd13071dd, []int{0}
|
||||
}
|
||||
func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeviceConfiguration.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeviceConfiguration.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_DeviceConfiguration.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *DeviceConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeviceConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *DeviceConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_DeviceConfiguration.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *DeviceConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m)
|
||||
@@ -76,66 +86,242 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_744b782bd13071dd = []byte{
|
||||
// 900 bytes of a gzipped FileDescriptorProto
|
||||
// 902 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x31, 0x6f, 0xdb, 0x46,
|
||||
0x18, 0x15, 0xeb, 0xc4, 0xb6, 0xce, 0x96, 0x65, 0xd3, 0x88, 0xc3, 0x18, 0x88, 0x4e, 0x60, 0x35,
|
||||
0x28, 0x68, 0x2a, 0x17, 0x6e, 0x27, 0xa3, 0x1d, 0xca, 0x04, 0x6d, 0x83, 0xa0, 0x49, 0x7b, 0xdd,
|
||||
0x28, 0x68, 0x2a, 0x17, 0x6e, 0x27, 0xa3, 0x1d, 0xca, 0x04, 0x45, 0x03, 0xa3, 0x49, 0x7b, 0xdd,
|
||||
0xbc, 0xb0, 0x24, 0xef, 0xac, 0x1c, 0x2c, 0xf2, 0x58, 0xf2, 0xa4, 0x48, 0x40, 0x87, 0x8e, 0x1d,
|
||||
0x3a, 0x14, 0x59, 0xbb, 0x14, 0x1d, 0x3a, 0xf4, 0x97, 0x04, 0xe8, 0x60, 0x8d, 0x45, 0x87, 0x03,
|
||||
0x62, 0x2f, 0x05, 0x47, 0x8e, 0x99, 0x0a, 0xde, 0x51, 0x14, 0x49, 0x47, 0x45, 0x80, 0x6e, 0x77,
|
||||
0xef, 0xbd, 0x7b, 0xef, 0xf8, 0x74, 0x1f, 0x04, 0x7a, 0x23, 0xea, 0x1e, 0x79, 0x2c, 0x38, 0xa3,
|
||||
0xc3, 0x23, 0x4c, 0x26, 0xd4, 0x23, 0x6a, 0x33, 0x8e, 0x1c, 0x4e, 0x59, 0x30, 0x08, 0x23, 0xc6,
|
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, 0x29, 0x68,
|
||||
0x3a, 0x18, 0x47, 0x24, 0x8e, 0x49, 0x6c, 0xac, 0x75, 0xd7, 0xfa, 0x4d, 0xeb, 0x34, 0x11, 0x70,
|
||||
0x09, 0xa6, 0x02, 0xde, 0x93, 0xde, 0x39, 0x52, 0x72, 0xee, 0x62, 0x72, 0xe6, 0x8c, 0x47, 0xfc,
|
||||
0xc4, 0xc4, 0xb3, 0xc0, 0xf1, 0xa9, 0x97, 0x65, 0xed, 0x5d, 0xd3, 0xbd, 0xbe, 0xe8, 0x6d, 0xe4,
|
||||
0x02, 0xb4, 0xf4, 0xd5, 0x27, 0x60, 0xcb, 0x63, 0x7e, 0x98, 0xed, 0x28, 0x0b, 0x8c, 0x1b, 0x5d,
|
||||
0xad, 0xbf, 0x73, 0x7c, 0x6b, 0x50, 0xd4, 0xf9, 0x60, 0x49, 0x5a, 0x9f, 0x24, 0x02, 0x96, 0xd5,
|
||||
0xa9, 0x80, 0x07, 0xf2, 0x52, 0x25, 0xac, 0xe8, 0x74, 0xb7, 0x0e, 0xa2, 0xf2, 0x51, 0x9d, 0x80,
|
||||
0xa6, 0x47, 0x22, 0x6e, 0xcb, 0x22, 0x6f, 0xca, 0x22, 0xbf, 0xc8, 0x7e, 0xa6, 0x0c, 0x7c, 0xa2,
|
||||
0xca, 0xbc, 0xab, 0xbc, 0x73, 0xe0, 0x0d, 0x85, 0xde, 0x5e, 0xc1, 0xa1, 0xc2, 0x45, 0x3f, 0x05,
|
||||
0x80, 0x06, 0x3c, 0x62, 0x78, 0xec, 0x91, 0xc8, 0x58, 0xef, 0x6a, 0xfd, 0x4d, 0xeb, 0x24, 0x11,
|
||||
0xb0, 0x84, 0xa6, 0x02, 0xde, 0x52, 0x0f, 0xa2, 0x80, 0x8a, 0x8f, 0x68, 0xd7, 0x30, 0x54, 0x3a,
|
||||
0xa7, 0xff, 0xa6, 0x81, 0xc3, 0xf8, 0x9c, 0x86, 0xf6, 0x02, 0xcb, 0x5e, 0xb2, 0x1d, 0x11, 0x9f,
|
||||
0x4d, 0x9c, 0x51, 0x6c, 0x6c, 0xc8, 0x30, 0x9c, 0x08, 0x68, 0x64, 0xaa, 0x47, 0x25, 0x11, 0xca,
|
||||
0x35, 0xa9, 0x80, 0xef, 0xca, 0xe8, 0x55, 0x82, 0xe2, 0x22, 0x77, 0xff, 0x53, 0x81, 0x56, 0x26,
|
||||
0xe8, 0xbf, 0x6b, 0xa0, 0x55, 0xdc, 0x19, 0xdb, 0xee, 0xcc, 0xd8, 0x94, 0xc3, 0xf5, 0xc3, 0xff,
|
||||
0x1a, 0xae, 0x44, 0xc0, 0xed, 0xa5, 0xab, 0x35, 0x4b, 0x05, 0xbc, 0x5d, 0xed, 0x10, 0x5b, 0xb3,
|
||||
0xe2, 0xf2, 0x7b, 0xd7, 0xd0, 0x6c, 0xb8, 0x50, 0xc5, 0x41, 0x3f, 0x06, 0xeb, 0xa1, 0x33, 0x8e,
|
||||
0x09, 0x36, 0x9a, 0xb2, 0xb8, 0xc3, 0x44, 0xc0, 0x1c, 0x49, 0x05, 0xdc, 0x96, 0xee, 0x6a, 0x6b,
|
||||
0xa2, 0x1c, 0xd7, 0xbf, 0x07, 0xbb, 0xce, 0x68, 0xc4, 0x9e, 0x13, 0x6c, 0x07, 0x84, 0x3f, 0x67,
|
||||
0xd1, 0x79, 0x6c, 0x00, 0x39, 0x3d, 0x5f, 0x27, 0x02, 0xb6, 0x73, 0xee, 0x49, 0x4e, 0xa5, 0x02,
|
||||
0x76, 0xd4, 0x0c, 0x55, 0xf0, 0xea, 0x9b, 0x32, 0x56, 0x91, 0xa8, 0x6e, 0xa7, 0x7f, 0x0b, 0xf6,
|
||||
0x9d, 0x31, 0x67, 0xb6, 0xe3, 0x79, 0x24, 0xe4, 0xf6, 0x19, 0x1b, 0x61, 0x12, 0xc5, 0xc6, 0x96,
|
||||
0xbc, 0xfe, 0x07, 0x89, 0x80, 0x7b, 0x19, 0xfd, 0xa9, 0x64, 0x3f, 0x53, 0x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x03, 0x45, 0x48, 0x05, 0x5d, 0x14, 0x99, 0x5c,
|
||||
0xf4, 0x6a, 0xf2, 0x3a, 0xf0, 0x62, 0xde, 0xab, 0x26, 0xa0, 0x0a, 0xef, 0x5a, 0x9f, 0xbf, 0x7c,
|
||||
0xd5, 0x69, 0xcc, 0x5f, 0x75, 0x1a, 0xff, 0x5c, 0x76, 0x1a, 0x3f, 0x5f, 0x75, 0x1a, 0xbf, 0x5e,
|
||||
0x75, 0xb4, 0xf9, 0x55, 0xa7, 0xf1, 0xd7, 0x55, 0xa7, 0x71, 0x7a, 0xef, 0x2d, 0x26, 0x5b, 0x95,
|
||||
0xe6, 0xae, 0xcb, 0x09, 0xff, 0xf0, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x69, 0xcb, 0x9f,
|
||||
0x0b, 0x08, 0x00, 0x00,
|
||||
0x3a, 0x14, 0x59, 0xbb, 0x14, 0x1d, 0x3a, 0xf4, 0x97, 0x18, 0xe8, 0x60, 0x8d, 0x45, 0x87, 0x03,
|
||||
0x62, 0x6f, 0x1c, 0x39, 0x66, 0x2a, 0x78, 0x47, 0x51, 0x24, 0x1d, 0x17, 0x06, 0xba, 0xdd, 0xbd,
|
||||
0xf7, 0xee, 0xbd, 0xe3, 0xd3, 0x7d, 0x10, 0xe8, 0x8d, 0xa8, 0x7b, 0xe0, 0xb1, 0xe0, 0x94, 0x0e,
|
||||
0x0f, 0x30, 0x99, 0x50, 0x8f, 0xa8, 0xcd, 0x38, 0x72, 0x38, 0x65, 0xc1, 0x20, 0x8c, 0x18, 0x67,
|
||||
0xfa, 0xaa, 0x02, 0xf7, 0xf7, 0x32, 0xb5, 0x84, 0x3c, 0x36, 0x3a, 0x70, 0x49, 0xa8, 0xf8, 0xfd,
|
||||
0x07, 0x25, 0x17, 0xe6, 0xc6, 0x24, 0x9a, 0x10, 0x9c, 0x53, 0x4d, 0x32, 0xe5, 0x6a, 0x69, 0xfe,
|
||||
0xb5, 0x05, 0x76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x68, 0xbf, 0x5c, 0x75, 0x1a,
|
||||
0xbf, 0x5d, 0x75, 0xb4, 0xf9, 0x55, 0xa7, 0xf1, 0xf7, 0x55, 0xa7, 0x71, 0xf2, 0xe8, 0x16, 0xd3,
|
||||
0xad, 0x8a, 0x73, 0x57, 0xe5, 0x94, 0x7f, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0x35,
|
||||
0x78, 0xb9, 0x0f, 0x08, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.MaxRequestKiB != 0 {
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRequestKiB))
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0x80
|
||||
}
|
||||
if len(m.PendingFolders) > 0 {
|
||||
for iNdEx := len(m.PendingFolders) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.PendingFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x7a
|
||||
}
|
||||
}
|
||||
if len(m.IgnoredFolders) > 0 {
|
||||
for iNdEx := len(m.IgnoredFolders) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.IgnoredFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x72
|
||||
}
|
||||
}
|
||||
if m.MaxRecvKbps != 0 {
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRecvKbps))
|
||||
i--
|
||||
dAtA[i] = 0x68
|
||||
}
|
||||
if m.MaxSendKbps != 0 {
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxSendKbps))
|
||||
i--
|
||||
dAtA[i] = 0x60
|
||||
}
|
||||
if m.AutoAcceptFolders {
|
||||
i--
|
||||
if m.AutoAcceptFolders {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x58
|
||||
}
|
||||
if len(m.AllowedNetworks) > 0 {
|
||||
for iNdEx := len(m.AllowedNetworks) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.AllowedNetworks[iNdEx])
|
||||
copy(dAtA[i:], m.AllowedNetworks[iNdEx])
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.AllowedNetworks[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
}
|
||||
if m.Paused {
|
||||
i--
|
||||
if m.Paused {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x48
|
||||
}
|
||||
{
|
||||
size := m.IntroducedBy.ProtoSize()
|
||||
i -= size
|
||||
if _, err := m.IntroducedBy.MarshalTo(dAtA[i:]); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
if m.SkipIntroductionRemovals {
|
||||
i--
|
||||
if m.SkipIntroductionRemovals {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x38
|
||||
}
|
||||
if m.Introducer {
|
||||
i--
|
||||
if m.Introducer {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x30
|
||||
}
|
||||
if len(m.CertName) > 0 {
|
||||
i -= len(m.CertName)
|
||||
copy(dAtA[i:], m.CertName)
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.CertName)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if m.Compression != 0 {
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.Compression))
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if len(m.Addresses) > 0 {
|
||||
for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.Addresses[iNdEx])
|
||||
copy(dAtA[i:], m.Addresses[iNdEx])
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Addresses[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
}
|
||||
if len(m.Name) > 0 {
|
||||
i -= len(m.Name)
|
||||
copy(dAtA[i:], m.Name)
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Name)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
{
|
||||
size := m.DeviceID.ProtoSize()
|
||||
i -= size
|
||||
if _, err := m.DeviceID.MarshalTo(dAtA[i:]); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintDeviceconfiguration(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovDeviceconfiguration(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *DeviceConfiguration) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -211,3 +397,558 @@ func sovDeviceconfiguration(x uint64) (n int) {
|
||||
func sozDeviceconfiguration(x uint64) (n int) {
|
||||
return sovDeviceconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.DeviceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Name = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
|
||||
}
|
||||
m.Compression = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Compression |= protocol.Compression(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.CertName = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Introducer = bool(v != 0)
|
||||
case 7:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.SkipIntroductionRemovals = bool(v != 0)
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field IntroducedBy", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.IntroducedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Paused = bool(v != 0)
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AllowedNetworks", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.AllowedNetworks = append(m.AllowedNetworks, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AutoAcceptFolders", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.AutoAcceptFolders = bool(v != 0)
|
||||
case 12:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MaxSendKbps", wireType)
|
||||
}
|
||||
m.MaxSendKbps = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.MaxSendKbps |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 13:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MaxRecvKbps", wireType)
|
||||
}
|
||||
m.MaxRecvKbps = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.MaxRecvKbps |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 14:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field IgnoredFolders", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.IgnoredFolders = append(m.IgnoredFolders, ObservedFolder{})
|
||||
if err := m.IgnoredFolders[len(m.IgnoredFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 15:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PendingFolders", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PendingFolders = append(m.PendingFolders, ObservedFolder{})
|
||||
if err := m.PendingFolders[len(m.PendingFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 16:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestKiB", wireType)
|
||||
}
|
||||
m.MaxRequestKiB = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.MaxRequestKiB |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipDeviceconfiguration(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipDeviceconfiguration(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowDeviceconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupDeviceconfiguration
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthDeviceconfiguration
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthDeviceconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowDeviceconfiguration = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupDeviceconfiguration = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
@@ -235,7 +235,7 @@ func (f *FolderConfiguration) SharedWith(device protocol.DeviceID) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (f *FolderConfiguration) CheckAvailableSpace(req int64) error {
|
||||
func (f *FolderConfiguration) CheckAvailableSpace(req uint64) error {
|
||||
val := f.MinDiskFree.BaseValue()
|
||||
if val <= 0 {
|
||||
return nil
|
||||
@@ -245,11 +245,8 @@ func (f *FolderConfiguration) CheckAvailableSpace(req int64) error {
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
usage.Free -= req
|
||||
if usage.Free > 0 {
|
||||
if err := CheckFreeSpace(f.MinDiskFree, usage); err == nil {
|
||||
return nil
|
||||
}
|
||||
if !checkAvailableSpace(req, f.MinDiskFree, usage) {
|
||||
return fmt.Errorf("insufficient space in %v %v", fs.Type(), fs.URI())
|
||||
}
|
||||
return fmt.Errorf("insufficient space in %v %v", fs.Type(), fs.URI())
|
||||
return nil
|
||||
}
|
||||
|
||||
+1609
-131
File diff suppressed because it is too large
Load Diff
+16
-13
@@ -5,6 +5,7 @@ package config
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
@@ -51,19 +52,21 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/foldertype.proto", fileDescriptor_ea6ddb20c0633575) }
|
||||
|
||||
var fileDescriptor_ea6ddb20c0633575 = []byte{
|
||||
// 220 bytes of a gzipped FileDescriptorProto
|
||||
// 254 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x17, 0x57, 0xe6, 0x25, 0x97,
|
||||
0x64, 0x64, 0xe6, 0xa5, 0x23, 0xb1, 0x10, 0xa1, 0x92, 0xc4, 0x06, 0x0e, 0x0b, 0x63, 0x40, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff, 0x7b, 0x44, 0x34, 0x9f, 0x2a, 0x01, 0x00, 0x00,
|
||||
0x48, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x48, 0x48, 0x29, 0x17, 0xa5, 0x16,
|
||||
0xe4, 0x17, 0xeb, 0x83, 0x05, 0x93, 0x4a, 0xd3, 0xf4, 0xd3, 0xf3, 0xd3, 0xf3, 0xc1, 0x1c, 0x30,
|
||||
0x0b, 0xa2, 0x58, 0x6b, 0x3b, 0x23, 0x17, 0x97, 0x1b, 0xd8, 0x84, 0x90, 0xca, 0x82, 0x54, 0x21,
|
||||
0x73, 0x2e, 0x09, 0x37, 0x7f, 0x1f, 0x17, 0xd7, 0xa0, 0xf8, 0x90, 0xc8, 0x00, 0xd7, 0xf8, 0x60,
|
||||
0x57, 0x3f, 0x97, 0xf8, 0x20, 0x57, 0x67, 0x57, 0xcf, 0x30, 0x57, 0x01, 0x06, 0x29, 0xc9, 0xae,
|
||||
0xb9, 0x0a, 0xa2, 0x08, 0xd5, 0xc1, 0xa9, 0x79, 0x29, 0x41, 0xa9, 0xc9, 0xa9, 0x99, 0x65, 0xa9,
|
||||
0x42, 0x86, 0x5c, 0xa2, 0x18, 0x1a, 0xfd, 0xfd, 0x7c, 0x22, 0x05, 0x18, 0xa5, 0xc4, 0xba, 0xe6,
|
||||
0x2a, 0x08, 0xa1, 0xea, 0xf2, 0xcf, 0xcb, 0xa9, 0x44, 0xb7, 0x0b, 0x6a, 0x0d, 0x44, 0x17, 0x13,
|
||||
0xba, 0x5d, 0x50, 0x7b, 0x40, 0x1a, 0xa5, 0x58, 0x56, 0x2c, 0x91, 0x63, 0x70, 0xf2, 0x3e, 0xf1,
|
||||
0x50, 0x8e, 0xe1, 0xc2, 0x43, 0x39, 0x86, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x9c,
|
||||
0xf0, 0x58, 0x8e, 0x61, 0xc1, 0x63, 0x39, 0xc6, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63,
|
||||
0x88, 0xd2, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0xae, 0xcc,
|
||||
0x4b, 0x2e, 0xc9, 0xc8, 0xcc, 0x4b, 0x47, 0x62, 0x21, 0x02, 0x31, 0x89, 0x0d, 0x1c, 0x1a, 0xc6,
|
||||
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x36, 0x1f, 0xe5, 0x1d, 0x59, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
@@ -45,16 +46,25 @@ func (*GUIConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2a9586d611855d64, []int{0}
|
||||
}
|
||||
func (m *GUIConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GUIConfiguration.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *GUIConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GUIConfiguration.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_GUIConfiguration.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *GUIConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GUIConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *GUIConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_GUIConfiguration.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *GUIConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GUIConfiguration.DiscardUnknown(m)
|
||||
@@ -69,62 +79,203 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/guiconfiguration.proto", fileDescriptor_2a9586d611855d64) }
|
||||
|
||||
var fileDescriptor_2a9586d611855d64 = []byte{
|
||||
// 834 bytes of a gzipped FileDescriptorProto
|
||||
// 837 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcd, 0x6e, 0xdb, 0x46,
|
||||
0x10, 0x16, 0x5b, 0x47, 0xb2, 0xb6, 0xae, 0x60, 0xb0, 0x4d, 0xcb, 0x04, 0x8d, 0x56, 0x51, 0xd8,
|
||||
0xc2, 0x01, 0x02, 0x39, 0x71, 0x5a, 0x24, 0xf0, 0xa1, 0x80, 0x1c, 0x20, 0x3f, 0xb0, 0x0b, 0x04,
|
||||
0x74, 0x7d, 0xc9, 0x85, 0x58, 0x91, 0x6b, 0x69, 0x21, 0xfe, 0x95, 0xbb, 0x84, 0xa4, 0x43, 0xfb,
|
||||
0x0c, 0x85, 0x7a, 0x2e, 0xd0, 0x67, 0xe8, 0xa5, 0xaf, 0xd0, 0x9b, 0x74, 0x2a, 0x72, 0x5a, 0x20,
|
||||
0xd2, 0xa5, 0xe0, 0x91, 0xc7, 0x9c, 0x8a, 0x5d, 0xfe, 0x48, 0x94, 0x95, 0x26, 0xb7, 0x9d, 0x6f,
|
||||
0xbe, 0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x19, 0xcb, 0x70, 0x53, 0x82, 0x2e, 0x15, 0x32, 0x28, 0x24, 0xd6, 0x10, 0x8f, 0xb5, 0x6d, 0x39,
|
||||
0x30, 0x21, 0x53, 0xef, 0xbe, 0x7a, 0x79, 0x82, 0xc7, 0x42, 0x03, 0x85, 0xe4, 0x04, 0x8f, 0x53,
|
||||
0x0e, 0xbf, 0xc8, 0x3a, 0x09, 0xc9, 0x10, 0x8f, 0xab, 0x7d, 0xec, 0xae, 0x83, 0x93, 0x99, 0x91,
|
||||
0x67, 0x30, 0xf3, 0x78, 0xf5, 0x77, 0x05, 0xdc, 0x24, 0x3e, 0xc5, 0x76, 0x1c, 0x61, 0x0b, 0x39,
|
||||
0x1e, 0xf1, 0x2d, 0x64, 0xdb, 0xe2, 0x8e, 0x9a, 0xb2, 0x39, 0x2b, 0xe1, 0xf0, 0xb3, 0x82, 0xd0,
|
||||
0x15, 0xfe, 0xae, 0x74, 0xa7, 0x1c, 0xde, 0x93, 0xc2, 0x1b, 0x7c, 0xd5, 0x2a, 0xee, 0xfc, 0x27,
|
||||
0xc3, 0xdc, 0x94, 0x5c, 0x3d, 0x01, 0x37, 0xd8, 0x00, 0x7b, 0x58, 0x03, 0xb2, 0xf5, 0xef, 0x12,
|
||||
0x0e, 0x33, 0x20, 0xe5, 0xf0, 0x4e, 0x36, 0x53, 0x61, 0xad, 0x9c, 0x6e, 0xfe, 0x10, 0x37, 0xdb,
|
||||
0xc8, 0xdf, 0x66, 0x16, 0xa2, 0x9e, 0x83, 0xa6, 0x83, 0x7b, 0x71, 0xbf, 0x4f, 0xfc, 0xbe, 0xf6,
|
||||
0x89, 0xec, 0xea, 0x49, 0xc2, 0xe1, 0x12, 0x2c, 0xb7, 0xb9, 0x44, 0xca, 0xcf, 0xd5, 0xaa, 0x42,
|
||||
0xe6, 0x32, 0x48, 0xfd, 0x5b, 0x01, 0x5a, 0x39, 0x39, 0x3a, 0x24, 0xa1, 0x35, 0x08, 0x28, 0xb3,
|
||||
0xec, 0x01, 0xb6, 0x87, 0xda, 0x8e, 0x94, 0xf9, 0x55, 0xdc, 0x75, 0xc1, 0x39, 0x1b, 0x92, 0xf0,
|
||||
0x45, 0x40, 0x99, 0x24, 0x94, 0x77, 0xbd, 0xd1, 0xbb, 0x76, 0xd7, 0xd7, 0x70, 0xd2, 0xa9, 0xb1,
|
||||
0x59, 0xc4, 0xbc, 0x02, 0x3f, 0x13, 0xb0, 0xfa, 0x97, 0x02, 0xbe, 0x5a, 0x7e, 0x73, 0xd7, 0x0d,
|
||||
0x2e, 0xad, 0x8b, 0x08, 0x79, 0xd8, 0x72, 0x03, 0xe4, 0x88, 0x21, 0x7d, 0x2a, 0xab, 0xff, 0x39,
|
||||
0xe1, 0xf0, 0x56, 0xf9, 0x75, 0x04, 0xed, 0xb9, 0x60, 0x9d, 0x66, 0xa4, 0x94, 0xc3, 0xfb, 0xd5,
|
||||
0x05, 0x58, 0x67, 0x54, 0xbb, 0xb8, 0xf7, 0x3f, 0x78, 0xe6, 0x87, 0xe5, 0x8e, 0x4f, 0xde, 0xbc,
|
||||
0xd3, 0x6b, 0xb3, 0x77, 0x7a, 0xed, 0xcd, 0x5c, 0x57, 0x66, 0x73, 0x5d, 0xf9, 0x6d, 0xa1, 0xd7,
|
||||
0xfe, 0x5c, 0xe8, 0xca, 0x6c, 0xa1, 0xd7, 0xde, 0x2e, 0xf4, 0xda, 0xeb, 0xfb, 0x7d, 0xc2, 0x06,
|
||||
0x71, 0xaf, 0x63, 0x07, 0xde, 0x01, 0x1d, 0xfb, 0x36, 0x1b, 0x10, 0xbf, 0xbf, 0xf2, 0x5a, 0xfe,
|
||||
0xc1, 0x7a, 0x75, 0xf9, 0xbb, 0x7a, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x8c, 0xef,
|
||||
0xc0, 0x01, 0x07, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *GUIConfiguration) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *GUIConfiguration) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *GUIConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.InsecureAllowFrameLoading {
|
||||
i--
|
||||
if m.InsecureAllowFrameLoading {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x68
|
||||
}
|
||||
if m.InsecureSkipHostCheck {
|
||||
i--
|
||||
if m.InsecureSkipHostCheck {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x60
|
||||
}
|
||||
if m.Debugging {
|
||||
i--
|
||||
if m.Debugging {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x58
|
||||
}
|
||||
if len(m.Theme) > 0 {
|
||||
i -= len(m.Theme)
|
||||
copy(dAtA[i:], m.Theme)
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.Theme)))
|
||||
i--
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
if m.InsecureAdminAccess {
|
||||
i--
|
||||
if m.InsecureAdminAccess {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x48
|
||||
}
|
||||
if len(m.APIKey) > 0 {
|
||||
i -= len(m.APIKey)
|
||||
copy(dAtA[i:], m.APIKey)
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.APIKey)))
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
if m.RawUseTLS {
|
||||
i--
|
||||
if m.RawUseTLS {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x38
|
||||
}
|
||||
if m.AuthMode != 0 {
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(m.AuthMode))
|
||||
i--
|
||||
dAtA[i] = 0x30
|
||||
}
|
||||
if len(m.Password) > 0 {
|
||||
i -= len(m.Password)
|
||||
copy(dAtA[i:], m.Password)
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.Password)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.User) > 0 {
|
||||
i -= len(m.User)
|
||||
copy(dAtA[i:], m.User)
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.User)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.RawUnixSocketPermissions) > 0 {
|
||||
i -= len(m.RawUnixSocketPermissions)
|
||||
copy(dAtA[i:], m.RawUnixSocketPermissions)
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.RawUnixSocketPermissions)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.RawAddress) > 0 {
|
||||
i -= len(m.RawAddress)
|
||||
copy(dAtA[i:], m.RawAddress)
|
||||
i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.RawAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Enabled {
|
||||
i--
|
||||
if m.Enabled {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintGuiconfiguration(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovGuiconfiguration(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *GUIConfiguration) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -185,3 +336,471 @@ func sovGuiconfiguration(x uint64) (n int) {
|
||||
func sozGuiconfiguration(x uint64) (n int) {
|
||||
return sovGuiconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *GUIConfiguration) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: GUIConfiguration: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: GUIConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Enabled = bool(v != 0)
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field RawAddress", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.RawAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field RawUnixSocketPermissions", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.RawUnixSocketPermissions = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.User = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Password = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AuthMode", wireType)
|
||||
}
|
||||
m.AuthMode = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.AuthMode |= AuthMode(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 7:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field RawUseTLS", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.RawUseTLS = bool(v != 0)
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field APIKey", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.APIKey = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field InsecureAdminAccess", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.InsecureAdminAccess = bool(v != 0)
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Theme", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Theme = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Debugging", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Debugging = bool(v != 0)
|
||||
case 12:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipHostCheck", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.InsecureSkipHostCheck = bool(v != 0)
|
||||
case 13:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field InsecureAllowFrameLoading", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.InsecureAllowFrameLoading = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGuiconfiguration(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipGuiconfiguration(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGuiconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupGuiconfiguration
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthGuiconfiguration
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthGuiconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowGuiconfiguration = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupGuiconfiguration = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
@@ -38,16 +39,25 @@ func (*LDAPConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9681ad7e41c73956, []int{0}
|
||||
}
|
||||
func (m *LDAPConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LDAPConfiguration.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *LDAPConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LDAPConfiguration.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_LDAPConfiguration.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *LDAPConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LDAPConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *LDAPConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_LDAPConfiguration.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *LDAPConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LDAPConfiguration.DiscardUnknown(m)
|
||||
@@ -64,41 +74,118 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_9681ad7e41c73956 = []byte{
|
||||
// 498 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0xb5, 0x81, 0xba, 0xc4, 0x2a, 0x15, 0x35, 0x50, 0x42, 0x55, 0x79, 0x23, 0xcb, 0x87, 0x20,
|
||||
0xa1, 0x44, 0x2a, 0xb7, 0x72, 0xaa, 0xa9, 0x40, 0x42, 0x08, 0x21, 0x17, 0x7a, 0xe0, 0x12, 0xf9,
|
||||
0x63, 0x9d, 0xac, 0xea, 0xec, 0x5a, 0xbb, 0xeb, 0xaa, 0xe1, 0x57, 0x40, 0x7f, 0x41, 0x6f, 0xfc,
|
||||
0x15, 0x6e, 0xc9, 0x91, 0xd3, 0x4a, 0x4d, 0x2e, 0xc8, 0x47, 0x1f, 0x39, 0xa1, 0xac, 0x9d, 0xc6,
|
||||
0x4e, 0xa3, 0xde, 0x66, 0xde, 0x9b, 0x79, 0xf3, 0x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x6b, 0x73, 0x01, 0x5e, 0x48, 0x0b, 0x37, 0x48, 0xdd,
|
||||
0xc5, 0x93, 0x35, 0xb8, 0xbb, 0x6c, 0x37, 0x7e, 0xa9, 0xfa, 0x53, 0x84, 0x19, 0x0c, 0x52, 0x0a,
|
||||
0x7b, 0xec, 0x0c, 0x25, 0xbd, 0x73, 0x48, 0x51, 0x34, 0x6a, 0x3e, 0x68, 0xa9, 0xed, 0x87, 0x4e,
|
||||
0x9a, 0x09, 0x60, 0x2c, 0xf8, 0x93, 0x33, 0x94, 0x9c, 0x4a, 0x36, 0x17, 0xe0, 0x40, 0x4e, 0xbd,
|
||||
0x4d, 0x55, 0xc6, 0xb7, 0x42, 0x18, 0x79, 0x69, 0xcc, 0x0f, 0xad, 0xc8, 0x8b, 0x19, 0x9c, 0xdb,
|
||||
0xd9, 0xbf, 0xab, 0xe1, 0xdf, 0xd8, 0xde, 0x90, 0x95, 0xee, 0x9a, 0x91, 0xc6, 0x95, 0xaa, 0x6f,
|
||||
0x33, 0xe8, 0xd1, 0x60, 0xd0, 0xf3, 0x3d, 0x06, 0xe7, 0xab, 0xd9, 0x90, 0xab, 0xf9, 0x3e, 0x15,
|
||||
0x60, 0xeb, 0x44, 0x32, 0x8e, 0xc7, 0xa0, 0x5c, 0xd0, 0x16, 0xab, 0xe4, 0xb9, 0x00, 0xfb, 0xd2,
|
||||
0x6d, 0x15, 0xac, 0x7f, 0xd3, 0xee, 0x7a, 0x2a, 0x1f, 0xdb, 0x35, 0xa5, 0xcb, 0x89, 0x5d, 0x9b,
|
||||
0xe4, 0x56, 0x59, 0x6c, 0x10, 0xfd, 0x51, 0xe9, 0x30, 0x42, 0x31, 0x87, 0xb4, 0xa9, 0x49, 0x83,
|
||||
0x1f, 0x96, 0x86, 0xde, 0x49, 0x7c, 0xc5, 0x50, 0x01, 0xae, 0x35, 0xb4, 0x4a, 0xb9, 0x35, 0x1d,
|
||||
0xe7, 0xfd, 0xef, 0x6b, 0x53, 0x99, 0x5c, 0x9b, 0xca, 0xdf, 0xa9, 0xa9, 0xfc, 0x98, 0x99, 0xca,
|
||||
0xd5, 0xcc, 0x54, 0x27, 0x33, 0x53, 0xf9, 0x33, 0x33, 0x95, 0x6f, 0x2f, 0xfb, 0x88, 0x0f, 0x52,
|
||||
0xbf, 0x13, 0x90, 0x61, 0x97, 0x8d, 0x70, 0xc0, 0x07, 0x08, 0xf7, 0x2b, 0xd1, 0xf2, 0xf6, 0x7c,
|
||||
0x4d, 0xde, 0xd8, 0xeb, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xca, 0xa1, 0xc5, 0x0d, 0xbc, 0x03,
|
||||
0x00, 0x00,
|
||||
// 500 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xbf, 0x6f, 0xd3, 0x40,
|
||||
0x14, 0xb6, 0x81, 0xba, 0xc4, 0x2a, 0x15, 0x35, 0x50, 0x4c, 0x55, 0xf9, 0x22, 0xcb, 0x43, 0x90,
|
||||
0x50, 0x22, 0x95, 0xad, 0x4c, 0x35, 0x15, 0x03, 0x20, 0x84, 0x5c, 0xe8, 0xc0, 0x12, 0xf9, 0xc7,
|
||||
0x39, 0x39, 0xd5, 0x39, 0x5b, 0x77, 0xe7, 0xaa, 0xe1, 0xaf, 0x80, 0xfe, 0x05, 0xdd, 0xf8, 0x57,
|
||||
0xba, 0xc5, 0x23, 0xd3, 0x49, 0x4d, 0x36, 0x8f, 0x1e, 0x99, 0x50, 0xce, 0x4e, 0x63, 0xa7, 0x51,
|
||||
0xb7, 0xf7, 0xbe, 0xef, 0xbd, 0xef, 0x7d, 0x77, 0x4f, 0x4f, 0x35, 0x23, 0xe4, 0xf5, 0xfc, 0x18,
|
||||
0x87, 0x68, 0xd0, 0x8b, 0x02, 0x37, 0x29, 0xc3, 0x94, 0xb8, 0x0c, 0xc5, 0xb8, 0x9b, 0x90, 0x98,
|
||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 0xd7, 0x03, 0xc4,
|
||||
0x86, 0xa9, 0xd7, 0xf5, 0xe3, 0x51, 0x8f, 0x8e, 0xb1, 0xcf, 0x86, 0x08, 0x0f, 0x6a, 0xd1, 0xf2,
|
||||
0xfe, 0x3c, 0x45, 0xdc, 0xd9, 0xdb, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x64, 0x4b, 0x05,
|
||||
0xc0, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *LDAPConfiguration) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *LDAPConfiguration) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *LDAPConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.SearchFilter) > 0 {
|
||||
i -= len(m.SearchFilter)
|
||||
copy(dAtA[i:], m.SearchFilter)
|
||||
i = encodeVarintLdapconfiguration(dAtA, i, uint64(len(m.SearchFilter)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if len(m.SearchBaseDN) > 0 {
|
||||
i -= len(m.SearchBaseDN)
|
||||
copy(dAtA[i:], m.SearchBaseDN)
|
||||
i = encodeVarintLdapconfiguration(dAtA, i, uint64(len(m.SearchBaseDN)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if m.InsecureSkipVerify {
|
||||
i--
|
||||
if m.InsecureSkipVerify {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if m.Transport != 0 {
|
||||
i = encodeVarintLdapconfiguration(dAtA, i, uint64(m.Transport))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if len(m.BindDN) > 0 {
|
||||
i -= len(m.BindDN)
|
||||
copy(dAtA[i:], m.BindDN)
|
||||
i = encodeVarintLdapconfiguration(dAtA, i, uint64(len(m.BindDN)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Address) > 0 {
|
||||
i -= len(m.Address)
|
||||
copy(dAtA[i:], m.Address)
|
||||
i = encodeVarintLdapconfiguration(dAtA, i, uint64(len(m.Address)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintLdapconfiguration(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovLdapconfiguration(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *LDAPConfiguration) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -136,3 +223,307 @@ func sovLdapconfiguration(x uint64) (n int) {
|
||||
func sozLdapconfiguration(x uint64) (n int) {
|
||||
return sovLdapconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *LDAPConfiguration) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: LDAPConfiguration: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: LDAPConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Address = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field BindDN", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.BindDN = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType)
|
||||
}
|
||||
m.Transport = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Transport |= LDAPTransport(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipVerify", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.InsecureSkipVerify = bool(v != 0)
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field SearchBaseDN", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.SearchBaseDN = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field SearchFilter", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.SearchFilter = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipLdapconfiguration(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipLdapconfiguration(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowLdapconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupLdapconfiguration
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthLdapconfiguration
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthLdapconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowLdapconfiguration = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupLdapconfiguration = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
@@ -53,7 +53,7 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/ldaptransport.proto", fileDescriptor_79795fc8505b82bf) }
|
||||
|
||||
var fileDescriptor_79795fc8505b82bf = []byte{
|
||||
// 269 bytes of a gzipped FileDescriptorProto
|
||||
// 273 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0xcf, 0x49, 0x49, 0x2c, 0x28, 0x29, 0x4a, 0xcc, 0x2b,
|
||||
0x2e, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xc8, 0x49, 0x29,
|
||||
@@ -66,9 +66,10 @@ var fileDescriptor_79795fc8505b82bf = []byte{
|
||||
0x35, 0x57, 0x41, 0x00, 0x45, 0x7d, 0x88, 0x4f, 0xf0, 0xa5, 0x3e, 0x55, 0x0c, 0x31, 0xa1, 0x00,
|
||||
0x2e, 0x09, 0x34, 0x13, 0x82, 0x43, 0x1c, 0xa1, 0xe6, 0x30, 0x4b, 0x19, 0x75, 0xcd, 0x55, 0x10,
|
||||
0x45, 0xd1, 0x13, 0x5c, 0x92, 0x08, 0x33, 0x0c, 0xbb, 0x84, 0x14, 0xcb, 0x8a, 0x25, 0x72, 0x0c,
|
||||
0x4e, 0xee, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0xf0, 0xe2, 0x91, 0x1c, 0xc3, 0x84,
|
||||
0xc7, 0x72, 0x0c, 0x0b, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43,
|
||||
0x94, 0x66, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x65, 0x5e,
|
||||
0x72, 0x49, 0x46, 0x66, 0x5e, 0x3a, 0x12, 0x0b, 0x11, 0x11, 0x49, 0x6c, 0xe0, 0x30, 0x34, 0x06,
|
||||
0x04, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x64, 0xce, 0xb9, 0x9d, 0x01, 0x00, 0x00,
|
||||
0x4e, 0xde, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85,
|
||||
0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x2c, 0x78, 0x2c, 0xc7, 0x78, 0xe1, 0xb1, 0x1c, 0xc3,
|
||||
0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x9a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9,
|
||||
0xfa, 0xc5, 0x95, 0x79, 0xc9, 0x25, 0x19, 0x99, 0x79, 0xe9, 0x48, 0x2c, 0x44, 0x64, 0x24, 0xb1,
|
||||
0x81, 0xc3, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x56, 0xde, 0x17, 0xa1, 0x01, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
+581
-34
@@ -10,6 +10,7 @@ import (
|
||||
_ "github.com/golang/protobuf/ptypes/timestamp"
|
||||
github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
time "time"
|
||||
@@ -40,16 +41,25 @@ func (*ObservedFolder) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_49f68ff7b178722f, []int{0}
|
||||
}
|
||||
func (m *ObservedFolder) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ObservedFolder.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ObservedFolder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ObservedFolder.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ObservedFolder.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *ObservedFolder) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ObservedFolder.Merge(m, src)
|
||||
}
|
||||
func (m *ObservedFolder) XXX_Size() int {
|
||||
return xxx_messageInfo_ObservedFolder.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *ObservedFolder) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ObservedFolder.DiscardUnknown(m)
|
||||
@@ -71,16 +81,25 @@ func (*ObservedDevice) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_49f68ff7b178722f, []int{1}
|
||||
}
|
||||
func (m *ObservedDevice) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ObservedDevice.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ObservedDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ObservedDevice.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ObservedDevice.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *ObservedDevice) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ObservedDevice.Merge(m, src)
|
||||
}
|
||||
func (m *ObservedDevice) XXX_Size() int {
|
||||
return xxx_messageInfo_ObservedDevice.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *ObservedDevice) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ObservedDevice.DiscardUnknown(m)
|
||||
@@ -96,37 +115,148 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/observed.proto", fileDescriptor_49f68ff7b178722f) }
|
||||
|
||||
var fileDescriptor_49f68ff7b178722f = []byte{
|
||||
// 438 bytes of a gzipped FileDescriptorProto
|
||||
// 440 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0x3f, 0x6f, 0xd4, 0x30,
|
||||
0x00, 0xc5, 0xe3, 0xf4, 0x68, 0x39, 0x53, 0xfe, 0x28, 0xd3, 0x71, 0x43, 0x5c, 0x9d, 0x32, 0x1c,
|
||||
0x02, 0x25, 0xfc, 0x9b, 0x10, 0x42, 0x22, 0x8a, 0x40, 0x27, 0x06, 0xa4, 0x88, 0x89, 0x89, 0x24,
|
||||
0x76, 0x53, 0x4b, 0x49, 0x5c, 0x25, 0x6e, 0x55, 0x36, 0x46, 0xc6, 0x96, 0x4f, 0xc0, 0xc7, 0xe9,
|
||||
0x76, 0x19, 0x11, 0x83, 0x51, 0x9b, 0x05, 0x65, 0x8c, 0xc4, 0x8e, 0x62, 0x27, 0xee, 0x4d, 0x88,
|
||||
0xa9, 0x9b, 0xdf, 0xd3, 0xf3, 0x4f, 0x7e, 0x2f, 0x0a, 0xbc, 0x9f, 0xd1, 0xd8, 0x4b, 0x58, 0xb1,
|
||||
0x4f, 0x53, 0x8f, 0xc5, 0x15, 0x29, 0x8f, 0x09, 0x76, 0x0f, 0x4b, 0xc6, 0x99, 0xb5, 0xad, 0xec,
|
||||
0x39, 0x4a, 0x19, 0x4b, 0x33, 0xe2, 0x49, 0x37, 0x3e, 0xda, 0xf7, 0x38, 0xcd, 0x49, 0xc5, 0xa3,
|
||||
0xfc, 0x50, 0x05, 0xe7, 0x53, 0x72, 0xc2, 0xd5, 0x71, 0xf1, 0x07, 0xc0, 0x3b, 0xef, 0x07, 0xcc,
|
||||
0x1b, 0x96, 0x61, 0x52, 0x5a, 0x9f, 0xe0, 0xa4, 0xbf, 0x30, 0x03, 0x7b, 0x60, 0x79, 0xeb, 0xe9,
|
||||
0xdc, 0x55, 0x34, 0x77, 0xa4, 0xb9, 0x1f, 0x46, 0x9a, 0xff, 0xf8, 0x5c, 0x20, 0xa3, 0x15, 0x48,
|
||||
0xe6, 0x3b, 0x81, 0xee, 0x9e, 0xe4, 0xd9, 0x8b, 0x45, 0x2f, 0x1e, 0x45, 0x9c, 0x97, 0x8b, 0xd3,
|
||||
0x5f, 0x08, 0xb4, 0x6b, 0x67, 0xaa, 0x9d, 0x50, 0x26, 0xad, 0x57, 0xd0, 0xa4, 0x78, 0x66, 0xee,
|
||||
0x81, 0xe5, 0xd4, 0x77, 0x2f, 0x05, 0x32, 0x57, 0x41, 0x2b, 0x90, 0x49, 0x71, 0x27, 0xd0, 0x6d,
|
||||
0xc9, 0xa0, 0x58, 0x11, 0xda, 0xb5, 0xb3, 0x33, 0x9c, 0xbf, 0xd5, 0x8e, 0xb9, 0x0a, 0x42, 0x93,
|
||||
0x62, 0xeb, 0x35, 0xbc, 0x91, 0x45, 0x31, 0xc9, 0x66, 0x5b, 0x12, 0xf1, 0xb0, 0x15, 0x48, 0x19,
|
||||
0x9d, 0x40, 0xf7, 0xe4, 0x7d, 0xa9, 0x34, 0x02, 0x5e, 0xc9, 0x50, 0x05, 0x17, 0x67, 0x5b, 0x57,
|
||||
0xbd, 0x03, 0x72, 0x4c, 0x13, 0x72, 0x0d, 0xbd, 0xcf, 0x80, 0x2e, 0xbe, 0xeb, 0x7f, 0x01, 0x3d,
|
||||
0xe5, 0xa7, 0x40, 0xcf, 0x53, 0xca, 0x0f, 0x8e, 0x62, 0x37, 0x61, 0xb9, 0x57, 0x7d, 0x2e, 0x12,
|
||||
0x7e, 0x40, 0x8b, 0x74, 0xe3, 0xd4, 0x7f, 0x70, 0xf9, 0x88, 0x84, 0x65, 0xae, 0x7a, 0xeb, 0x2a,
|
||||
0xd0, 0xab, 0xdd, 0xc4, 0x83, 0xf3, 0xaf, 0xed, 0xba, 0xb5, 0xa3, 0x73, 0x5f, 0x6b, 0x07, 0x6c,
|
||||
0x6c, 0xf9, 0x12, 0x4e, 0x8a, 0x28, 0x27, 0xc3, 0x94, 0xcb, 0xbe, 0x55, 0xaf, 0x75, 0xab, 0x5e,
|
||||
0x68, 0xde, 0x54, 0xab, 0x50, 0xa6, 0xac, 0x77, 0x70, 0x27, 0xc2, 0xb8, 0x24, 0x55, 0x35, 0x9b,
|
||||
0x48, 0xc0, 0x93, 0x56, 0xa0, 0xd1, 0xea, 0x04, 0xb2, 0x24, 0x63, 0xd0, 0x1a, 0xb3, 0xbb, 0x69,
|
||||
0x84, 0x63, 0xdc, 0x7f, 0x7b, 0x7e, 0x61, 0x1b, 0xf5, 0x85, 0x6d, 0xfc, 0xbe, 0xb4, 0x8d, 0xd3,
|
||||
0xc6, 0x36, 0xbe, 0x37, 0x36, 0xa8, 0x1b, 0xdb, 0xf8, 0xd1, 0xd8, 0xc6, 0xc7, 0x07, 0xff, 0x31,
|
||||
0x93, 0xfa, 0x01, 0xe2, 0x6d, 0x39, 0xd7, 0xb3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xcb,
|
||||
0x46, 0x92, 0x2c, 0x03, 0x00, 0x00,
|
||||
0x00, 0xc5, 0xe3, 0xf4, 0x68, 0x39, 0x53, 0xfe, 0x28, 0xd3, 0x71, 0x83, 0x5d, 0x9d, 0x32, 0x1c,
|
||||
0x02, 0x25, 0xfc, 0x9b, 0x10, 0x42, 0xe2, 0x74, 0x42, 0x3a, 0x75, 0x40, 0x8a, 0x98, 0x98, 0x48,
|
||||
0x62, 0x37, 0xb5, 0x94, 0x9c, 0xab, 0xc4, 0xad, 0xca, 0xc6, 0xc8, 0xd8, 0xf2, 0x09, 0xf8, 0x38,
|
||||
0xb7, 0x5d, 0x46, 0xc4, 0x60, 0xd4, 0xcb, 0x96, 0x31, 0x12, 0x3b, 0x8a, 0x9d, 0xf8, 0x6e, 0x42,
|
||||
0x4c, 0x6c, 0x7e, 0x4f, 0xcf, 0x3f, 0xf9, 0xbd, 0x28, 0xf0, 0x61, 0xca, 0x22, 0x3f, 0xe6, 0xcb,
|
||||
0x13, 0x96, 0xf8, 0x3c, 0x2a, 0x68, 0x7e, 0x41, 0x89, 0x77, 0x96, 0x73, 0xc1, 0x9d, 0x7d, 0x6d,
|
||||
0x8f, 0x71, 0xc2, 0x79, 0x92, 0x52, 0x5f, 0xb9, 0xd1, 0xf9, 0x89, 0x2f, 0x58, 0x46, 0x0b, 0x11,
|
||||
0x66, 0x67, 0x3a, 0x38, 0x1e, 0xd2, 0x4b, 0xa1, 0x8f, 0x93, 0xdf, 0x00, 0xde, 0x7b, 0xdf, 0x61,
|
||||
0xde, 0x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
|
||||
0x62, 0x6e, 0x56, 0xbb, 0x4d, 0x3a, 0xe7, 0x6f, 0xdb, 0x35, 0x6b, 0xd7, 0xe4, 0xbe, 0x96, 0x2e,
|
||||
0xd8, 0xd9, 0xf2, 0x35, 0x1c, 0x2c, 0xc3, 0x8c, 0x76, 0x53, 0x4e, 0xdb, 0x56, 0xad, 0x36, 0xad,
|
||||
0x5a, 0x61, 0x78, 0x43, 0xa3, 0x02, 0x95, 0x72, 0x8e, 0xe1, 0x41, 0x48, 0x48, 0x4e, 0x8b, 0x62,
|
||||
0x34, 0x50, 0x80, 0x67, 0xb5, 0xc4, 0xbd, 0xd5, 0x48, 0xec, 0x28, 0x46, 0xa7, 0x0d, 0xe6, 0x70,
|
||||
0xd7, 0x08, 0xfa, 0xf8, 0xec, 0x78, 0x75, 0x83, 0xac, 0xf2, 0x06, 0x59, 0xab, 0x0d, 0x02, 0xe5,
|
||||
0x06, 0x81, 0xab, 0x0a, 0x59, 0xdf, 0x2b, 0x04, 0xca, 0x0a, 0x59, 0x3f, 0x2a, 0x64, 0x7d, 0x7c,
|
||||
0xf4, 0x0f, 0x53, 0xe9, 0x9f, 0x20, 0xda, 0x57, 0x93, 0xbd, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff,
|
||||
0xd0, 0xf0, 0x82, 0x78, 0x30, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *ObservedFolder) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ObservedFolder) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ObservedFolder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Label) > 0 {
|
||||
i -= len(m.Label)
|
||||
copy(dAtA[i:], m.Label)
|
||||
i = encodeVarintObserved(dAtA, i, uint64(len(m.Label)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.ID) > 0 {
|
||||
i -= len(m.ID)
|
||||
copy(dAtA[i:], m.ID)
|
||||
i = encodeVarintObserved(dAtA, i, uint64(len(m.ID)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
|
||||
if err1 != nil {
|
||||
return 0, err1
|
||||
}
|
||||
i -= n1
|
||||
i = encodeVarintObserved(dAtA, i, uint64(n1))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ObservedDevice) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ObservedDevice) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ObservedDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Address) > 0 {
|
||||
i -= len(m.Address)
|
||||
copy(dAtA[i:], m.Address)
|
||||
i = encodeVarintObserved(dAtA, i, uint64(len(m.Address)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.Name) > 0 {
|
||||
i -= len(m.Name)
|
||||
copy(dAtA[i:], m.Name)
|
||||
i = encodeVarintObserved(dAtA, i, uint64(len(m.Name)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
{
|
||||
size := m.ID.ProtoSize()
|
||||
i -= size
|
||||
if _, err := m.ID.MarshalTo(dAtA[i:]); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i = encodeVarintObserved(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
|
||||
if err2 != nil {
|
||||
return 0, err2
|
||||
}
|
||||
i -= n2
|
||||
i = encodeVarintObserved(dAtA, i, uint64(n2))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintObserved(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovObserved(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *ObservedFolder) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -173,3 +303,420 @@ func sovObserved(x uint64) (n int) {
|
||||
func sozObserved(x uint64) (n int) {
|
||||
return sovObserved(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *ObservedFolder) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ObservedFolder: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ObservedFolder: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ID = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Label = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipObserved(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ObservedDevice) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ObservedDevice: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ObservedDevice: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Name = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Address = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipObserved(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthObserved
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipObserved(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowObserved
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthObserved
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupObserved
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthObserved
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthObserved = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowObserved = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupObserved = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
+2094
-189
File diff suppressed because it is too large
Load Diff
+23
-23
@@ -61,27 +61,27 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/pullorder.proto", fileDescriptor_2fa3f5222a7755bf) }
|
||||
|
||||
var fileDescriptor_2fa3f5222a7755bf = []byte{
|
||||
// 343 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2f, 0x28, 0xcd, 0xc9, 0xc9, 0x2f, 0x4a, 0x49, 0x2d,
|
||||
0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x88, 0x4b, 0x29, 0x17, 0xa5, 0x16, 0xe4,
|
||||
0x17, 0xeb, 0x83, 0x05, 0x93, 0x4a, 0xd3, 0xf4, 0xd3, 0xf3, 0xd3, 0xf3, 0xc1, 0x1c, 0x30, 0x0b,
|
||||
0xa2, 0x58, 0xeb, 0x32, 0x13, 0x17, 0x67, 0x40, 0x69, 0x4e, 0x8e, 0x3f, 0xc8, 0x00, 0x21, 0x2d,
|
||||
0x2e, 0xc1, 0x80, 0x50, 0x1f, 0x9f, 0x78, 0xff, 0x20, 0x17, 0xd7, 0xa0, 0xf8, 0x20, 0x47, 0x3f,
|
||||
0x17, 0x7f, 0x5f, 0x01, 0x06, 0x29, 0xe1, 0xae, 0xb9, 0x0a, 0xfc, 0x70, 0x55, 0x41, 0x89, 0x79,
|
||||
0x29, 0xf9, 0xb9, 0x42, 0x46, 0x5c, 0xa2, 0x48, 0x6a, 0x1d, 0x7d, 0x02, 0x3c, 0x1c, 0x9d, 0x5c,
|
||||
0x43, 0x3c, 0x9d, 0x05, 0x18, 0xa5, 0xc4, 0xbb, 0xe6, 0x2a, 0x08, 0xc3, 0xd5, 0x3b, 0xe6, 0x14,
|
||||
0x64, 0x24, 0x26, 0xa5, 0x96, 0x64, 0x26, 0x0b, 0x59, 0x72, 0x49, 0x22, 0xe9, 0x09, 0xf6, 0x75,
|
||||
0xf4, 0xf1, 0x71, 0x0d, 0x0e, 0x89, 0x77, 0xf3, 0x0c, 0x0a, 0x0e, 0x11, 0x60, 0x92, 0x92, 0xea,
|
||||
0x9a, 0xab, 0x20, 0x06, 0xd7, 0x17, 0x9c, 0x9b, 0x98, 0x93, 0x93, 0x5a, 0x5c, 0xe2, 0x96, 0x59,
|
||||
0x54, 0x5c, 0x22, 0x64, 0xce, 0x25, 0x81, 0xa4, 0xd5, 0xc7, 0x31, 0xc8, 0x1d, 0xa1, 0x93, 0x59,
|
||||
0x4a, 0xb2, 0x6b, 0xae, 0x82, 0x28, 0x5c, 0xa7, 0x4f, 0x62, 0x51, 0x3a, 0x5c, 0xa3, 0x29, 0x97,
|
||||
0x38, 0x92, 0x46, 0x7f, 0x1f, 0x17, 0x84, 0x3e, 0x16, 0x29, 0x89, 0xae, 0xb9, 0x0a, 0x22, 0x70,
|
||||
0x7d, 0xfe, 0x39, 0x29, 0x38, 0xb4, 0xf9, 0xb9, 0x86, 0x23, 0xb4, 0xb1, 0xa2, 0x69, 0xf3, 0x4b,
|
||||
0x2d, 0x87, 0x69, 0x93, 0x62, 0x59, 0xb1, 0x44, 0x8e, 0xc1, 0xc9, 0xfd, 0xc4, 0x43, 0x39, 0x86,
|
||||
0x0b, 0x0f, 0xe5, 0x18, 0x5e, 0x3c, 0x92, 0x63, 0x98, 0xf0, 0x58, 0x8e, 0x61, 0xc1, 0x63, 0x39,
|
||||
0xc6, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4c, 0xcf, 0x2c, 0xc9, 0x28,
|
||||
0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0xae, 0xcc, 0x4b, 0x2e, 0xc9, 0xc8, 0xcc, 0x4b, 0x47,
|
||||
0x62, 0x21, 0xe2, 0x36, 0x89, 0x0d, 0x1c, 0x4b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x34,
|
||||
0x1f, 0xbc, 0x31, 0xf0, 0x01, 0x00, 0x00,
|
||||
// 347 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd1, 0xbf, 0x4a, 0xc3, 0x40,
|
||||
0x1c, 0xc0, 0xf1, 0xa4, 0xd6, 0x82, 0xb7, 0x58, 0x53, 0x6b, 0xdb, 0x1b, 0x8e, 0x80, 0x93, 0x1d,
|
||||
0x1a, 0x50, 0x44, 0x1c, 0x53, 0x9b, 0x6a, 0xf1, 0xda, 0x94, 0xa4, 0x22, 0xb8, 0x94, 0x24, 0x4d,
|
||||
0xd3, 0xc0, 0x35, 0x17, 0xf2, 0x07, 0xf1, 0x15, 0x32, 0xf9, 0x02, 0x01, 0x07, 0x07, 0x1f, 0xa5,
|
||||
0x63, 0xc1, 0xc5, 0xb5, 0xcd, 0x8b, 0x88, 0x29, 0x26, 0x41, 0x70, 0xfb, 0xdd, 0x8f, 0xef, 0xe7,
|
||||
0x96, 0x1f, 0x80, 0xc4, 0xd6, 0x05, 0x83, 0x3a, 0x73, 0xdb, 0x12, 0xdc, 0x90, 0x10, 0xea, 0xcd,
|
||||
0x4c, 0xaf, 0xe3, 0x7a, 0x34, 0xa0, 0x5c, 0x65, 0xb7, 0x87, 0xa7, 0x9e, 0xe9, 0x52, 0x5f, 0x48,
|
||||
0x97, 0x7a, 0x38, 0x17, 0x2c, 0x6a, 0xd1, 0xf4, 0x91, 0x4e, 0xbb, 0xb8, 0xfd, 0x59, 0x02, 0x07,
|
||||
0xe3, 0x90, 0x10, 0xf9, 0xe7, 0x03, 0xae, 0x0d, 0x8e, 0xc6, 0x0f, 0x18, 0x4f, 0x65, 0xa5, 0x27,
|
||||
0x29, 0x53, 0x45, 0x1c, 0xf5, 0xe4, 0x61, 0x95, 0x81, 0xb5, 0x28, 0xe6, 0x0f, 0xb3, 0x4a, 0xd1,
|
||||
0x9c, 0x19, 0x5d, 0x72, 0xe7, 0xa0, 0x5e, 0x68, 0x45, 0x3c, 0xbe, 0x13, 0xbb, 0xd2, 0x64, 0x70,
|
||||
0x53, 0x65, 0x61, 0x23, 0x8a, 0xf9, 0x5a, 0xd6, 0x8b, 0xc4, 0x5d, 0x68, 0xba, 0x19, 0xd8, 0x06,
|
||||
0x77, 0x0d, 0x5a, 0x05, 0xa3, 0x0e, 0x45, 0x8c, 0x25, 0x75, 0x32, 0xed, 0x0f, 0x14, 0x75, 0x52,
|
||||
0x2d, 0x41, 0x18, 0xc5, 0xfc, 0x49, 0xe6, 0xd4, 0xa5, 0x46, 0x88, 0xe9, 0x07, 0x7d, 0xdb, 0xf3,
|
||||
0x03, 0xee, 0x0a, 0x34, 0x0b, 0x14, 0x8b, 0xca, 0x6d, 0x2e, 0xf7, 0x60, 0x2b, 0x8a, 0xf9, 0x7a,
|
||||
0x26, 0xb1, 0xe6, 0x59, 0x19, 0xbc, 0x04, 0x8d, 0x02, 0x94, 0x71, 0x2f, 0x77, 0x65, 0xd8, 0x8c,
|
||||
0x62, 0xfe, 0x38, 0x73, 0x32, 0x99, 0xfd, 0xc3, 0x46, 0xd2, 0x63, 0xce, 0xf6, 0xff, 0xb0, 0x91,
|
||||
0xf9, 0xfc, 0xcb, 0x60, 0xf9, 0xe3, 0x1d, 0x31, 0xdd, 0xfb, 0xd5, 0x06, 0x31, 0xeb, 0x0d, 0x62,
|
||||
0x56, 0x5b, 0xc4, 0xae, 0xb7, 0x88, 0x7d, 0x4d, 0x10, 0xf3, 0x96, 0x20, 0x76, 0x9d, 0x20, 0xe6,
|
||||
0x2b, 0x41, 0xcc, 0xd3, 0x99, 0x65, 0x07, 0x8b, 0x50, 0xef, 0x18, 0x74, 0x29, 0xf8, 0x2f, 0x8e,
|
||||
0x11, 0x2c, 0x6c, 0xc7, 0x2a, 0x4c, 0xf9, 0x7d, 0xf5, 0x4a, 0x7a, 0xa9, 0x8b, 0xef, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x09, 0x68, 0xa0, 0x7d, 0xf4, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+17
-6
@@ -73,25 +73,36 @@ func (s *Size) ParseDefault(str string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func CheckFreeSpace(req Size, usage fs.Usage) error {
|
||||
val := req.BaseValue()
|
||||
// CheckFreeSpace checks that the free space does not fall below the minimum required free space.
|
||||
func CheckFreeSpace(minFree Size, usage fs.Usage) error {
|
||||
val := minFree.BaseValue()
|
||||
if val <= 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if req.Percentage() {
|
||||
if minFree.Percentage() {
|
||||
freePct := (float64(usage.Free) / float64(usage.Total)) * 100
|
||||
if freePct < val {
|
||||
return fmt.Errorf("%.1f %% < %v", freePct, req)
|
||||
return fmt.Errorf("%.1f %% < %v", freePct, minFree)
|
||||
}
|
||||
} else if float64(usage.Free) < val {
|
||||
return fmt.Errorf("%sB < %v", formatSI(usage.Free), req)
|
||||
return fmt.Errorf("%sB < %v", formatSI(usage.Free), minFree)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func formatSI(b int64) string {
|
||||
// checkAvailableSpace checks that the free space does not fall below the minimum
|
||||
// required free space, considering additional required space for a future operation.
|
||||
func checkAvailableSpace(req uint64, minFree Size, usage fs.Usage) bool {
|
||||
if usage.Free < req {
|
||||
return false
|
||||
}
|
||||
usage.Free -= req
|
||||
return CheckFreeSpace(minFree, usage) == nil
|
||||
}
|
||||
|
||||
func formatSI(b uint64) string {
|
||||
switch {
|
||||
case b < 1000:
|
||||
return fmt.Sprintf("%d ", b)
|
||||
|
||||
+248
-10
@@ -4,10 +4,12 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
encoding_binary "encoding/binary"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
@@ -34,16 +36,25 @@ func (*Size) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4d75cb8f619bd299, []int{0}
|
||||
}
|
||||
func (m *Size) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Size.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Size) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Size.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Size.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *Size) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Size.Merge(m, src)
|
||||
}
|
||||
func (m *Size) XXX_Size() int {
|
||||
return xxx_messageInfo_Size.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *Size) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Size.DiscardUnknown(m)
|
||||
@@ -58,7 +69,7 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/size.proto", fileDescriptor_4d75cb8f619bd299) }
|
||||
|
||||
var fileDescriptor_4d75cb8f619bd299 = []byte{
|
||||
// 246 bytes of a gzipped FileDescriptorProto
|
||||
// 251 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2f, 0xce, 0xac, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0x17, 0x62, 0x83, 0x08, 0x49, 0x29, 0x17, 0xa5, 0x16, 0xe4, 0x17, 0xeb, 0x83, 0x05, 0x93,
|
||||
@@ -69,14 +80,61 @@ var fileDescriptor_4d75cb8f619bd299 = []byte{
|
||||
0x51, 0x4a, 0x62, 0x49, 0xa2, 0xd2, 0xab, 0xf3, 0x2a, 0x9c, 0x70, 0x5e, 0x10, 0x44, 0x99, 0x90,
|
||||
0x0d, 0x17, 0x4b, 0x69, 0x5e, 0x66, 0x89, 0x04, 0x93, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xc6, 0xab,
|
||||
0x7b, 0xf2, 0x60, 0x3e, 0x5c, 0x3b, 0x88, 0xa3, 0x93, 0x58, 0x52, 0x52, 0x04, 0xd6, 0x0e, 0xe7,
|
||||
0x05, 0x81, 0x55, 0x59, 0xb1, 0xcc, 0x58, 0x20, 0xcf, 0xe0, 0xe4, 0x7e, 0xe2, 0xa1, 0x1c, 0xc3,
|
||||
0x85, 0x87, 0x72, 0x0c, 0x2f, 0x1e, 0xc9, 0x31, 0x4c, 0x78, 0x2c, 0xc7, 0xb0, 0xe0, 0xb1, 0x1c,
|
||||
0xe3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94,
|
||||
0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x17, 0x57, 0xe6, 0x25, 0x97, 0x64, 0x64, 0xe6, 0xa5, 0x23,
|
||||
0xb1, 0x10, 0x21, 0x93, 0xc4, 0x06, 0xf6, 0x9d, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x67, 0x60,
|
||||
0xd6, 0x9a, 0x2e, 0x01, 0x00, 0x00,
|
||||
0x05, 0x81, 0x55, 0x59, 0xb1, 0xcc, 0x58, 0x20, 0xcf, 0xe0, 0xe4, 0x7d, 0xe2, 0xa1, 0x1c, 0xc3,
|
||||
0x85, 0x87, 0x72, 0x0c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c,
|
||||
0xc3, 0x82, 0xc7, 0x72, 0x8c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x99,
|
||||
0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x5c, 0x99, 0x97, 0x5c, 0x92,
|
||||
0x91, 0x99, 0x97, 0x8e, 0xc4, 0x42, 0x84, 0x4e, 0x12, 0x1b, 0xd8, 0x87, 0xc6, 0x80, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x65, 0x1e, 0xa3, 0x25, 0x32, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Size) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *Size) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Size) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Unit) > 0 {
|
||||
i -= len(m.Unit)
|
||||
copy(dAtA[i:], m.Unit)
|
||||
i = encodeVarintSize(dAtA, i, uint64(len(m.Unit)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Value != 0 {
|
||||
i -= 8
|
||||
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
||||
i--
|
||||
dAtA[i] = 0x9
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintSize(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovSize(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *Size) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -99,3 +157,183 @@ func sovSize(x uint64) (n int) {
|
||||
func sozSize(x uint64) (n int) {
|
||||
return sovSize(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *Size) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSize
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: Size: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Size: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 1 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
||||
}
|
||||
var v uint64
|
||||
if (iNdEx + 8) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
||||
iNdEx += 8
|
||||
m.Value = float64(math.Float64frombits(v))
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSize
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthSize
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSize
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Unit = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipSize(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthSize
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthSize
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipSize(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowSize
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowSize
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowSize
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthSize
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupSize
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthSize
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthSize = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowSize = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupSize = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
+35
-1
@@ -9,6 +9,7 @@ package config
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/fs"
|
||||
"github.com/syncthing/syncthing/lib/util"
|
||||
)
|
||||
|
||||
@@ -66,6 +67,10 @@ func TestParseSize(t *testing.T) {
|
||||
// The empty string is a valid zero
|
||||
{"", true, 0, false},
|
||||
{" ", true, 0, false},
|
||||
// Just numbers are fine too
|
||||
{"0", true, 0, false},
|
||||
{"3", true, 3, false},
|
||||
{"34.3", true, 34.3, false},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
@@ -94,7 +99,7 @@ func TestParseSize(t *testing.T) {
|
||||
|
||||
func TestFormatSI(t *testing.T) {
|
||||
cases := []struct {
|
||||
bytes int64
|
||||
bytes uint64
|
||||
result string
|
||||
}{
|
||||
{
|
||||
@@ -130,3 +135,32 @@ func TestFormatSI(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCheckAvailableSize(t *testing.T) {
|
||||
cases := []struct {
|
||||
req, free, total uint64
|
||||
minFree string
|
||||
ok bool
|
||||
}{
|
||||
{10, 1e8, 1e9, "1%", true},
|
||||
{1e4, 1e3, 1e9, "1%", false},
|
||||
{1e2, 1e3, 1e9, "1%", false},
|
||||
{1e9, 1 << 62, 1 << 63, "1%", true},
|
||||
{10, 1e8, 1e9, "1M", true},
|
||||
{1e4, 1e3, 1e9, "1M", false},
|
||||
{1e2, 1e3, 1e9, "1M", false},
|
||||
{1e9, 1 << 62, 1 << 63, "1M", true},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
minFree, err := ParseSize(tc.minFree)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to parse %v: %v", tc.minFree, err)
|
||||
continue
|
||||
}
|
||||
usage := fs.Usage{Free: tc.free, Total: tc.total}
|
||||
if ok := checkAvailableSpace(tc.req, minFree, usage); ok != tc.ok {
|
||||
t.Errorf("checkAvailableSpace(%v, %v, %v) == %v, expected %v", tc.req, minFree, usage, ok, tc.ok)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/config/tuning.proto", fileDescriptor_204cfa1615fdfefd) }
|
||||
|
||||
var fileDescriptor_204cfa1615fdfefd = []byte{
|
||||
// 224 bytes of a gzipped FileDescriptorProto
|
||||
// 228 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2f, 0x29, 0xcd, 0xcb, 0xcc, 0x4b, 0xd7, 0x2b, 0x28,
|
||||
0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x08, 0x4a, 0x29, 0x17, 0xa5, 0x16, 0xe4, 0x17, 0xeb, 0x83,
|
||||
@@ -62,9 +62,10 @@ var fileDescriptor_204cfa1615fdfefd = []byte{
|
||||
0xb4, 0x24, 0x5f, 0x48, 0x91, 0x8b, 0x07, 0xaa, 0x20, 0xd8, 0xd7, 0xd1, 0xc7, 0x47, 0x80, 0x51,
|
||||
0x8a, 0xbf, 0x6b, 0xae, 0x02, 0x37, 0x44, 0x45, 0x70, 0x6e, 0x62, 0x4e, 0x0e, 0x92, 0x12, 0x1f,
|
||||
0xc7, 0x20, 0x77, 0x57, 0x01, 0x26, 0x64, 0x25, 0x3e, 0x89, 0x45, 0xe9, 0xa9, 0x52, 0x2c, 0x2b,
|
||||
0x96, 0xc8, 0x31, 0x38, 0xb9, 0x9f, 0x78, 0x28, 0xc7, 0x70, 0xe1, 0xa1, 0x1c, 0xc3, 0x8b, 0x47,
|
||||
0x72, 0x0c, 0x13, 0x1e, 0xcb, 0x31, 0x2c, 0x78, 0x2c, 0xc7, 0x78, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d,
|
||||
0xc7, 0x72, 0x0c, 0x51, 0x9a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa,
|
||||
0xc5, 0x95, 0x79, 0xc9, 0x25, 0x19, 0x99, 0x79, 0xe9, 0x48, 0x2c, 0x84, 0xcf, 0x93, 0xd8, 0xc0,
|
||||
0xde, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xdf, 0xc4, 0xd9, 0x0e, 0x01, 0x00, 0x00,
|
||||
0x96, 0xc8, 0x31, 0x38, 0x79, 0x9f, 0x78, 0x28, 0xc7, 0x70, 0xe1, 0xa1, 0x1c, 0xc3, 0x89, 0x47,
|
||||
0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0xb0, 0xe0, 0xb1, 0x1c, 0xe3, 0x85,
|
||||
0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9,
|
||||
0x25, 0xe7, 0xe7, 0xea, 0x17, 0x57, 0xe6, 0x25, 0x97, 0x64, 0x64, 0xe6, 0xa5, 0x23, 0xb1, 0x10,
|
||||
0xbe, 0x4f, 0x62, 0x03, 0x7b, 0xc5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x69, 0xc8, 0xbc,
|
||||
0x12, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
@@ -36,16 +37,25 @@ func (*VersioningConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_95ba6bdb22ffea81, []int{0}
|
||||
}
|
||||
func (m *VersioningConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VersioningConfiguration.Unmarshal(m, b)
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *VersioningConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VersioningConfiguration.Marshal(b, m, deterministic)
|
||||
if deterministic {
|
||||
return xxx_messageInfo_VersioningConfiguration.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *VersioningConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VersioningConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *VersioningConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_VersioningConfiguration.Size(m)
|
||||
return m.ProtoSize()
|
||||
}
|
||||
func (m *VersioningConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VersioningConfiguration.DiscardUnknown(m)
|
||||
@@ -63,33 +73,99 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_95ba6bdb22ffea81 = []byte{
|
||||
// 383 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcf, 0x8b, 0x9b, 0x40,
|
||||
0x18, 0x1d, 0x63, 0x22, 0x64, 0xd2, 0x5f, 0x78, 0xa9, 0x04, 0xea, 0x48, 0xea, 0xc1, 0x5e, 0x34,
|
||||
0x34, 0xb4, 0x94, 0x1c, 0x2d, 0xa5, 0xf4, 0x56, 0x52, 0x28, 0xb4, 0x97, 0x60, 0xec, 0xc4, 0x0c,
|
||||
0x35, 0xa3, 0xe8, 0x18, 0xea, 0xb1, 0x87, 0x42, 0x8f, 0xed, 0xfe, 0x05, 0xfb, 0xe7, 0xe4, 0x96,
|
||||
0x1c, 0xf7, 0x34, 0x90, 0x78, 0x59, 0x3c, 0xe6, 0x98, 0xd3, 0xe2, 0x28, 0xd9, 0xb0, 0xcb, 0xde,
|
||||
0xde, 0x7b, 0xdf, 0x7b, 0xdf, 0x93, 0xcf, 0x81, 0x56, 0x48, 0x66, 0x8e, 0x1f, 0xd1, 0x39, 0x09,
|
||||
0x9c, 0x15, 0x4e, 0x52, 0x12, 0x51, 0x42, 0x83, 0x5a, 0xc8, 0x12, 0x8f, 0x91, 0x88, 0xda, 0x71,
|
||||
0x12, 0xb1, 0x48, 0x55, 0x6a, 0xb1, 0xdf, 0xc5, 0xbf, 0x58, 0x2d, 0x0d, 0xfe, 0xc8, 0xf0, 0xf9,
|
||||
0xd7, 0x53, 0xe8, 0xfd, 0x79, 0x48, 0x35, 0x60, 0x9b, 0xe5, 0x31, 0xd6, 0x24, 0x43, 0xb2, 0xba,
|
||||
0xee, 0xa3, 0x92, 0x23, 0xc1, 0x0f, 0x1c, 0x81, 0x89, 0x40, 0xea, 0x6f, 0x09, 0xc2, 0xd8, 0x4b,
|
||||
0xbc, 0x25, 0x66, 0x38, 0x49, 0xb5, 0x96, 0x21, 0x5b, 0xbd, 0xd7, 0x8e, 0x5d, 0xd7, 0xd8, 0x0f,
|
||||
0xec, 0xb5, 0x3f, 0x9f, 0x12, 0x1f, 0x28, 0x4b, 0x72, 0x77, 0xb8, 0xe6, 0x08, 0xec, 0x39, 0x52,
|
||||
0xc4, 0x20, 0x2d, 0x39, 0x52, 0xc4, 0xd2, 0xb4, 0x6a, 0x3a, 0x6c, 0xcc, 0x86, 0x5d, 0x6c, 0xcd,
|
||||
0xc6, 0x31, 0x39, 0x2b, 0x55, 0x7d, 0xa8, 0xfa, 0x21, 0xf6, 0x68, 0x16, 0x4f, 0x09, 0x65, 0x38,
|
||||
0x59, 0x79, 0xe1, 0x34, 0xd5, 0x64, 0x43, 0xb2, 0x3a, 0xee, 0x9b, 0x92, 0xa3, 0x67, 0xcd, 0xf4,
|
||||
0x53, 0x33, 0xfc, 0x72, 0xe0, 0xe8, 0xc9, 0x0f, 0x3c, 0xf7, 0xb2, 0x90, 0x8d, 0x07, 0xa3, 0xb7,
|
||||
0xc3, 0xe1, 0xe0, 0xc8, 0x91, 0x4c, 0x28, 0x3b, 0x6e, 0xcc, 0x76, 0xc5, 0x27, 0xf7, 0x22, 0xfd,
|
||||
0x6f, 0xf0, 0xe9, 0x9d, 0xaf, 0x56, 0x5f, 0x40, 0xf9, 0x27, 0xce, 0x9b, 0xe3, 0xf4, 0x4a, 0x8e,
|
||||
0x2a, 0x2a, 0x6e, 0x53, 0x01, 0xf5, 0x25, 0xec, 0xac, 0xbc, 0x30, 0xc3, 0x5a, 0x4b, 0x18, 0x1e,
|
||||
0x97, 0x1c, 0xd5, 0x82, 0xb0, 0xd4, 0x70, 0xdc, 0x7a, 0x27, 0x8d, 0xdb, 0x7f, 0xff, 0x9b, 0xc0,
|
||||
0xfd, 0xb8, 0xde, 0xe9, 0x60, 0xbb, 0xd3, 0xc1, 0xf5, 0x5e, 0x07, 0xff, 0x0a, 0x1d, 0x5c, 0x16,
|
||||
0xba, 0xb4, 0x2d, 0x74, 0x70, 0x55, 0xe8, 0xe0, 0xfb, 0xab, 0x80, 0xb0, 0x45, 0x36, 0xb3, 0xfd,
|
||||
0x68, 0xe9, 0xa4, 0x39, 0xf5, 0xd9, 0x82, 0xd0, 0xe0, 0x0c, 0xdd, 0xbe, 0x80, 0x99, 0x22, 0xfe,
|
||||
0xeb, 0xe8, 0x26, 0x00, 0x00, 0xff, 0xff, 0x08, 0x18, 0x19, 0x5e, 0x16, 0x02, 0x00, 0x00,
|
||||
// 385 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xbf, 0xcb, 0xd3, 0x40,
|
||||
0x18, 0xbe, 0x6b, 0xfa, 0x05, 0xbe, 0xfb, 0xfc, 0x45, 0x16, 0xc3, 0x07, 0xde, 0x85, 0x9a, 0x21,
|
||||
0x2e, 0x49, 0xf1, 0x43, 0x91, 0x8e, 0x11, 0x07, 0x71, 0x91, 0x0a, 0x82, 0x2e, 0x25, 0x8d, 0xd7,
|
||||
0xf4, 0x30, 0xbd, 0x84, 0xe4, 0x52, 0xcc, 0xe8, 0x20, 0x38, 0xaa, 0x7f, 0x81, 0x7f, 0x4e, 0xb7,
|
||||
0x66, 0x74, 0x3a, 0x68, 0xb3, 0x65, 0xec, 0xd8, 0x49, 0x72, 0x09, 0xb5, 0x28, 0x6e, 0xcf, 0xf3,
|
||||
0xbc, 0xcf, 0xf3, 0x3e, 0xe1, 0xcd, 0x21, 0x27, 0x66, 0x73, 0x2f, 0x4c, 0xf8, 0x82, 0x45, 0xde,
|
||||
0x9a, 0x66, 0x39, 0x4b, 0x38, 0xe3, 0x51, 0x27, 0x14, 0x59, 0x20, 0x58, 0xc2, 0xdd, 0x34, 0x4b,
|
||||
0x44, 0x62, 0xe8, 0x9d, 0x78, 0x7d, 0x49, 0x3f, 0x89, 0x4e, 0x1a, 0x7d, 0xd1, 0xd0, 0xfd, 0xb7,
|
||||
0xa7, 0xd0, 0xf3, 0xf3, 0x90, 0x61, 0xa1, 0xa1, 0x28, 0x53, 0x6a, 0x42, 0x0b, 0x3a, 0x97, 0xfe,
|
||||
0xad, 0x46, 0x12, 0xc5, 0x0f, 0x92, 0x80, 0xa9, 0x42, 0xc6, 0x67, 0x88, 0x50, 0x1a, 0x64, 0xc1,
|
||||
0x8a, 0x0a, 0x9a, 0xe5, 0xe6, 0xc0, 0xd2, 0x9c, 0xab, 0xc7, 0x9e, 0xdb, 0xd5, 0xb8, 0xff, 0xd9,
|
||||
0x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 0x73,
|
||||
0x37, 0x4c, 0x56, 0x5e, 0x5e, 0xf2, 0x50, 0x2c, 0x19, 0x8f, 0xce, 0xd0, 0x9f, 0x57, 0x30, 0xd7,
|
||||
0xd5, 0xbf, 0xbd, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x0d, 0x6f, 0xcc, 0x1a, 0x02, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
func (m *VersioningConfiguration) Marshal() (dAtA []byte, err error) {
|
||||
size := m.ProtoSize()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *VersioningConfiguration) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.ProtoSize()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *VersioningConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.CleanupIntervalS != 0 {
|
||||
i = encodeVarintVersioningconfiguration(dAtA, i, uint64(m.CleanupIntervalS))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if len(m.Params) > 0 {
|
||||
for k := range m.Params {
|
||||
v := m.Params[k]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintVersioningconfiguration(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintVersioningconfiguration(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintVersioningconfiguration(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(m.Type) > 0 {
|
||||
i -= len(m.Type)
|
||||
copy(dAtA[i:], m.Type)
|
||||
i = encodeVarintVersioningconfiguration(dAtA, i, uint64(len(m.Type)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintVersioningconfiguration(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovVersioningconfiguration(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *VersioningConfiguration) ProtoSize() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -120,3 +196,318 @@ func sovVersioningconfiguration(x uint64) (n int) {
|
||||
func sozVersioningconfiguration(x uint64) (n int) {
|
||||
return sovVersioningconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *VersioningConfiguration) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: VersioningConfiguration: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: VersioningConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Type = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Params == nil {
|
||||
m.Params = make(map[string]string)
|
||||
}
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipVersioningconfiguration(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.Params[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CleanupIntervalS", wireType)
|
||||
}
|
||||
m.CleanupIntervalS = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.CleanupIntervalS |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipVersioningconfiguration(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipVersioningconfiguration(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowVersioningconfiguration
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupVersioningconfiguration
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthVersioningconfiguration
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthVersioningconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowVersioningconfiguration = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupVersioningconfiguration = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
@@ -202,9 +202,9 @@ type genericListener interface {
|
||||
|
||||
type Model interface {
|
||||
protocol.Model
|
||||
AddConnection(conn Connection, hello protocol.HelloResult)
|
||||
AddConnection(conn Connection, hello protocol.Hello)
|
||||
Connection(remoteID protocol.DeviceID) (Connection, bool)
|
||||
OnHello(protocol.DeviceID, net.Addr, protocol.HelloResult) error
|
||||
OnHello(protocol.DeviceID, net.Addr, protocol.Hello) error
|
||||
GetHello(protocol.DeviceID) protocol.HelloIntf
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ func genBlocks(n int) []protocol.BlockInfo {
|
||||
for j := range h {
|
||||
h[j] = byte(i + j)
|
||||
}
|
||||
b[i].Size = int32(i)
|
||||
b[i].Size = i
|
||||
b[i].Hash = h
|
||||
}
|
||||
return b
|
||||
|
||||
+18
-5
@@ -10,8 +10,10 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/dchest/siphash"
|
||||
@@ -815,13 +817,14 @@ func (db *Lowlevel) getMetaAndCheck(folder string) *metadataTracker {
|
||||
var err error
|
||||
defer func() {
|
||||
if err != nil && !backend.IsClosed(err) {
|
||||
panic(err)
|
||||
warnAndPanic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
var fixed int
|
||||
fixed, err = db.checkLocalNeed([]byte(folder))
|
||||
if err != nil {
|
||||
err = fmt.Errorf("checking local need: %w", err)
|
||||
return nil
|
||||
}
|
||||
if fixed != 0 {
|
||||
@@ -830,11 +833,13 @@ func (db *Lowlevel) getMetaAndCheck(folder string) *metadataTracker {
|
||||
|
||||
meta, err := db.recalcMeta(folder)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("recalculating metadata: %w", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
fixed, err = db.repairSequenceGCLocked(folder, meta)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("repairing sequences: %w", err)
|
||||
return nil
|
||||
}
|
||||
if fixed != 0 {
|
||||
@@ -940,14 +945,14 @@ func (db *Lowlevel) verifyLocalSequence(curSeq int64, folder string) bool {
|
||||
|
||||
t, err := db.newReadOnlyTransaction()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
warnAndPanic(err)
|
||||
}
|
||||
ok := true
|
||||
if err := t.withHaveSequence([]byte(folder), curSeq+1, func(fi protocol.FileIntf) bool {
|
||||
ok = false // we got something, which we should not have
|
||||
return false
|
||||
}); err != nil && !backend.IsClosed(err) {
|
||||
panic(err)
|
||||
warnAndPanic(err)
|
||||
}
|
||||
t.close()
|
||||
|
||||
@@ -1094,7 +1099,7 @@ func (db *Lowlevel) checkLocalNeed(folder []byte) (int, error) {
|
||||
f := fi.(FileInfoTruncated)
|
||||
for !needDone && needName < f.Name {
|
||||
repaired++
|
||||
if err = t.Delete(dbi.Key()); err != nil {
|
||||
if err = t.Delete(dbi.Key()); err != nil && !backend.IsNotFound(err) {
|
||||
return false
|
||||
}
|
||||
l.Debugln("check local need: removing", needName)
|
||||
@@ -1121,7 +1126,7 @@ func (db *Lowlevel) checkLocalNeed(folder []byte) (int, error) {
|
||||
|
||||
for !needDone {
|
||||
repaired++
|
||||
if err := t.Delete(dbi.Key()); err != nil {
|
||||
if err := t.Delete(dbi.Key()); err != nil && !backend.IsNotFound(err) {
|
||||
return 0, err
|
||||
}
|
||||
l.Debugln("check local need: removing", needName)
|
||||
@@ -1157,3 +1162,11 @@ func (db *Lowlevel) needsRepairPath() string {
|
||||
func unchanged(nf, ef protocol.FileIntf) bool {
|
||||
return ef.FileVersion().Equal(nf.FileVersion()) && ef.IsInvalid() == nf.IsInvalid() && ef.FileLocalFlags() == nf.FileLocalFlags()
|
||||
}
|
||||
|
||||
var ldbPathRe = regexp.MustCompile(`(open|write|read) .+[\\/].+[\\/]index[^\\/]+[\\/][^\\/]+: `)
|
||||
|
||||
func warnAndPanic(err error) {
|
||||
l.Warnf("Fatal error: %v", err)
|
||||
msg := ldbPathRe.ReplaceAllString(err.Error(), "$1 x: ")
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ func (db *schemaUpdater) updateSchema0to1(_ int) error {
|
||||
// probably can't happen
|
||||
continue
|
||||
}
|
||||
if f.Type == protocol.FileInfoTypeDeprecatedSymlinkDirectory || f.Type == protocol.FileInfoTypeDeprecatedSymlinkFile {
|
||||
if f.Type == protocol.FileInfoTypeSymlinkDirectory || f.Type == protocol.FileInfoTypeSymlinkFile {
|
||||
f.Type = protocol.FileInfoTypeSymlink
|
||||
bs, err := f.Marshal()
|
||||
if err != nil {
|
||||
|
||||
+1
-2
@@ -531,6 +531,5 @@ func fatalError(err error, opStr string, db *Lowlevel) {
|
||||
}
|
||||
}
|
||||
}
|
||||
l.Warnf("Fatal error: %v: %v", opStr, err)
|
||||
panic(err)
|
||||
warnAndPanic(fmt.Errorf("%v: %w:", opStr, err))
|
||||
}
|
||||
|
||||
+5
-3
@@ -38,7 +38,7 @@ func genBlocks(n int) []protocol.BlockInfo {
|
||||
for j := range h {
|
||||
h[j] = byte(i + j)
|
||||
}
|
||||
b[i].Size = int32(i)
|
||||
b[i].Size = i
|
||||
b[i].Hash = h
|
||||
}
|
||||
return b
|
||||
@@ -227,7 +227,8 @@ func TestGlobalSet(t *testing.T) {
|
||||
t.Errorf("Global incorrect;\n A: %v !=\n E: %v", g, expectedGlobal)
|
||||
}
|
||||
|
||||
globalFiles, globalDirectories, globalDeleted, globalBytes := int32(0), int32(0), int32(0), int64(0)
|
||||
var globalFiles, globalDirectories, globalDeleted int
|
||||
var globalBytes int64
|
||||
for _, f := range g {
|
||||
if f.IsInvalid() {
|
||||
continue
|
||||
@@ -263,7 +264,8 @@ func TestGlobalSet(t *testing.T) {
|
||||
t.Errorf("Have incorrect (local);\n A: %v !=\n E: %v", h, localTot)
|
||||
}
|
||||
|
||||
haveFiles, haveDirectories, haveDeleted, haveBytes := int32(0), int32(0), int32(0), int64(0)
|
||||
var haveFiles, haveDirectories, haveDeleted int
|
||||
var haveBytes int64
|
||||
for _, f := range h {
|
||||
if f.IsInvalid() {
|
||||
continue
|
||||
|
||||
+3
-6
@@ -4,9 +4,6 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//go:generate go run ../../proto/scripts/protofmt.go structs.proto
|
||||
//go:generate protoc -I ../../ -I ../../proto -I . --gogofast_out=Mlib/protocol/bep.proto=github.com/syncthing/syncthing/lib/protocol:. structs.proto
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
@@ -26,7 +23,7 @@ func (f FileInfoTruncated) String() string {
|
||||
case protocol.FileInfoTypeFile:
|
||||
return fmt.Sprintf("File{Name:%q, Sequence:%d, Permissions:0%o, ModTime:%v, Version:%v, Length:%d, Deleted:%v, Invalid:%v, LocalFlags:0x%x, NoPermissions:%v, BlockSize:%d}",
|
||||
f.Name, f.Sequence, f.Permissions, f.ModTime(), f.Version, f.Size, f.Deleted, f.RawInvalid, f.LocalFlags, f.NoPermissions, f.RawBlockSize)
|
||||
case protocol.FileInfoTypeSymlink, protocol.FileInfoTypeDeprecatedSymlinkDirectory, protocol.FileInfoTypeDeprecatedSymlinkFile:
|
||||
case protocol.FileInfoTypeSymlink, protocol.FileInfoTypeSymlinkDirectory, protocol.FileInfoTypeSymlinkFile:
|
||||
return fmt.Sprintf("Symlink{Name:%q, Type:%v, Sequence:%d, Version:%v, Deleted:%v, Invalid:%v, LocalFlags:0x%x, NoPermissions:%v, SymlinkTarget:%q}",
|
||||
f.Name, f.Type, f.Sequence, f.Version, f.Deleted, f.RawInvalid, f.LocalFlags, f.NoPermissions, f.SymlinkTarget)
|
||||
default:
|
||||
@@ -64,7 +61,7 @@ func (f FileInfoTruncated) IsDirectory() bool {
|
||||
|
||||
func (f FileInfoTruncated) IsSymlink() bool {
|
||||
switch f.Type {
|
||||
case protocol.FileInfoTypeSymlink, protocol.FileInfoTypeDeprecatedSymlinkDirectory, protocol.FileInfoTypeDeprecatedSymlinkFile:
|
||||
case protocol.FileInfoTypeSymlink, protocol.FileInfoTypeSymlinkDirectory, protocol.FileInfoTypeSymlinkFile:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
@@ -183,7 +180,7 @@ func (c Counts) Add(other Counts) Counts {
|
||||
}
|
||||
}
|
||||
|
||||
func (c Counts) TotalItems() int32 {
|
||||
func (c Counts) TotalItems() int {
|
||||
return c.Files + c.Directories + c.Symlinks + c.Deleted
|
||||
}
|
||||
|
||||
|
||||
+140
-113
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: structs.proto
|
||||
// source: lib/db/structs.proto
|
||||
|
||||
package db
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
|
||||
protocol "github.com/syncthing/syncthing/lib/protocol"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
@@ -26,17 +27,17 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type FileVersion struct {
|
||||
Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
|
||||
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
Devices [][]byte `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
|
||||
InvalidDevices [][]byte `protobuf:"bytes,4,rep,name=invalid_devices,json=invalidDevices,proto3" json:"invalid_devices,omitempty"`
|
||||
Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version" xml:"version"`
|
||||
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
|
||||
Devices [][]byte `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices" xml:"device"`
|
||||
InvalidDevices [][]byte `protobuf:"bytes,4,rep,name=invalid_devices,json=invalidDevices,proto3" json:"invalidDevices" xml:"invalidDevice"`
|
||||
}
|
||||
|
||||
func (m *FileVersion) Reset() { *m = FileVersion{} }
|
||||
func (m *FileVersion) String() string { return proto.CompactTextString(m) }
|
||||
func (*FileVersion) ProtoMessage() {}
|
||||
func (*FileVersion) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{0}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{0}
|
||||
}
|
||||
func (m *FileVersion) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -66,13 +67,13 @@ func (m *FileVersion) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_FileVersion proto.InternalMessageInfo
|
||||
|
||||
type VersionList struct {
|
||||
RawVersions []FileVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions"`
|
||||
RawVersions []FileVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions" xml:"version"`
|
||||
}
|
||||
|
||||
func (m *VersionList) Reset() { *m = VersionList{} }
|
||||
func (*VersionList) ProtoMessage() {}
|
||||
func (*VersionList) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{1}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{1}
|
||||
}
|
||||
func (m *VersionList) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -103,31 +104,31 @@ var xxx_messageInfo_VersionList proto.InternalMessageInfo
|
||||
|
||||
// Must be the same as FileInfo but without the blocks field
|
||||
type FileInfoTruncated struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
||||
ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
|
||||
ModifiedBy github_com_syncthing_syncthing_lib_protocol.ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.ShortID" json:"modified_by"`
|
||||
Version protocol.Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version"`
|
||||
Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" xml:"name"`
|
||||
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size" xml:"size"`
|
||||
ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modifiedS" xml:"modifiedS"`
|
||||
ModifiedBy github_com_syncthing_syncthing_lib_protocol.ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.ShortID" json:"modifiedBy" xml:"modifiedBy"`
|
||||
Version protocol.Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version" xml:"version"`
|
||||
Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
|
||||
// repeated BlockInfo Blocks = 16
|
||||
SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
|
||||
BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
|
||||
Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
|
||||
Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
||||
ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
|
||||
RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
|
||||
SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlinkTarget" xml:"symlinkTarget"`
|
||||
BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
|
||||
Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type" xml:"type"`
|
||||
Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions" xml:"permissions"`
|
||||
ModifiedNs int `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3,casttype=int" json:"modifiedNs" xml:"modifiedNs"`
|
||||
RawBlockSize int `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
|
||||
// see bep.proto
|
||||
LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
|
||||
VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"`
|
||||
Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
|
||||
NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
|
||||
LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
|
||||
VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
|
||||
Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
|
||||
RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
|
||||
NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"noPermissions" xml:"noPermissions"`
|
||||
}
|
||||
|
||||
func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
|
||||
func (*FileInfoTruncated) ProtoMessage() {}
|
||||
func (*FileInfoTruncated) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{2}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{2}
|
||||
}
|
||||
func (m *FileInfoTruncated) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -158,14 +159,14 @@ var xxx_messageInfo_FileInfoTruncated proto.InternalMessageInfo
|
||||
|
||||
// BlockList is the structure used to store block lists
|
||||
type BlockList struct {
|
||||
Blocks []protocol.BlockInfo `protobuf:"bytes,1,rep,name=Blocks,proto3" json:"Blocks"`
|
||||
Blocks []protocol.BlockInfo `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks" xml:"block"`
|
||||
}
|
||||
|
||||
func (m *BlockList) Reset() { *m = BlockList{} }
|
||||
func (m *BlockList) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockList) ProtoMessage() {}
|
||||
func (*BlockList) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{3}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{3}
|
||||
}
|
||||
func (m *BlockList) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -197,15 +198,15 @@ var xxx_messageInfo_BlockList proto.InternalMessageInfo
|
||||
// IndirectionHashesOnly is used to only unmarshal the indirection hashes
|
||||
// from a FileInfo
|
||||
type IndirectionHashesOnly struct {
|
||||
BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
|
||||
VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"`
|
||||
BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
|
||||
VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
|
||||
}
|
||||
|
||||
func (m *IndirectionHashesOnly) Reset() { *m = IndirectionHashesOnly{} }
|
||||
func (m *IndirectionHashesOnly) String() string { return proto.CompactTextString(m) }
|
||||
func (*IndirectionHashesOnly) ProtoMessage() {}
|
||||
func (*IndirectionHashesOnly) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{4}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{4}
|
||||
}
|
||||
func (m *IndirectionHashesOnly) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -237,20 +238,20 @@ var xxx_messageInfo_IndirectionHashesOnly proto.InternalMessageInfo
|
||||
// For each folder and device we keep one of these to track the current
|
||||
// counts and sequence. We also keep one for the global state of the folder.
|
||||
type Counts struct {
|
||||
Files int32 `protobuf:"varint,1,opt,name=files,proto3" json:"files,omitempty"`
|
||||
Directories int32 `protobuf:"varint,2,opt,name=directories,proto3" json:"directories,omitempty"`
|
||||
Symlinks int32 `protobuf:"varint,3,opt,name=symlinks,proto3" json:"symlinks,omitempty"`
|
||||
Deleted int32 `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
|
||||
Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"`
|
||||
DeviceID []byte `protobuf:"bytes,17,opt,name=deviceID,proto3" json:"deviceID,omitempty"`
|
||||
LocalFlags uint32 `protobuf:"varint,18,opt,name=localFlags,proto3" json:"localFlags,omitempty"`
|
||||
Files int `protobuf:"varint,1,opt,name=files,proto3,casttype=int" json:"files" xml:"files"`
|
||||
Directories int `protobuf:"varint,2,opt,name=directories,proto3,casttype=int" json:"directories" xml:"directories"`
|
||||
Symlinks int `protobuf:"varint,3,opt,name=symlinks,proto3,casttype=int" json:"symlinks" xml:"symlinks"`
|
||||
Deleted int `protobuf:"varint,4,opt,name=deleted,proto3,casttype=int" json:"deleted" xml:"deleted"`
|
||||
Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes" xml:"bytes"`
|
||||
Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
|
||||
DeviceID []byte `protobuf:"bytes,17,opt,name=device_id,json=deviceId,proto3" json:"deviceId" xml:"deviceId"`
|
||||
LocalFlags uint32 `protobuf:"varint,18,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
|
||||
}
|
||||
|
||||
func (m *Counts) Reset() { *m = Counts{} }
|
||||
func (*Counts) ProtoMessage() {}
|
||||
func (*Counts) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{5}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{5}
|
||||
}
|
||||
func (m *Counts) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -280,15 +281,15 @@ func (m *Counts) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Counts proto.InternalMessageInfo
|
||||
|
||||
type CountsSet struct {
|
||||
Counts []Counts `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts"`
|
||||
Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Counts []Counts `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts" xml:"count"`
|
||||
Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created" xml:"created"`
|
||||
}
|
||||
|
||||
func (m *CountsSet) Reset() { *m = CountsSet{} }
|
||||
func (m *CountsSet) String() string { return proto.CompactTextString(m) }
|
||||
func (*CountsSet) ProtoMessage() {}
|
||||
func (*CountsSet) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{6}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{6}
|
||||
}
|
||||
func (m *CountsSet) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -318,17 +319,17 @@ func (m *CountsSet) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_CountsSet proto.InternalMessageInfo
|
||||
|
||||
type FileVersionDeprecated struct {
|
||||
Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
|
||||
Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
|
||||
Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid,omitempty"`
|
||||
Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version" xml:"version"`
|
||||
Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device" xml:"device"`
|
||||
Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
|
||||
Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
|
||||
}
|
||||
|
||||
func (m *FileVersionDeprecated) Reset() { *m = FileVersionDeprecated{} }
|
||||
func (m *FileVersionDeprecated) String() string { return proto.CompactTextString(m) }
|
||||
func (*FileVersionDeprecated) ProtoMessage() {}
|
||||
func (*FileVersionDeprecated) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{7}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{7}
|
||||
}
|
||||
func (m *FileVersionDeprecated) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -358,13 +359,13 @@ func (m *FileVersionDeprecated) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_FileVersionDeprecated proto.InternalMessageInfo
|
||||
|
||||
type VersionListDeprecated struct {
|
||||
Versions []FileVersionDeprecated `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions"`
|
||||
Versions []FileVersionDeprecated `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions" xml:"version"`
|
||||
}
|
||||
|
||||
func (m *VersionListDeprecated) Reset() { *m = VersionListDeprecated{} }
|
||||
func (*VersionListDeprecated) ProtoMessage() {}
|
||||
func (*VersionListDeprecated) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e774e8f5f348d14d, []int{8}
|
||||
return fileDescriptor_5465d80e8cba02e3, []int{8}
|
||||
}
|
||||
func (m *VersionListDeprecated) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -405,64 +406,90 @@ func init() {
|
||||
proto.RegisterType((*VersionListDeprecated)(nil), "db.VersionListDeprecated")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("structs.proto", fileDescriptor_e774e8f5f348d14d) }
|
||||
func init() { proto.RegisterFile("lib/db/structs.proto", fileDescriptor_5465d80e8cba02e3) }
|
||||
|
||||
var fileDescriptor_e774e8f5f348d14d = []byte{
|
||||
// 863 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x8f, 0xdb, 0x54,
|
||||
0x10, 0x8f, 0x9b, 0xff, 0xe3, 0x64, 0xdb, 0xbe, 0x76, 0x57, 0x66, 0x25, 0x1c, 0x2b, 0x08, 0x61,
|
||||
0x71, 0x48, 0x60, 0x7b, 0xa3, 0x12, 0x42, 0x61, 0x55, 0x11, 0x09, 0x51, 0xf4, 0xb6, 0xf4, 0x80,
|
||||
0x2a, 0x45, 0xb6, 0xf3, 0x92, 0x3c, 0xd5, 0xf1, 0x0b, 0x7e, 0xce, 0xae, 0xd2, 0x4f, 0xc1, 0x05,
|
||||
0x89, 0x03, 0x87, 0x5e, 0xf8, 0x2e, 0x7b, 0xec, 0x11, 0x71, 0x88, 0x20, 0x7b, 0x01, 0x3e, 0x05,
|
||||
0x7a, 0xf3, 0x9e, 0x1d, 0x6f, 0x38, 0xd0, 0xde, 0x66, 0x7e, 0x33, 0xcf, 0x33, 0xf3, 0x9b, 0x9f,
|
||||
0x07, 0xba, 0x32, 0x4b, 0xd7, 0x51, 0x26, 0x07, 0xab, 0x54, 0x64, 0x82, 0xdc, 0x99, 0x86, 0xa7,
|
||||
0x1f, 0xa4, 0x6c, 0x25, 0xe4, 0x10, 0x81, 0x70, 0x3d, 0x1b, 0xce, 0xc5, 0x5c, 0xa0, 0x83, 0x96,
|
||||
0x4e, 0x3c, 0x3d, 0x89, 0x79, 0xa8, 0x53, 0x22, 0x11, 0x0f, 0x43, 0xb6, 0xd2, 0x78, 0xff, 0x17,
|
||||
0x0b, 0xec, 0x27, 0x3c, 0x66, 0xcf, 0x59, 0x2a, 0xb9, 0x48, 0xc8, 0x27, 0xd0, 0xbc, 0xd4, 0xa6,
|
||||
0x63, 0x79, 0x96, 0x6f, 0x9f, 0xdd, 0x1b, 0xe4, 0xaf, 0x06, 0xcf, 0x59, 0x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 0x7b, 0x34, 0xe7, 0xd9, 0x62, 0x1d,
|
||||
0x0e, 0x22, 0xb1, 0x1c, 0xca, 0x4d, 0x12, 0x65, 0x0b, 0x9e, 0xcc, 0x4b, 0x56, 0x79, 0x4d, 0x83,
|
||||
0x8b, 0x85, 0x48, 0xb3, 0xf1, 0x39, 0x2d, 0xca, 0x8d, 0x36, 0xe5, 0x05, 0xb5, 0xdf, 0x6e, 0x41,
|
||||
0xa7, 0xd0, 0x92, 0xec, 0x87, 0x35, 0x4b, 0x22, 0xe6, 0x00, 0x36, 0x5b, 0xf8, 0xe4, 0x43, 0x38,
|
||||
0x92, 0x9b, 0x65, 0xcc, 0x93, 0x97, 0x93, 0x2c, 0x48, 0xe7, 0x2c, 0x73, 0xee, 0xe3, 0xf0, 0x5d,
|
||||
0x83, 0x3e, 0x43, 0x90, 0xf4, 0xc0, 0x0e, 0x63, 0x11, 0xbd, 0x94, 0x93, 0x45, 0x20, 0x17, 0x0e,
|
||||
0xf1, 0x2c, 0xbf, 0x43, 0x41, 0x43, 0x5f, 0x05, 0x72, 0x41, 0x3e, 0x86, 0x5a, 0xb6, 0x59, 0x31,
|
||||
0x54, 0xc0, 0xd1, 0xd9, 0xc9, 0xbe, 0xa5, 0x82, 0xe5, 0xcd, 0x8a, 0x51, 0xcc, 0x21, 0x1e, 0xd8,
|
||||
0x2b, 0x96, 0x2e, 0xb9, 0xd4, 0x7b, 0xac, 0x79, 0x96, 0xdf, 0xa5, 0x65, 0x48, 0x95, 0x2b, 0x18,
|
||||
0x4c, 0xa4, 0x63, 0x7b, 0x96, 0x5f, 0xdf, 0x93, 0xf0, 0x8d, 0x24, 0x43, 0xd0, 0xc5, 0x27, 0xb8,
|
||||
0x9b, 0xae, 0x8a, 0x8f, 0xee, 0xed, 0xb6, 0xbd, 0x0e, 0x0d, 0xae, 0x46, 0x2a, 0x70, 0xc1, 0x5f,
|
||||
0x31, 0xda, 0x0e, 0x73, 0x53, 0xd5, 0x8c, 0x45, 0x14, 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, 0xe3, 0x40, 0xe7, 0xa7, 0xd0, 0xd2, 0x87, 0x66,
|
||||
0x7c, 0x8e, 0x0a, 0xef, 0xd0, 0xc2, 0x27, 0x2e, 0x94, 0x74, 0x80, 0x54, 0xdc, 0x52, 0x86, 0x59,
|
||||
0xc5, 0x53, 0x68, 0xeb, 0x59, 0x2f, 0x58, 0x46, 0x7c, 0x68, 0x44, 0xe8, 0x98, 0x55, 0x80, 0xba,
|
||||
0x42, 0x3a, 0x9c, 0x6f, 0x40, 0xc7, 0xd5, 0x10, 0x51, 0xca, 0x82, 0xfc, 0x3a, 0x56, 0x69, 0xee,
|
||||
0xf6, 0x7f, 0xb2, 0xe0, 0xb8, 0x74, 0xb8, 0xce, 0xd9, 0x2a, 0x65, 0xfa, 0x0e, 0xbd, 0xfb, 0x0d,
|
||||
0x3e, 0x81, 0x86, 0x1e, 0x07, 0x8b, 0x74, 0xa8, 0xf1, 0x54, 0xf5, 0x5c, 0x96, 0x55, 0x2d, 0xd8,
|
||||
0x5c, 0x86, 0x07, 0xe4, 0xee, 0xa5, 0xdc, 0xff, 0x1e, 0x8e, 0x4b, 0x27, 0xb7, 0xd4, 0xd6, 0xe3,
|
||||
0xff, 0x1c, 0xdf, 0xf7, 0x0e, 0x8e, 0xef, 0x3e, 0xd9, 0x34, 0x78, 0x70, 0x77, 0x47, 0xde, 0xf5,
|
||||
0x9f, 0x6e, 0xe5, 0x7a, 0xe7, 0x5a, 0x6f, 0x76, 0xae, 0xf5, 0xc7, 0xce, 0xad, 0xfc, 0x78, 0xe3,
|
||||
0x56, 0x5e, 0xdf, 0xb8, 0xd6, 0x9b, 0x1b, 0xb7, 0xf2, 0xdb, 0x8d, 0x5b, 0x09, 0x1b, 0x38, 0xe9,
|
||||
0xa3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x47, 0xe4, 0x5e, 0xea, 0xe8, 0x06, 0x00, 0x00,
|
||||
var fileDescriptor_5465d80e8cba02e3 = []byte{
|
||||
// 1267 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x13, 0xc7,
|
||||
0x17, 0xf7, 0xc6, 0x3f, 0x62, 0x8f, 0x9d, 0x40, 0x96, 0x2f, 0x68, 0xbf, 0xb4, 0xf5, 0xb8, 0x43,
|
||||
0x90, 0xdc, 0x56, 0x72, 0xa4, 0x20, 0x50, 0x85, 0x54, 0x21, 0x96, 0x08, 0x08, 0xa2, 0x50, 0x4d,
|
||||
0x10, 0xad, 0x7a, 0xb1, 0xbc, 0xeb, 0x49, 0xb2, 0x62, 0xb3, 0xeb, 0xee, 0x6c, 0x08, 0xe6, 0xd6,
|
||||
0x4b, 0xa5, 0xde, 0x2a, 0xd4, 0x43, 0x55, 0x55, 0x15, 0xa7, 0xfe, 0x09, 0x55, 0xff, 0x04, 0x8e,
|
||||
0x39, 0x56, 0x3d, 0xac, 0x84, 0x73, 0x69, 0x7d, 0xf4, 0xb1, 0xa7, 0x6a, 0xde, 0xcc, 0xce, 0x8e,
|
||||
0x89, 0xa8, 0x80, 0x72, 0xdb, 0xf7, 0x79, 0x9f, 0xf7, 0xbc, 0xfb, 0xde, 0xe7, 0x3d, 0x3f, 0xf4,
|
||||
0xbf, 0x30, 0xf0, 0xd6, 0x86, 0xde, 0x1a, 0x4f, 0x93, 0x7d, 0x3f, 0xe5, 0xbd, 0x51, 0x12, 0xa7,
|
||||
0xb1, 0xbd, 0x30, 0xf4, 0xce, 0x9e, 0x4b, 0xd8, 0x28, 0xe6, 0x6b, 0x00, 0x78, 0xfb, 0xdb, 0x6b,
|
||||
0x3b, 0xf1, 0x4e, 0x0c, 0x06, 0x3c, 0x49, 0xe2, 0xd9, 0x33, 0x22, 0x1c, 0x1e, 0xfd, 0x38, 0x5c,
|
||||
0xf3, 0xd8, 0x48, 0xe1, 0x0d, 0xf6, 0x28, 0x95, 0x8f, 0xe4, 0xe7, 0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xfb, 0x16, 0xaa, 0x49, 0x35, 0xab, 0xcd, 0x7d, 0xaa, 0x50, 0x30, 0x90, 0x84, 0x84,
|
||||
0xdd, 0xf7, 0xd4, 0x84, 0x2b, 0xea, 0x2c, 0xc3, 0xcd, 0xa2, 0xd3, 0x84, 0x2a, 0x98, 0xfc, 0x62,
|
||||
0xa1, 0xd3, 0x9b, 0xd1, 0x30, 0x48, 0x98, 0x9f, 0xaa, 0x7a, 0x32, 0x7e, 0x37, 0x0a, 0xc7, 0x6f,
|
||||
0x67, 0xd4, 0xde, 0x5a, 0x93, 0xc9, 0x4f, 0x15, 0x54, 0xbb, 0x16, 0xef, 0x47, 0x29, 0xb7, 0x2f,
|
||||
0xa2, 0xea, 0x76, 0x10, 0x32, 0x0e, 0x7f, 0x19, 0x55, 0x17, 0x4f, 0x33, 0x2c, 0x01, 0xfd, 0x91,
|
||||
0x60, 0xe9, 0x19, 0x91, 0x4e, 0xfb, 0x53, 0xd4, 0x94, 0xdf, 0x19, 0x27, 0x01, 0xe3, 0x30, 0xfd,
|
||||
0x55, 0xf7, 0x23, 0xf1, 0x26, 0x06, 0xac, 0xdf, 0xc4, 0xc0, 0x74, 0x22, 0x93, 0x68, 0x5f, 0x45,
|
||||
0x75, 0xb5, 0x9b, 0x38, 0xfc, 0x1f, 0x55, 0xdd, 0xf3, 0xb0, 0x17, 0x15, 0x56, 0xec, 0x45, 0x05,
|
||||
0xe8, 0x2c, 0x9a, 0x62, 0x7f, 0x52, 0x08, 0xb7, 0x02, 0x19, 0xce, 0xfd, 0x9b, 0x70, 0xf3, 0x78,
|
||||
0xad, 0xdf, 0x1e, 0xaa, 0x7a, 0xe3, 0x94, 0xe5, 0x7f, 0x6e, 0x8e, 0xa8, 0x03, 0x00, 0x45, 0xb3,
|
||||
0x85, 0x45, 0xa8, 0x44, 0xe7, 0x36, 0x79, 0xed, 0x35, 0x37, 0xf9, 0x16, 0x6a, 0xc8, 0x5b, 0xa4,
|
||||
0x1f, 0x0c, 0x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
0x6f, 0x97, 0x9e, 0x4d, 0xda, 0xd6, 0xe1, 0xa4, 0x6d, 0x7d, 0x77, 0xd4, 0x2e, 0x3d, 0x3d, 0x6a,
|
||||
0x5b, 0x87, 0x47, 0xed, 0xd2, 0xef, 0x47, 0xed, 0xd2, 0x97, 0xe7, 0x5f, 0xe1, 0xc8, 0x1a, 0x7a,
|
||||
0x5e, 0x0d, 0x3a, 0x74, 0xe1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x5e, 0x6e, 0xcc, 0xc2,
|
||||
0x0c, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *FileVersion) Marshal() (dAtA []byte, err error) {
|
||||
@@ -1754,7 +1781,7 @@ func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ModifiedNs |= int32(b&0x7F) << shift
|
||||
m.ModifiedNs |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -1792,7 +1819,7 @@ func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.RawBlockSize |= int32(b&0x7F) << shift
|
||||
m.RawBlockSize |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -2191,7 +2218,7 @@ func (m *Counts) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Files |= int32(b&0x7F) << shift
|
||||
m.Files |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -2210,7 +2237,7 @@ func (m *Counts) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Directories |= int32(b&0x7F) << shift
|
||||
m.Directories |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -2229,7 +2256,7 @@ func (m *Counts) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Symlinks |= int32(b&0x7F) << shift
|
||||
m.Symlinks |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -2248,7 +2275,7 @@ func (m *Counts) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Deleted |= int32(b&0x7F) << shift
|
||||
m.Deleted |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/util"
|
||||
)
|
||||
|
||||
type EventType int
|
||||
type EventType int64
|
||||
|
||||
const (
|
||||
Starting EventType = 1 << iota
|
||||
@@ -52,6 +52,7 @@ const (
|
||||
FolderWatchStateChanged
|
||||
ListenAddressesChanged
|
||||
LoginAttempt
|
||||
Failure
|
||||
|
||||
AllEvents = (1 << iota) - 1
|
||||
)
|
||||
@@ -121,6 +122,8 @@ func (t EventType) String() string {
|
||||
return "LoginAttempt"
|
||||
case FolderWatchStateChanged:
|
||||
return "FolderWatchStateChanged"
|
||||
case Failure:
|
||||
return "Failure"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
@@ -200,6 +203,8 @@ func UnmarshalEventType(s string) EventType {
|
||||
return LoginAttempt
|
||||
case "FolderWatchStateChanged":
|
||||
return FolderWatchStateChanged
|
||||
case "Failure":
|
||||
return Failure
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
|
||||
+8
-5
@@ -19,8 +19,11 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
ErrInvalidFilename = errors.New("filename is invalid")
|
||||
ErrNotRelative = errors.New("not a relative path")
|
||||
errInvalidFilenameEmpty = errors.New("name is invalid, must not be empty")
|
||||
errInvalidFilenameWindowsSpacePeriod = errors.New("name is invalid, must not end in space or period on Windows")
|
||||
errInvalidFilenameWindowsReservedName = errors.New("name is invalid, contains Windows reserved name (NUL, COM1, etc.)")
|
||||
errInvalidFilenameWindowsReservedChar = errors.New("name is invalid, contains Windows reserved character (?, *, etc.)")
|
||||
errNotRelative = errors.New("not a relative path")
|
||||
)
|
||||
|
||||
func WithJunctionsAsDirs() Option {
|
||||
@@ -95,7 +98,7 @@ func (f *BasicFilesystem) rooted(rel string) (string, error) {
|
||||
func rooted(rel, root string) (string, error) {
|
||||
// The root must not be empty.
|
||||
if root == "" {
|
||||
return "", ErrInvalidFilename
|
||||
return "", errInvalidFilenameEmpty
|
||||
}
|
||||
|
||||
var err error
|
||||
@@ -292,8 +295,8 @@ func (f *BasicFilesystem) Usage(name string) (Usage, error) {
|
||||
return Usage{}, err
|
||||
}
|
||||
return Usage{
|
||||
Free: int64(u.Free),
|
||||
Total: int64(u.Total),
|
||||
Free: u.Free,
|
||||
Total: u.Total,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -4,40 +4,20 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
// +build linux,!ppc,!ppc64,!ppc64le
|
||||
// +build linux
|
||||
|
||||
package fs
|
||||
|
||||
import (
|
||||
"io"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func init() {
|
||||
registerCopyRangeImplementation(CopyRangeMethodIoctl, copyRangeImplementationForBasicFile(copyRangeIoctl))
|
||||
}
|
||||
|
||||
const FICLONE = 0x40049409
|
||||
const FICLONERANGE = 0x4020940d
|
||||
|
||||
/*
|
||||
http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html
|
||||
|
||||
struct file_clone_range {
|
||||
__s64 src_fd;
|
||||
__u64 src_offset;
|
||||
__u64 src_length;
|
||||
__u64 dest_offset;
|
||||
};
|
||||
*/
|
||||
type fileCloneRange struct {
|
||||
srcFd int64
|
||||
srcOffset uint64
|
||||
srcLength uint64
|
||||
dstOffset uint64
|
||||
}
|
||||
|
||||
func copyRangeIoctl(src, dst basicFile, srcOffset, dstOffset, size int64) error {
|
||||
fi, err := src.Stat()
|
||||
if err != nil {
|
||||
@@ -56,38 +36,20 @@ func copyRangeIoctl(src, dst basicFile, srcOffset, dstOffset, size int64) error
|
||||
|
||||
if srcOffset == 0 && dstOffset == 0 && size == 0 {
|
||||
// Optimization for whole file copies.
|
||||
var errNo syscall.Errno
|
||||
_, err := withFileDescriptors(src, dst, func(srcFd, dstFd uintptr) (int, error) {
|
||||
_, _, errNo = syscall.Syscall(syscall.SYS_IOCTL, dstFd, FICLONE, srcFd)
|
||||
return 0, nil
|
||||
return 0, unix.IoctlFileClone(int(dstFd), int(srcFd))
|
||||
})
|
||||
// Failure in withFileDescriptors
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if errNo != 0 {
|
||||
return errNo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var errNo syscall.Errno
|
||||
_, err = withFileDescriptors(src, dst, func(srcFd, dstFd uintptr) (int, error) {
|
||||
params := fileCloneRange{
|
||||
srcFd: int64(srcFd),
|
||||
srcOffset: uint64(srcOffset),
|
||||
srcLength: uint64(size),
|
||||
dstOffset: uint64(dstOffset),
|
||||
}
|
||||
_, _, errNo = syscall.Syscall(syscall.SYS_IOCTL, dstFd, FICLONERANGE, uintptr(unsafe.Pointer(¶ms)))
|
||||
return 0, nil
|
||||
})
|
||||
// Failure in withFileDescriptors
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if errNo != 0 {
|
||||
return errNo
|
||||
}
|
||||
return nil
|
||||
|
||||
_, err = withFileDescriptors(src, dst, func(srcFd, dstFd uintptr) (int, error) {
|
||||
params := unix.FileCloneRange{
|
||||
Src_fd: int64(srcFd),
|
||||
Src_offset: uint64(srcOffset),
|
||||
Src_length: uint64(size),
|
||||
Dest_offset: uint64(dstOffset),
|
||||
}
|
||||
return 0, unix.IoctlFileCloneRange(int(dstFd), ¶ms)
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ package fs
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
@@ -60,28 +61,30 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/fs/copyrangemethod.proto", fileDescriptor_78e1061c3022e87e) }
|
||||
|
||||
var fileDescriptor_78e1061c3022e87e = []byte{
|
||||
// 357 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0x4e, 0xc2, 0x40,
|
||||
0x00, 0xc6, 0x0b, 0xa8, 0x43, 0x17, 0x9b, 0xc6, 0x04, 0x53, 0xc8, 0x59, 0x25, 0x2e, 0x0e, 0x30,
|
||||
0x18, 0x27, 0x5d, 0x8e, 0xf6, 0x0a, 0x0d, 0x47, 0x21, 0x50, 0x83, 0xba, 0x34, 0xfd, 0x07, 0x6d,
|
||||
0x3c, 0xda, 0x86, 0x1e, 0x89, 0xbc, 0x42, 0x27, 0x5f, 0xa0, 0x89, 0x9b, 0xaf, 0xe2, 0xc8, 0xe8,
|
||||
0x8a, 0x5d, 0x7c, 0x0c, 0x43, 0x59, 0x4c, 0x61, 0xbb, 0xfb, 0xbe, 0xfc, 0x7e, 0xf9, 0x92, 0x3b,
|
||||
0xb6, 0x4e, 0x7c, 0xab, 0x35, 0x8d, 0x5b, 0x76, 0x18, 0xad, 0x16, 0x66, 0x30, 0x73, 0xe7, 0x2e,
|
||||
0xf5, 0x42, 0xa7, 0x19, 0x2d, 0x42, 0x1a, 0xf2, 0xe5, 0x69, 0x7c, 0xf3, 0x59, 0x61, 0x4f, 0xa5,
|
||||
0x30, 0x5a, 0x8d, 0xb6, 0x6d, 0x3f, 0x6f, 0xf9, 0x7b, 0x56, 0x90, 0x06, 0xc3, 0x67, 0x63, 0x04,
|
||||
0xb5, 0x0e, 0x32, 0xfa, 0x48, 0xef, 0x0e, 0x64, 0x63, 0xac, 0x43, 0x4d, 0x86, 0x23, 0x99, 0x63,
|
||||
0x84, 0x5a, 0x92, 0x8a, 0xd5, 0x02, 0x34, 0xa6, 0x66, 0xe0, 0x98, 0x0b, 0x87, 0xbf, 0x63, 0xab,
|
||||
0xfb, 0xb0, 0x3a, 0x90, 0x74, 0xcc, 0x95, 0x84, 0xf3, 0x24, 0x15, 0xcf, 0x0a, 0xa4, 0x1a, 0xda,
|
||||
0x94, 0xf0, 0x1d, 0xf6, 0x72, 0x1f, 0xcb, 0x13, 0x45, 0xc5, 0x68, 0x17, 0x73, 0x65, 0x41, 0x4c,
|
||||
0x52, 0xb1, 0x5e, 0x10, 0x6c, 0xaf, 0x8a, 0x4f, 0xdc, 0x3c, 0xe2, 0x1f, 0xd8, 0xda, 0x81, 0xf1,
|
||||
0x48, 0x93, 0x73, 0x11, 0x57, 0x39, 0xbc, 0xde, 0x0d, 0x9c, 0xad, 0x82, 0xc7, 0x6c, 0x63, 0x9f,
|
||||
0x96, 0x1f, 0x87, 0x58, 0x95, 0xa0, 0x8e, 0x0c, 0xf4, 0xa4, 0x23, 0x4d, 0x1f, 0x73, 0x47, 0x42,
|
||||
0x23, 0x49, 0xc5, 0x8b, 0x82, 0x45, 0x5e, 0x46, 0xc4, 0xb7, 0x4d, 0xea, 0xa2, 0x37, 0xea, 0x06,
|
||||
0x34, 0xe6, 0x7b, 0x87, 0x6c, 0x10, 0x63, 0x63, 0xa2, 0xea, 0x5d, 0x43, 0x81, 0x18, 0xb7, 0xa1,
|
||||
0xd4, 0xe3, 0x8e, 0x85, 0xab, 0x24, 0x15, 0x41, 0xc1, 0x06, 0x09, 0x99, 0xf8, 0xd4, 0x53, 0x4c,
|
||||
0x42, 0x2c, 0xd3, 0x7e, 0x6d, 0x4b, 0x5f, 0x1b, 0xc0, 0xac, 0x37, 0x80, 0xf9, 0xfd, 0x01, 0xcc,
|
||||
0x7b, 0x06, 0x98, 0x8f, 0x0c, 0x94, 0xd6, 0x19, 0x60, 0xbe, 0x33, 0xc0, 0xbc, 0x5c, 0xcf, 0x7c,
|
||||
0xea, 0x2d, 0xad, 0xa6, 0x1d, 0xce, 0x5b, 0xf1, 0x2a, 0xb0, 0xa9, 0xe7, 0x07, 0xb3, 0x7f, 0xa7,
|
||||
0xdd, 0x47, 0xb0, 0x4e, 0xf2, 0x97, 0xbf, 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x06, 0xa6, 0xad,
|
||||
0xd0, 0x19, 0x02, 0x00, 0x00,
|
||||
// 391 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbd, 0x8e, 0xd3, 0x40,
|
||||
0x14, 0x85, 0xed, 0xdd, 0x85, 0xc2, 0x0d, 0x96, 0x85, 0xb4, 0x68, 0x76, 0x35, 0x18, 0x22, 0x1a,
|
||||
0x8a, 0x75, 0x81, 0xa8, 0xa0, 0x99, 0xb5, 0xc7, 0x59, 0x6b, 0x27, 0x4e, 0x94, 0x18, 0x05, 0x68,
|
||||
0x2c, 0xff, 0xc5, 0xb6, 0x98, 0x78, 0x2c, 0x7b, 0x22, 0x91, 0x57, 0x70, 0xc5, 0x0b, 0x58, 0xa2,
|
||||
0xa0, 0xa0, 0xe1, 0x3d, 0x52, 0xa6, 0xa4, 0x4d, 0xfc, 0x22, 0x28, 0x93, 0x06, 0x39, 0xe9, 0xee,
|
||||
0x3d, 0x9a, 0xef, 0xd3, 0x91, 0xe6, 0x2a, 0xb7, 0x34, 0x0f, 0x8d, 0x45, 0x6d, 0x44, 0xac, 0x5c,
|
||||
0x57, 0x41, 0x91, 0x26, 0xcb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01, 0x4f, 0xf0, 0x77, 0x9e, 0x14, 0xbc, 0xd6, 0x1e, 0xcf, 0xd9, 0x10, 0x21,
|
||||
0xfe, 0xdc, 0xf1, 0x1e, 0x7c, 0x1b, 0x11, 0x72, 0x8f, 0xcc, 0x47, 0xf5, 0x09, 0x78, 0xdd, 0xb4,
|
||||
0x3a, 0xec, 0xd9, 0x10, 0xa5, 0xf3, 0x9c, 0x67, 0x76, 0x40, 0x69, 0x18, 0x44, 0xdf, 0xc0, 0xd5,
|
||||
0xef, 0x5f, 0x50, 0xba, 0x1f, 0x6e, 0x76, 0x50, 0xda, 0xee, 0xa0, 0xb4, 0xd9, 0x43, 0x79, 0xbb,
|
||||
0x87, 0xf2, 0x8f, 0x0e, 0x4a, 0x3f, 0x3b, 0x28, 0x6f, 0x3b, 0x28, 0xfd, 0xed, 0xa0, 0xf4, 0xf5,
|
||||
0x4d, 0x9a, 0xf3, 0x6c, 0x15, 0xde, 0x45, 0x6c, 0x69, 0xd4, 0xeb, 0x22, 0xe2, 0x59, 0x5e, 0xa4,
|
||||
0xff, 0x4d, 0xc7, 0xbb, 0x09, 0x9f, 0x8a, 0xff, 0x7f, 0xf7, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xb6,
|
||||
0x5d, 0x2e, 0x16, 0x48, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ func (fm FileMode) String() string {
|
||||
|
||||
// Usage represents filesystem space usage
|
||||
type Usage struct {
|
||||
Free int64
|
||||
Total int64
|
||||
Free uint64
|
||||
Total uint64
|
||||
}
|
||||
|
||||
type Matcher interface {
|
||||
@@ -234,7 +234,7 @@ func Canonicalize(file string) (string, error) {
|
||||
// The relative path may pretend to be an absolute path within
|
||||
// the root, but the double path separator on Windows implies
|
||||
// something else and is out of spec.
|
||||
return "", ErrNotRelative
|
||||
return "", errNotRelative
|
||||
}
|
||||
|
||||
// The relative path should be clean from internal dotdots and similar
|
||||
@@ -244,10 +244,10 @@ func Canonicalize(file string) (string, error) {
|
||||
// It is not acceptable to attempt to traverse upwards.
|
||||
switch file {
|
||||
case "..":
|
||||
return "", ErrNotRelative
|
||||
return "", errNotRelative
|
||||
}
|
||||
if strings.HasPrefix(file, ".."+pathSep) {
|
||||
return "", ErrNotRelative
|
||||
return "", errNotRelative
|
||||
}
|
||||
|
||||
if strings.HasPrefix(file, pathSep) {
|
||||
|
||||
+15
-12
@@ -5,6 +5,7 @@ package fs
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
@@ -48,18 +49,20 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/fs/types.proto", fileDescriptor_b556f45c4309ad5d) }
|
||||
|
||||
var fileDescriptor_b556f45c4309ad5d = []byte{
|
||||
// 194 bytes of a gzipped FileDescriptorProto
|
||||
// 228 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0xc9, 0x4c, 0xd2,
|
||||
0x4f, 0x2b, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62,
|
||||
0x4a, 0x2b, 0xd6, 0x2a, 0xe3, 0xe2, 0x73, 0xcb, 0xcc, 0x49, 0x2d, 0xae, 0x2c, 0x2e, 0x49, 0xcd,
|
||||
0x0d, 0xa9, 0x2c, 0x48, 0x15, 0x32, 0xe2, 0x12, 0x75, 0xf3, 0xf4, 0x71, 0x0d, 0x8e, 0x0c, 0x0e,
|
||||
0x71, 0xf5, 0x8d, 0x0f, 0x89, 0x0c, 0x70, 0x8d, 0x77, 0x72, 0x0c, 0xf6, 0x74, 0x16, 0x60, 0x90,
|
||||
0x12, 0xef, 0x9a, 0xab, 0x20, 0x8c, 0xaa, 0xdc, 0x29, 0xb1, 0x38, 0x33, 0x59, 0xc8, 0x80, 0x4b,
|
||||
0x04, 0x5d, 0x8f, 0x9b, 0xa3, 0xb7, 0xab, 0x00, 0xa3, 0x94, 0x58, 0xd7, 0x5c, 0x05, 0x21, 0x54,
|
||||
0x2d, 0x6e, 0x89, 0xd9, 0xa9, 0x4e, 0xce, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0xf0,
|
||||
0xe2, 0x91, 0x1c, 0xc3, 0x84, 0xc7, 0x72, 0x0c, 0x0b, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7,
|
||||
0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x6a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e,
|
||||
0xae, 0x7e, 0x71, 0x65, 0x5e, 0x72, 0x49, 0x46, 0x66, 0x5e, 0x3a, 0x12, 0x0b, 0xe2, 0x99, 0x24,
|
||||
0x36, 0xb0, 0x3f, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0xe8, 0x6b, 0xac, 0xdd, 0x00,
|
||||
0x00, 0x00,
|
||||
0x4a, 0x2b, 0x96, 0x52, 0x2e, 0x4a, 0x2d, 0xc8, 0x2f, 0xd6, 0x07, 0x0b, 0x24, 0x95, 0xa6, 0xe9,
|
||||
0xa7, 0xe7, 0xa7, 0xe7, 0x83, 0x39, 0x60, 0x16, 0x44, 0xa1, 0x56, 0x0d, 0x17, 0x9f, 0x5b, 0x66,
|
||||
0x4e, 0x6a, 0x71, 0x65, 0x71, 0x49, 0x6a, 0x6e, 0x48, 0x65, 0x41, 0xaa, 0x90, 0x11, 0x97, 0xa8,
|
||||
0x9b, 0xa7, 0x8f, 0x6b, 0x70, 0x64, 0x70, 0x88, 0xab, 0x6f, 0x7c, 0x48, 0x64, 0x80, 0x6b, 0xbc,
|
||||
0x93, 0x63, 0xb0, 0xa7, 0xb3, 0x00, 0x83, 0x94, 0x78, 0xd7, 0x5c, 0x05, 0x61, 0x54, 0xe5, 0x4e,
|
||||
0x89, 0xc5, 0x99, 0xc9, 0x42, 0x06, 0x5c, 0x22, 0xe8, 0x7a, 0xdc, 0x1c, 0xbd, 0x5d, 0x05, 0x18,
|
||||
0xa5, 0xc4, 0xba, 0xe6, 0x2a, 0x08, 0xa1, 0x6a, 0x71, 0x4b, 0xcc, 0x4e, 0x95, 0x62, 0x59, 0xb1,
|
||||
0x44, 0x8e, 0xc1, 0xc9, 0xfd, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92,
|
||||
0x63, 0xbc, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x05, 0x8f, 0xe5, 0x18, 0x2f, 0x3c,
|
||||
0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x35, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f,
|
||||
0x39, 0x3f, 0x57, 0xbf, 0xb8, 0x32, 0x2f, 0xb9, 0x24, 0x23, 0x33, 0x2f, 0x1d, 0x89, 0x05, 0xf1,
|
||||
0x7b, 0x12, 0x1b, 0xd8, 0x37, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x30, 0x9a, 0x86,
|
||||
0x0c, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+37
-16
@@ -7,7 +7,6 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -15,8 +14,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var errNoHome = errors.New("no home directory found - set $HOME (or the platform equivalent)")
|
||||
|
||||
func ExpandTilde(path string) (string, error) {
|
||||
if path == "~" {
|
||||
return getHomeDir()
|
||||
@@ -47,28 +44,52 @@ func getHomeDir() (string, error) {
|
||||
return os.UserHomeDir()
|
||||
}
|
||||
|
||||
var windowsDisallowedCharacters = string([]rune{
|
||||
'<', '>', ':', '"', '|', '?', '*',
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31,
|
||||
})
|
||||
var (
|
||||
windowsDisallowedCharacters = string([]rune{
|
||||
'<', '>', ':', '"', '|', '?', '*',
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31,
|
||||
})
|
||||
windowsDisallowedNames = []string{"CON", "PRN", "AUX", "NUL",
|
||||
"COM0", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
|
||||
"LPT0", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9",
|
||||
}
|
||||
)
|
||||
|
||||
func WindowsInvalidFilename(name string) bool {
|
||||
// None of the path components should end in space
|
||||
func WindowsInvalidFilename(name string) error {
|
||||
// None of the path components should end in space or period, or be a
|
||||
// reserved name. COM0 and LPT0 are missing from the Microsoft docs,
|
||||
// but Windows Explorer treats them as invalid too.
|
||||
// (https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file)
|
||||
for _, part := range strings.Split(name, `\`) {
|
||||
if len(part) == 0 {
|
||||
continue
|
||||
}
|
||||
if part[len(part)-1] == ' ' {
|
||||
// Names ending in space are not valid.
|
||||
return true
|
||||
switch part[len(part)-1] {
|
||||
case ' ', '.':
|
||||
// Names ending in space or period are not valid.
|
||||
return errInvalidFilenameWindowsSpacePeriod
|
||||
}
|
||||
upperCased := strings.ToUpper(part)
|
||||
for _, disallowed := range windowsDisallowedNames {
|
||||
if upperCased == disallowed {
|
||||
return errInvalidFilenameWindowsReservedName
|
||||
}
|
||||
if strings.HasPrefix(upperCased, disallowed+".") {
|
||||
// nul.txt.jpg is also disallowed
|
||||
return errInvalidFilenameWindowsReservedName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The path must not contain any disallowed characters
|
||||
return strings.ContainsAny(name, windowsDisallowedCharacters)
|
||||
if strings.ContainsAny(name, windowsDisallowedCharacters) {
|
||||
return errInvalidFilenameWindowsReservedChar
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsParent compares paths purely lexicographically, meaning it returns false
|
||||
|
||||
@@ -44,3 +44,29 @@ func TestCommonPrefix(t *testing.T) {
|
||||
test(`Audrius`, `Audrius`, `Audrius`)
|
||||
test(`.`, `.`, `.`)
|
||||
}
|
||||
|
||||
func TestWindowsInvalidFilename(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
err error
|
||||
}{
|
||||
{`asdf.txt`, nil},
|
||||
{`nul`, errInvalidFilenameWindowsReservedName},
|
||||
{`nul.txt`, errInvalidFilenameWindowsReservedName},
|
||||
{`nul.jpg.txt`, errInvalidFilenameWindowsReservedName},
|
||||
{`some.nul.jpg`, nil},
|
||||
{`foo>bar.txt`, errInvalidFilenameWindowsReservedChar},
|
||||
{`foo \bar.txt`, errInvalidFilenameWindowsSpacePeriod},
|
||||
{`foo.\bar.txt`, errInvalidFilenameWindowsSpacePeriod},
|
||||
{`foo.d\bar.txt`, nil},
|
||||
{`foo.d\bar .txt`, nil},
|
||||
{`foo.d\bar. txt`, nil},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
err := WindowsInvalidFilename(tc.name)
|
||||
if err != tc.err {
|
||||
t.Errorf("For %q, got %v, expected %v", tc.name, err, tc.err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
// FileInfo.Blocks that the remote device already has, and version represents
|
||||
// the version of the file that the remote device is downloading.
|
||||
type deviceFolderFileDownloadState struct {
|
||||
blockIndexes []int32
|
||||
blockIndexes []int
|
||||
version protocol.Vector
|
||||
blockSize int
|
||||
}
|
||||
@@ -30,7 +30,7 @@ type deviceFolderDownloadState struct {
|
||||
|
||||
// Has returns whether a block at that specific index, and that specific version of the file
|
||||
// is currently available on the remote device for pulling from a temporary file.
|
||||
func (p *deviceFolderDownloadState) Has(file string, version protocol.Vector, index int32) bool {
|
||||
func (p *deviceFolderDownloadState) Has(file string, version protocol.Vector, index int) bool {
|
||||
p.mut.RLock()
|
||||
defer p.mut.RUnlock()
|
||||
|
||||
@@ -56,9 +56,9 @@ func (p *deviceFolderDownloadState) Update(updates []protocol.FileDownloadProgre
|
||||
|
||||
for _, update := range updates {
|
||||
local, ok := p.files[update.Name]
|
||||
if update.UpdateType == protocol.UpdateTypeForget && ok && local.version.Equal(update.Version) {
|
||||
if update.UpdateType == protocol.FileDownloadProgressUpdateTypeForget && ok && local.version.Equal(update.Version) {
|
||||
delete(p.files, update.Name)
|
||||
} else if update.UpdateType == protocol.UpdateTypeAppend {
|
||||
} else if update.UpdateType == protocol.FileDownloadProgressUpdateTypeAppend {
|
||||
if !ok {
|
||||
local = deviceFolderFileDownloadState{
|
||||
blockIndexes: update.BlockIndexes,
|
||||
@@ -137,7 +137,7 @@ func (t *deviceDownloadState) Update(folder string, updates []protocol.FileDownl
|
||||
|
||||
// Has returns whether block at that specific index, and that specific version of the file
|
||||
// is currently available on the remote device for pulling from a temporary file.
|
||||
func (t *deviceDownloadState) Has(folder, file string, version protocol.Vector, index int32) bool {
|
||||
func (t *deviceDownloadState) Has(folder, file string, version protocol.Vector, index int) bool {
|
||||
if t == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -17,16 +17,16 @@ func TestDeviceDownloadState(t *testing.T) {
|
||||
v2 := (protocol.Vector{}).Update(1)
|
||||
|
||||
// file 1 version 1 part 1
|
||||
f1v1p1 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeAppend, Name: "f1", Version: v1, BlockIndexes: []int32{0, 1, 2}}
|
||||
f1v1p2 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeAppend, Name: "f1", Version: v1, BlockIndexes: []int32{3, 4, 5}}
|
||||
f1v1del := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeForget, Name: "f1", Version: v1, BlockIndexes: nil}
|
||||
f1v2p1 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeAppend, Name: "f1", Version: v2, BlockIndexes: []int32{10, 11, 12}}
|
||||
f1v2p2 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeAppend, Name: "f1", Version: v2, BlockIndexes: []int32{13, 14, 15}}
|
||||
f1v2del := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeForget, Name: "f1", Version: v2, BlockIndexes: nil}
|
||||
f1v1p1 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeAppend, Name: "f1", Version: v1, BlockIndexes: []int{0, 1, 2}}
|
||||
f1v1p2 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeAppend, Name: "f1", Version: v1, BlockIndexes: []int{3, 4, 5}}
|
||||
f1v1del := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeForget, Name: "f1", Version: v1, BlockIndexes: nil}
|
||||
f1v2p1 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeAppend, Name: "f1", Version: v2, BlockIndexes: []int{10, 11, 12}}
|
||||
f1v2p2 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeAppend, Name: "f1", Version: v2, BlockIndexes: []int{13, 14, 15}}
|
||||
f1v2del := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeForget, Name: "f1", Version: v2, BlockIndexes: nil}
|
||||
|
||||
f2v1p1 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeAppend, Name: "f2", Version: v1, BlockIndexes: []int32{20, 21, 22}}
|
||||
f2v1p2 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeAppend, Name: "f2", Version: v1, BlockIndexes: []int32{23, 24, 25}}
|
||||
f2v1del := protocol.FileDownloadProgressUpdate{UpdateType: protocol.UpdateTypeForget, Name: "f2", Version: v1, BlockIndexes: nil}
|
||||
f2v1p1 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeAppend, Name: "f2", Version: v1, BlockIndexes: []int{20, 21, 22}}
|
||||
f2v1p2 := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeAppend, Name: "f2", Version: v1, BlockIndexes: []int{23, 24, 25}}
|
||||
f2v1del := protocol.FileDownloadProgressUpdate{UpdateType: protocol.FileDownloadProgressUpdateTypeForget, Name: "f2", Version: v1, BlockIndexes: nil}
|
||||
|
||||
tests := []struct {
|
||||
updates []protocol.FileDownloadProgressUpdate
|
||||
|
||||
@@ -35,6 +35,7 @@ type fakeConnection struct {
|
||||
indexFn func(context.Context, string, []protocol.FileInfo)
|
||||
requestFn func(ctx context.Context, folder, name string, offset int64, size int, hash []byte, fromTemporary bool) ([]byte, error)
|
||||
closeFn func(error)
|
||||
clusterConfigFn func(protocol.ClusterConfig)
|
||||
mut sync.Mutex
|
||||
}
|
||||
|
||||
@@ -91,7 +92,13 @@ func (f *fakeConnection) Request(ctx context.Context, folder, name string, offse
|
||||
return f.fileData[name], nil
|
||||
}
|
||||
|
||||
func (f *fakeConnection) ClusterConfig(protocol.ClusterConfig) {}
|
||||
func (f *fakeConnection) ClusterConfig(cc protocol.ClusterConfig) {
|
||||
f.mut.Lock()
|
||||
defer f.mut.Unlock()
|
||||
if f.clusterConfigFn != nil {
|
||||
f.clusterConfigFn(cc)
|
||||
}
|
||||
}
|
||||
|
||||
func (f *fakeConnection) Ping() bool {
|
||||
f.mut.Lock()
|
||||
@@ -129,7 +136,7 @@ func (f *fakeConnection) addFileLocked(name string, flags uint32, ftype protocol
|
||||
Permissions: flags,
|
||||
Version: version,
|
||||
Sequence: time.Now().UnixNano(),
|
||||
RawBlockSize: int32(blockSize),
|
||||
RawBlockSize: blockSize,
|
||||
Blocks: blocks,
|
||||
})
|
||||
} else {
|
||||
@@ -196,7 +203,7 @@ func (f *fakeConnection) sendIndexUpdate() {
|
||||
|
||||
func addFakeConn(m *model, dev protocol.DeviceID) *fakeConnection {
|
||||
fc := &fakeConnection{id: dev, model: m}
|
||||
m.AddConnection(fc, protocol.HelloResult{})
|
||||
m.AddConnection(fc, protocol.Hello{})
|
||||
|
||||
m.ClusterConfig(dev, protocol.ClusterConfig{
|
||||
Folders: []protocol.Folder{
|
||||
|
||||
+9
-2
@@ -520,6 +520,11 @@ func (f *folder) scanSubdirs(subDirs []string) error {
|
||||
}
|
||||
|
||||
if err := batch.flushIfFull(); err != nil {
|
||||
// Prevent a race between the scan aborting due to context
|
||||
// cancellation and releasing the snapshot in defer here.
|
||||
scanCancel()
|
||||
for range fchan {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -860,11 +865,13 @@ func (f *folder) monitorWatch(ctx context.Context) {
|
||||
f.setWatchError(err, next)
|
||||
// This error was previously a panic and should never occur, so generate
|
||||
// a warning, but don't do it repetitively.
|
||||
if !warnedOutside {
|
||||
if _, ok := err.(*fs.ErrWatchEventOutsideRoot); ok {
|
||||
var errOutside *fs.ErrWatchEventOutsideRoot
|
||||
if errors.As(err, &errOutside) {
|
||||
if !warnedOutside {
|
||||
l.Warnln(err)
|
||||
warnedOutside = true
|
||||
}
|
||||
f.evLogger.Log(events.Failure, "watching for changes encountered an event outside of the filesystem root")
|
||||
}
|
||||
aggrCancel()
|
||||
errChan = nil
|
||||
|
||||
@@ -431,7 +431,7 @@ func setupKnownFiles(t *testing.T, ffs fs.Filesystem, data []byte) []protocol.Fi
|
||||
Permissions: 0644,
|
||||
Size: fi.Size(),
|
||||
ModifiedS: fi.ModTime().Unix(),
|
||||
ModifiedNs: int32(fi.ModTime().UnixNano() % 1e9),
|
||||
ModifiedNs: int(fi.ModTime().UnixNano() % 1e9),
|
||||
Version: protocol.Vector{Counters: []protocol.Counter{{ID: 42, Value: 42}}},
|
||||
Sequence: 42,
|
||||
Blocks: blocks,
|
||||
|
||||
@@ -65,6 +65,7 @@ func (f *sendOnlyFolder) pull() bool {
|
||||
if !ok {
|
||||
if intf.IsDeleted() {
|
||||
l.Debugln("Should never get a deleted file as needed when we don't have it")
|
||||
f.evLogger.Log(events.Failure, "got deleted file that doesn't exist locally as needed when pulling on send-only")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
|
||||
l.Debugln(f, "Handling ignored file", file)
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateInvalidate}
|
||||
|
||||
case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name):
|
||||
case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name) != nil:
|
||||
if file.IsDeleted() {
|
||||
// Just pretend we deleted it, no reason to create an error
|
||||
// about a deleted file that we can't have anyway.
|
||||
@@ -345,8 +345,9 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
|
||||
// ignored at some point.
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateDeleteFile}
|
||||
} else {
|
||||
// We can't pull an invalid file.
|
||||
f.newPullError(file.Name, fs.ErrInvalidFilename)
|
||||
// We can't pull an invalid file. Grab the error again since
|
||||
// we couldn't assign it directly in the case clause.
|
||||
f.newPullError(file.Name, fs.WindowsInvalidFilename(file.Name))
|
||||
// No reason to retry for this
|
||||
changed--
|
||||
}
|
||||
@@ -994,7 +995,7 @@ func (f *sendReceiveFolder) renameFile(cur, source, target protocol.FileInfo, sn
|
||||
tempName := fs.TempName(target.Name)
|
||||
|
||||
if f.versioner != nil {
|
||||
err = f.CheckAvailableSpace(source.Size)
|
||||
err = f.CheckAvailableSpace(uint64(source.Size))
|
||||
if err == nil {
|
||||
err = osutil.Copy(f.CopyRangeMethod, f.fs, f.fs, source.Name, tempName)
|
||||
if err == nil {
|
||||
@@ -1073,7 +1074,7 @@ func (f *sendReceiveFolder) handleFile(file protocol.FileInfo, snap *db.Snapshot
|
||||
populateOffsets(file.Blocks)
|
||||
|
||||
blocks := make([]protocol.BlockInfo, 0, len(file.Blocks))
|
||||
reused := make([]int32, 0, len(file.Blocks))
|
||||
reused := make([]int, 0, len(file.Blocks))
|
||||
|
||||
// Check for an old temporary file which might have some blocks we could
|
||||
// reuse.
|
||||
@@ -1102,7 +1103,7 @@ func (f *sendReceiveFolder) handleFile(file protocol.FileInfo, snap *db.Snapshot
|
||||
if !ok {
|
||||
blocks = append(blocks, block)
|
||||
} else {
|
||||
reused = append(reused, int32(i))
|
||||
reused = append(reused, i)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1238,7 +1239,7 @@ func (f *sendReceiveFolder) copierRoutine(in <-chan copyBlocksState, pullChan ch
|
||||
}
|
||||
|
||||
for state := range in {
|
||||
if err := f.CheckAvailableSpace(state.file.Size); err != nil {
|
||||
if err := f.CheckAvailableSpace(uint64(state.file.Size)); err != nil {
|
||||
state.fail(err)
|
||||
// Nothing more to do for this failed file, since it would use to much disk space
|
||||
out <- state.sharedPullerState
|
||||
|
||||
@@ -357,7 +357,7 @@ func TestWeakHash(t *testing.T) {
|
||||
Blocks: existing,
|
||||
Size: size,
|
||||
ModifiedS: info.ModTime().Unix(),
|
||||
ModifiedNs: int32(info.ModTime().Nanosecond()),
|
||||
ModifiedNs: info.ModTime().Nanosecond(),
|
||||
}
|
||||
desiredFile := protocol.FileInfo{
|
||||
Name: "weakhash",
|
||||
|
||||
+89
-95
@@ -147,9 +147,10 @@ type model struct {
|
||||
conn map[protocol.DeviceID]connections.Connection
|
||||
connRequestLimiters map[protocol.DeviceID]*byteSemaphore
|
||||
closed map[protocol.DeviceID]chan struct{}
|
||||
helloMessages map[protocol.DeviceID]protocol.HelloResult
|
||||
helloMessages map[protocol.DeviceID]protocol.Hello
|
||||
deviceDownloads map[protocol.DeviceID]*deviceDownloadState
|
||||
remotePausedFolders map[protocol.DeviceID][]string // deviceID -> folders
|
||||
indexSenderTokens map[protocol.DeviceID][]suture.ServiceToken
|
||||
|
||||
foldersRunning int32 // for testing only
|
||||
}
|
||||
@@ -219,9 +220,10 @@ func NewModel(cfg config.Wrapper, id protocol.DeviceID, clientName, clientVersio
|
||||
conn: make(map[protocol.DeviceID]connections.Connection),
|
||||
connRequestLimiters: make(map[protocol.DeviceID]*byteSemaphore),
|
||||
closed: make(map[protocol.DeviceID]chan struct{}),
|
||||
helloMessages: make(map[protocol.DeviceID]protocol.HelloResult),
|
||||
helloMessages: make(map[protocol.DeviceID]protocol.Hello),
|
||||
deviceDownloads: make(map[protocol.DeviceID]*deviceDownloadState),
|
||||
remotePausedFolders: make(map[protocol.DeviceID][]string),
|
||||
indexSenderTokens: make(map[protocol.DeviceID][]suture.ServiceToken),
|
||||
}
|
||||
for devID := range cfg.Devices() {
|
||||
m.deviceStatRefs[devID] = stats.NewDeviceStatisticsReference(m.db, devID.String())
|
||||
@@ -257,13 +259,16 @@ func (m *model) onServe() {
|
||||
func (m *model) Stop() {
|
||||
m.cfg.Unsubscribe(m)
|
||||
m.Supervisor.Stop()
|
||||
devs := m.cfg.Devices()
|
||||
ids := make([]protocol.DeviceID, 0, len(devs))
|
||||
for id := range devs {
|
||||
ids = append(ids, id)
|
||||
m.pmut.RLock()
|
||||
closed := make([]chan struct{}, 0, len(m.conn))
|
||||
for id, conn := range m.conn {
|
||||
closed = append(closed, m.closed[id])
|
||||
go conn.Close(errStopped)
|
||||
}
|
||||
m.pmut.RUnlock()
|
||||
for _, c := range closed {
|
||||
<-c
|
||||
}
|
||||
w := m.closeConns(ids, errStopped)
|
||||
w.Wait()
|
||||
}
|
||||
|
||||
// StartDeadlockDetector starts a deadlock detector on the models locks which
|
||||
@@ -393,7 +398,12 @@ func (m *model) warnAboutOverwritingProtectedFiles(cfg config.FolderConfiguratio
|
||||
}
|
||||
|
||||
func (m *model) removeFolder(cfg config.FolderConfiguration) {
|
||||
m.stopFolder(cfg, fmt.Errorf("removing folder %v", cfg.Description()))
|
||||
m.fmut.RLock()
|
||||
token, ok := m.folderRunnerToken[cfg.ID]
|
||||
m.fmut.RUnlock()
|
||||
if ok {
|
||||
m.RemoveAndWait(token, 0)
|
||||
}
|
||||
|
||||
m.fmut.Lock()
|
||||
|
||||
@@ -417,22 +427,6 @@ func (m *model) removeFolder(cfg config.FolderConfiguration) {
|
||||
db.DropFolder(m.db, cfg.ID)
|
||||
}
|
||||
|
||||
func (m *model) stopFolder(cfg config.FolderConfiguration, err error) {
|
||||
// Stop the services running for this folder and wait for them to finish
|
||||
// stopping to prevent races on restart.
|
||||
m.fmut.RLock()
|
||||
token, ok := m.folderRunnerToken[cfg.ID]
|
||||
m.fmut.RUnlock()
|
||||
|
||||
if ok {
|
||||
m.RemoveAndWait(token, 0)
|
||||
}
|
||||
|
||||
// Wait for connections to stop to ensure that no more calls to methods
|
||||
// expecting this folder to exist happen (e.g. .IndexUpdate).
|
||||
m.closeConns(cfg.DeviceIDs(), err).Wait()
|
||||
}
|
||||
|
||||
// Need to hold lock on m.fmut when calling this.
|
||||
func (m *model) cleanupFolderLocked(cfg config.FolderConfiguration) {
|
||||
// clear up our config maps
|
||||
@@ -464,25 +458,13 @@ func (m *model) restartFolder(from, to config.FolderConfiguration, cacheIgnoredF
|
||||
restartMut.Lock()
|
||||
defer restartMut.Unlock()
|
||||
|
||||
var infoMsg string
|
||||
var errMsg string
|
||||
switch {
|
||||
case to.Paused:
|
||||
infoMsg = "Paused"
|
||||
errMsg = "pausing"
|
||||
case from.Paused:
|
||||
infoMsg = "Unpaused"
|
||||
errMsg = "unpausing"
|
||||
default:
|
||||
infoMsg = "Restarted"
|
||||
errMsg = "restarting"
|
||||
m.fmut.RLock()
|
||||
token, ok := m.folderRunnerToken[from.ID]
|
||||
m.fmut.RUnlock()
|
||||
if ok {
|
||||
m.RemoveAndWait(token, 0)
|
||||
}
|
||||
|
||||
err := fmt.Errorf("%v folder %v", errMsg, to.Description())
|
||||
m.stopFolder(from, err)
|
||||
// Need to send CC change to both from and to devices.
|
||||
m.closeConns(to.DeviceIDs(), err)
|
||||
|
||||
m.fmut.Lock()
|
||||
defer m.fmut.Unlock()
|
||||
|
||||
@@ -499,6 +481,16 @@ func (m *model) restartFolder(from, to config.FolderConfiguration, cacheIgnoredF
|
||||
}
|
||||
m.addAndStartFolderLocked(to, fset, cacheIgnoredFiles)
|
||||
}
|
||||
|
||||
var infoMsg string
|
||||
switch {
|
||||
case to.Paused:
|
||||
infoMsg = "Paused"
|
||||
case from.Paused:
|
||||
infoMsg = "Unpaused"
|
||||
default:
|
||||
infoMsg = "Restarted"
|
||||
}
|
||||
l.Infof("%v folder %v (%v)", infoMsg, to.Description(), to.Type)
|
||||
}
|
||||
|
||||
@@ -507,9 +499,6 @@ func (m *model) newFolder(cfg config.FolderConfiguration, cacheIgnoredFiles bool
|
||||
// we do it outside of the lock.
|
||||
fset := db.NewFileSet(cfg.ID, cfg.Filesystem(), m.db)
|
||||
|
||||
// Close connections to affected devices
|
||||
m.closeConns(cfg.DeviceIDs(), fmt.Errorf("started folder %v", cfg.Description()))
|
||||
|
||||
m.fmut.Lock()
|
||||
defer m.fmut.Unlock()
|
||||
m.addAndStartFolderLocked(cfg, fset, cacheIgnoredFiles)
|
||||
@@ -712,9 +701,9 @@ type FolderCompletion struct {
|
||||
CompletionPct float64
|
||||
GlobalBytes int64
|
||||
NeedBytes int64
|
||||
GlobalItems int32
|
||||
NeedItems int32
|
||||
NeedDeletes int32
|
||||
GlobalItems int
|
||||
NeedItems int
|
||||
NeedDeletes int
|
||||
Sequence int64
|
||||
}
|
||||
|
||||
@@ -992,6 +981,9 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
m.pmut.RLock()
|
||||
conn, ok := m.conn[deviceID]
|
||||
closed := m.closed[deviceID]
|
||||
for _, token := range m.indexSenderTokens[deviceID] {
|
||||
m.RemoveAndWait(token, 0)
|
||||
}
|
||||
m.pmut.RUnlock()
|
||||
if !ok {
|
||||
panic("bug: ClusterConfig called on closed or nonexistent connection")
|
||||
@@ -1024,6 +1016,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
}
|
||||
|
||||
var paused []string
|
||||
indexSenderTokens := make([]suture.ServiceToken, 0, len(cm.Folders))
|
||||
for _, folder := range cm.Folders {
|
||||
cfg, ok := m.cfg.Folder(folder.ID)
|
||||
if !ok || !cfg.SharedWith(deviceID) {
|
||||
@@ -1142,14 +1135,12 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
evLogger: m.evLogger,
|
||||
}
|
||||
is.Service = util.AsService(is.serve, is.String())
|
||||
// The token isn't tracked as the service stops when the connection
|
||||
// terminates and is automatically removed from supervisor (by
|
||||
// implementing suture.IsCompletable).
|
||||
m.Add(is)
|
||||
indexSenderTokens = append(indexSenderTokens, m.Add(is))
|
||||
}
|
||||
|
||||
m.pmut.Lock()
|
||||
m.remotePausedFolders[deviceID] = paused
|
||||
m.indexSenderTokens[deviceID] = indexSenderTokens
|
||||
m.pmut.Unlock()
|
||||
|
||||
// This breaks if we send multiple CM messages during the same connection.
|
||||
@@ -1397,41 +1388,6 @@ func (m *model) Closed(conn protocol.Connection, err error) {
|
||||
close(closed)
|
||||
}
|
||||
|
||||
// closeConns will close the underlying connection for given devices and return
|
||||
// a waiter that will return once all the connections are finished closing.
|
||||
func (m *model) closeConns(devs []protocol.DeviceID, err error) config.Waiter {
|
||||
conns := make([]connections.Connection, 0, len(devs))
|
||||
closed := make([]chan struct{}, 0, len(devs))
|
||||
m.pmut.RLock()
|
||||
for _, dev := range devs {
|
||||
if conn, ok := m.conn[dev]; ok {
|
||||
conns = append(conns, conn)
|
||||
closed = append(closed, m.closed[dev])
|
||||
}
|
||||
}
|
||||
m.pmut.RUnlock()
|
||||
for _, conn := range conns {
|
||||
conn.Close(err)
|
||||
}
|
||||
return &channelWaiter{chans: closed}
|
||||
}
|
||||
|
||||
// closeConn closes the underlying connection for the given device and returns
|
||||
// a waiter that will return once the connection is finished closing.
|
||||
func (m *model) closeConn(dev protocol.DeviceID, err error) config.Waiter {
|
||||
return m.closeConns([]protocol.DeviceID{dev}, err)
|
||||
}
|
||||
|
||||
type channelWaiter struct {
|
||||
chans []chan struct{}
|
||||
}
|
||||
|
||||
func (w *channelWaiter) Wait() {
|
||||
for _, c := range w.chans {
|
||||
<-c
|
||||
}
|
||||
}
|
||||
|
||||
// Implements protocol.RequestResponse
|
||||
type requestResponse struct {
|
||||
data []byte
|
||||
@@ -1750,7 +1706,7 @@ func (m *model) SetIgnores(folder string, content []string) error {
|
||||
// OnHello is called when an device connects to us.
|
||||
// This allows us to extract some information from the Hello message
|
||||
// and add it to a list of known devices ahead of any checks.
|
||||
func (m *model) OnHello(remoteID protocol.DeviceID, addr net.Addr, hello protocol.HelloResult) error {
|
||||
func (m *model) OnHello(remoteID protocol.DeviceID, addr net.Addr, hello protocol.Hello) error {
|
||||
if m.cfg.IgnoredDevice(remoteID) {
|
||||
return errDeviceIgnored
|
||||
}
|
||||
@@ -1799,7 +1755,7 @@ func (m *model) GetHello(id protocol.DeviceID) protocol.HelloIntf {
|
||||
// AddConnection adds a new peer connection to the model. An initial index will
|
||||
// be sent to the connected peer, thereafter index updates whenever the local
|
||||
// folder changes.
|
||||
func (m *model) AddConnection(conn connections.Connection, hello protocol.HelloResult) {
|
||||
func (m *model) AddConnection(conn connections.Connection, hello protocol.Hello) {
|
||||
deviceID := conn.ID()
|
||||
device, ok := m.cfg.Device(deviceID)
|
||||
if !ok {
|
||||
@@ -2017,6 +1973,7 @@ func (s *indexSender) sendIndexTo(ctx context.Context) error {
|
||||
l.Warnln("Failed repairing sequence entries:", dbErr)
|
||||
panic("Failed repairing sequence entries")
|
||||
} else {
|
||||
s.evLogger.Log(events.Failure, "detected and repaired non-increasing sequence")
|
||||
l.Infof("Repaired %v sequence entries in database", fixed)
|
||||
}
|
||||
}()
|
||||
@@ -2430,7 +2387,7 @@ next:
|
||||
}
|
||||
|
||||
for _, device := range cfg.Devices {
|
||||
if m.deviceDownloads[device.DeviceID].Has(folder, file.Name, file.Version, int32(block.Offset/int64(file.BlockSize()))) {
|
||||
if m.deviceDownloads[device.DeviceID].Has(folder, file.Name, file.Version, int(block.Offset/int64(file.BlockSize()))) {
|
||||
availabilities = append(availabilities, Availability{ID: device.DeviceID, FromTemporary: true})
|
||||
}
|
||||
}
|
||||
@@ -2467,6 +2424,9 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
|
||||
// Go through the folder configs and figure out if we need to restart or not.
|
||||
|
||||
// Tracks devices affected by any configuration change to resend ClusterConfig.
|
||||
clusterConfigDevices := make(map[protocol.DeviceID]struct{}, len(from.Devices)+len(to.Devices))
|
||||
|
||||
fromFolders := mapFolders(from.Folders)
|
||||
toFolders := mapFolders(to.Folders)
|
||||
for folderID, cfg := range toFolders {
|
||||
@@ -2478,6 +2438,7 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
l.Infoln("Adding folder", cfg.Description())
|
||||
m.newFolder(cfg, to.Options.CacheIgnoredFiles)
|
||||
}
|
||||
clusterConfigDevices = addDeviceIDsToMap(clusterConfigDevices, cfg.DeviceIDs())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2486,6 +2447,7 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
if !ok {
|
||||
// The folder was removed.
|
||||
m.removeFolder(fromCfg)
|
||||
clusterConfigDevices = addDeviceIDsToMap(clusterConfigDevices, fromCfg.DeviceIDs())
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -2497,6 +2459,8 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
// Check if anything differs that requires a restart.
|
||||
if !reflect.DeepEqual(fromCfg.RequiresRestartOnly(), toCfg.RequiresRestartOnly()) || from.Options.CacheIgnoredFiles != to.Options.CacheIgnoredFiles {
|
||||
m.restartFolder(fromCfg, toCfg, to.Options.CacheIgnoredFiles)
|
||||
clusterConfigDevices = addDeviceIDsToMap(clusterConfigDevices, fromCfg.DeviceIDs())
|
||||
clusterConfigDevices = addDeviceIDsToMap(clusterConfigDevices, toCfg.DeviceIDs())
|
||||
}
|
||||
|
||||
// Emit the folder pause/resume event
|
||||
@@ -2519,6 +2483,7 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
// Pausing a device, unpausing is handled by the connection service.
|
||||
fromDevices := from.DeviceMap()
|
||||
toDevices := to.DeviceMap()
|
||||
closeDevices := make([]protocol.DeviceID, 0, len(to.Devices))
|
||||
for deviceID, toCfg := range toDevices {
|
||||
fromCfg, ok := fromDevices[deviceID]
|
||||
if !ok {
|
||||
@@ -2534,13 +2499,14 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
}
|
||||
|
||||
// Ignored folder was removed, reconnect to retrigger the prompt.
|
||||
if len(fromCfg.IgnoredFolders) > len(toCfg.IgnoredFolders) {
|
||||
m.closeConn(deviceID, errIgnoredFolderRemoved)
|
||||
if !toCfg.Paused && len(fromCfg.IgnoredFolders) > len(toCfg.IgnoredFolders) {
|
||||
closeDevices = append(closeDevices, deviceID)
|
||||
}
|
||||
|
||||
if toCfg.Paused {
|
||||
l.Infoln("Pausing", deviceID)
|
||||
m.closeConn(deviceID, errDevicePaused)
|
||||
closeDevices = append(closeDevices, deviceID)
|
||||
delete(clusterConfigDevices, deviceID)
|
||||
m.evLogger.Log(events.DevicePaused, map[string]string{"device": deviceID.String()})
|
||||
} else {
|
||||
m.evLogger.Log(events.DeviceResumed, map[string]string{"device": deviceID.String()})
|
||||
@@ -2551,9 +2517,28 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
for deviceID := range fromDevices {
|
||||
delete(m.deviceStatRefs, deviceID)
|
||||
removedDevices = append(removedDevices, deviceID)
|
||||
delete(clusterConfigDevices, deviceID)
|
||||
}
|
||||
m.fmut.Unlock()
|
||||
m.closeConns(removedDevices, errDeviceRemoved)
|
||||
|
||||
m.pmut.RLock()
|
||||
for _, id := range closeDevices {
|
||||
if conn, ok := m.conn[id]; ok {
|
||||
go conn.Close(errDevicePaused)
|
||||
}
|
||||
}
|
||||
for _, id := range removedDevices {
|
||||
if conn, ok := m.conn[id]; ok {
|
||||
go conn.Close(errDeviceRemoved)
|
||||
}
|
||||
}
|
||||
for id := range clusterConfigDevices {
|
||||
if conn, ok := m.conn[id]; ok {
|
||||
cm := m.generateClusterConfig(conn.ID())
|
||||
go conn.ClusterConfig(cm)
|
||||
}
|
||||
}
|
||||
m.pmut.RUnlock()
|
||||
|
||||
m.globalRequestLimiter.setCapacity(1024 * to.Options.MaxConcurrentIncomingRequestKiB())
|
||||
m.folderIOLimiter.setCapacity(to.Options.MaxFolderConcurrency())
|
||||
@@ -2633,7 +2618,7 @@ func makeForgetUpdate(files []protocol.FileInfo) []protocol.FileDownloadProgress
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: file.Name,
|
||||
Version: file.Version,
|
||||
UpdateType: protocol.UpdateTypeForget,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeForget,
|
||||
})
|
||||
}
|
||||
return updates
|
||||
@@ -2758,3 +2743,12 @@ func sanitizePath(path string) string {
|
||||
|
||||
return strings.TrimSpace(b.String())
|
||||
}
|
||||
|
||||
func addDeviceIDsToMap(m map[protocol.DeviceID]struct{}, s []protocol.DeviceID) map[protocol.DeviceID]struct{} {
|
||||
for _, id := range s {
|
||||
if _, ok := m[id]; !ok {
|
||||
m[id] = struct{}{}
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
+74
-40
@@ -126,7 +126,7 @@ func newState(cfg config.Configuration) *model {
|
||||
m := setupModel(wcfg)
|
||||
|
||||
for _, dev := range cfg.Devices {
|
||||
m.AddConnection(&fakeConnection{id: dev.DeviceID, model: m}, protocol.HelloResult{})
|
||||
m.AddConnection(&fakeConnection{id: dev.DeviceID, model: m}, protocol.Hello{})
|
||||
}
|
||||
|
||||
return m
|
||||
@@ -254,7 +254,7 @@ func BenchmarkRequestOut(b *testing.B) {
|
||||
for _, f := range files {
|
||||
fc.addFile(f.Name, 0644, protocol.FileInfoTypeFile, []byte("some data to return"))
|
||||
}
|
||||
m.AddConnection(fc, protocol.HelloResult{})
|
||||
m.AddConnection(fc, protocol.Hello{})
|
||||
m.Index(device1, "default", files)
|
||||
|
||||
b.ResetTimer()
|
||||
@@ -292,7 +292,7 @@ func BenchmarkRequestInSingleFile(b *testing.B) {
|
||||
}
|
||||
|
||||
func TestDeviceRename(t *testing.T) {
|
||||
hello := protocol.HelloResult{
|
||||
hello := protocol.Hello{
|
||||
ClientName: "syncthing",
|
||||
ClientVersion: "v0.9.4",
|
||||
}
|
||||
@@ -1665,10 +1665,9 @@ func TestRWScanRecovery(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGlobalDirectoryTree(t *testing.T) {
|
||||
db := db.NewLowlevel(backend.OpenMemory())
|
||||
m := newModel(defaultCfgWrapper, myID, "syncthing", "dev", db, nil)
|
||||
m.ServeBackground()
|
||||
defer cleanupModel(m)
|
||||
w, fcfg := tmpDefaultWrapper()
|
||||
m := setupModel(w)
|
||||
defer cleanupModelAndRemoveDir(m, fcfg.Filesystem().URI())
|
||||
|
||||
b := func(isfile bool, path ...string) protocol.FileInfo {
|
||||
typ := protocol.FileInfoTypeDirectory
|
||||
@@ -1916,10 +1915,9 @@ func TestGlobalDirectoryTree(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGlobalDirectorySelfFixing(t *testing.T) {
|
||||
db := db.NewLowlevel(backend.OpenMemory())
|
||||
m := newModel(defaultCfgWrapper, myID, "syncthing", "dev", db, nil)
|
||||
m.ServeBackground()
|
||||
defer cleanupModel(m)
|
||||
w, fcfg := tmpDefaultWrapper()
|
||||
m := setupModel(w)
|
||||
defer cleanupModelAndRemoveDir(m, fcfg.Filesystem().URI())
|
||||
|
||||
b := func(isfile bool, path ...string) protocol.FileInfo {
|
||||
typ := protocol.FileInfoTypeDirectory
|
||||
@@ -2313,9 +2311,9 @@ func TestSharedWithClearedOnDisconnect(t *testing.T) {
|
||||
defer cleanupModel(m)
|
||||
|
||||
conn1 := &fakeConnection{id: device1, model: m}
|
||||
m.AddConnection(conn1, protocol.HelloResult{})
|
||||
m.AddConnection(conn1, protocol.Hello{})
|
||||
conn2 := &fakeConnection{id: device2, model: m}
|
||||
m.AddConnection(conn2, protocol.HelloResult{})
|
||||
m.AddConnection(conn2, protocol.Hello{})
|
||||
|
||||
m.ClusterConfig(device1, protocol.ClusterConfig{
|
||||
Folders: []protocol.Folder{
|
||||
@@ -3331,7 +3329,7 @@ func TestConnCloseOnRestart(t *testing.T) {
|
||||
|
||||
br := &testutils.BlockingRW{}
|
||||
nw := &testutils.NoopRW{}
|
||||
m.AddConnection(newFakeProtoConn(protocol.NewConnection(device1, br, nw, m, "testConn", protocol.CompressNever)), protocol.HelloResult{})
|
||||
m.AddConnection(newFakeProtoConn(protocol.NewConnection(device1, br, nw, m, "testConn", protocol.CompressionNever)), protocol.Hello{})
|
||||
m.pmut.RLock()
|
||||
if len(m.closed) != 1 {
|
||||
t.Fatalf("Expected just one conn (len(m.conn) == %v)", len(m.conn))
|
||||
@@ -3339,17 +3337,19 @@ func TestConnCloseOnRestart(t *testing.T) {
|
||||
closed := m.closed[device1]
|
||||
m.pmut.RUnlock()
|
||||
|
||||
newFcfg := fcfg.Copy()
|
||||
newFcfg.Paused = true
|
||||
waiter, err := w.RemoveDevice(device1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
m.restartFolder(fcfg, newFcfg, false)
|
||||
waiter.Wait()
|
||||
close(done)
|
||||
}()
|
||||
select {
|
||||
case <-done:
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatal("Timed out before folder restart returned")
|
||||
t.Fatal("Timed out before config took effect")
|
||||
}
|
||||
select {
|
||||
case <-closed:
|
||||
@@ -3845,8 +3845,8 @@ func TestScanRenameCaseOnly(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConnectionTerminationOnFolderAdd(t *testing.T) {
|
||||
testConfigChangeClosesConnections(t, false, true, nil, func(cfg config.Wrapper) {
|
||||
func TestClusterConfigOnFolderAdd(t *testing.T) {
|
||||
testConfigChangeTriggersClusterConfigs(t, false, true, nil, func(cfg config.Wrapper) {
|
||||
fcfg := testFolderConfigTmp()
|
||||
fcfg.ID = "second"
|
||||
fcfg.Label = "second"
|
||||
@@ -3859,8 +3859,8 @@ func TestConnectionTerminationOnFolderAdd(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConnectionTerminationOnFolderShare(t *testing.T) {
|
||||
testConfigChangeClosesConnections(t, true, true, nil, func(cfg config.Wrapper) {
|
||||
func TestClusterConfigOnFolderShare(t *testing.T) {
|
||||
testConfigChangeTriggersClusterConfigs(t, true, true, nil, func(cfg config.Wrapper) {
|
||||
fcfg := cfg.FolderList()[0]
|
||||
fcfg.Devices = []config.FolderDeviceConfiguration{{device2, protocol.EmptyDeviceID}}
|
||||
if w, err := cfg.SetFolder(fcfg); err != nil {
|
||||
@@ -3871,8 +3871,8 @@ func TestConnectionTerminationOnFolderShare(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConnectionTerminationOnFolderUnshare(t *testing.T) {
|
||||
testConfigChangeClosesConnections(t, true, false, nil, func(cfg config.Wrapper) {
|
||||
func TestClusterConfigOnFolderUnshare(t *testing.T) {
|
||||
testConfigChangeTriggersClusterConfigs(t, true, false, nil, func(cfg config.Wrapper) {
|
||||
fcfg := cfg.FolderList()[0]
|
||||
fcfg.Devices = nil
|
||||
if w, err := cfg.SetFolder(fcfg); err != nil {
|
||||
@@ -3883,8 +3883,8 @@ func TestConnectionTerminationOnFolderUnshare(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConnectionTerminationOnFolderRemove(t *testing.T) {
|
||||
testConfigChangeClosesConnections(t, true, false, nil, func(cfg config.Wrapper) {
|
||||
func TestClusterConfigOnFolderRemove(t *testing.T) {
|
||||
testConfigChangeTriggersClusterConfigs(t, true, false, nil, func(cfg config.Wrapper) {
|
||||
rcfg := cfg.RawCopy()
|
||||
rcfg.Folders = nil
|
||||
if w, err := cfg.Replace(rcfg); err != nil {
|
||||
@@ -3895,8 +3895,8 @@ func TestConnectionTerminationOnFolderRemove(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConnectionTerminationOnFolderPause(t *testing.T) {
|
||||
testConfigChangeClosesConnections(t, true, false, nil, func(cfg config.Wrapper) {
|
||||
func TestClusterConfigOnFolderPause(t *testing.T) {
|
||||
testConfigChangeTriggersClusterConfigs(t, true, false, nil, func(cfg config.Wrapper) {
|
||||
fcfg := cfg.FolderList()[0]
|
||||
fcfg.Paused = true
|
||||
if w, err := cfg.SetFolder(fcfg); err != nil {
|
||||
@@ -3907,8 +3907,8 @@ func TestConnectionTerminationOnFolderPause(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConnectionTerminationOnFolderUnpause(t *testing.T) {
|
||||
testConfigChangeClosesConnections(t, true, false, func(cfg config.Wrapper) {
|
||||
func TestClusterConfigOnFolderUnpause(t *testing.T) {
|
||||
testConfigChangeTriggersClusterConfigs(t, true, false, func(cfg config.Wrapper) {
|
||||
fcfg := cfg.FolderList()[0]
|
||||
fcfg.Paused = true
|
||||
if w, err := cfg.SetFolder(fcfg); err != nil {
|
||||
@@ -3984,7 +3984,7 @@ func TestScanDeletedROChangedOnSR(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testConfigChangeClosesConnections(t *testing.T, expectFirstClosed, expectSecondClosed bool, pre func(config.Wrapper), fn func(config.Wrapper)) {
|
||||
func testConfigChangeTriggersClusterConfigs(t *testing.T, expectFirst, expectSecond bool, pre func(config.Wrapper), fn func(config.Wrapper)) {
|
||||
t.Helper()
|
||||
wcfg, _ := tmpDefaultWrapper()
|
||||
m := setupModel(wcfg)
|
||||
@@ -3999,21 +3999,55 @@ func testConfigChangeClosesConnections(t *testing.T, expectFirstClosed, expectSe
|
||||
pre(wcfg)
|
||||
}
|
||||
|
||||
fc1 := &fakeConnection{id: device1, model: m}
|
||||
fc2 := &fakeConnection{id: device2, model: m}
|
||||
m.AddConnection(fc1, protocol.HelloResult{})
|
||||
m.AddConnection(fc2, protocol.HelloResult{})
|
||||
cc1 := make(chan struct{}, 1)
|
||||
cc2 := make(chan struct{}, 1)
|
||||
fc1 := &fakeConnection{
|
||||
id: device1,
|
||||
model: m,
|
||||
clusterConfigFn: func(_ protocol.ClusterConfig) {
|
||||
cc1 <- struct{}{}
|
||||
},
|
||||
}
|
||||
fc2 := &fakeConnection{
|
||||
id: device2,
|
||||
model: m,
|
||||
clusterConfigFn: func(_ protocol.ClusterConfig) {
|
||||
cc2 <- struct{}{}
|
||||
},
|
||||
}
|
||||
m.AddConnection(fc1, protocol.Hello{})
|
||||
m.AddConnection(fc2, protocol.Hello{})
|
||||
|
||||
// Initial CCs
|
||||
select {
|
||||
case <-cc1:
|
||||
default:
|
||||
t.Fatal("missing initial CC from device1")
|
||||
}
|
||||
select {
|
||||
case <-cc2:
|
||||
default:
|
||||
t.Fatal("missing initial CC from device2")
|
||||
}
|
||||
|
||||
t.Log("Applying config change")
|
||||
|
||||
fn(wcfg)
|
||||
|
||||
if expectFirstClosed != fc1.closed {
|
||||
t.Errorf("first connection state mismatch: %t (expected) != %t", expectFirstClosed, fc1.closed)
|
||||
timeout := time.NewTimer(time.Second)
|
||||
if expectFirst {
|
||||
select {
|
||||
case <-cc1:
|
||||
case <-timeout.C:
|
||||
t.Errorf("timed out before receiving cluste rconfig for first device")
|
||||
}
|
||||
}
|
||||
|
||||
if expectSecondClosed != fc2.closed {
|
||||
t.Errorf("second connection state mismatch: %t (expected) != %t", expectSecondClosed, fc2.closed)
|
||||
if expectSecond {
|
||||
select {
|
||||
case <-cc2:
|
||||
case <-timeout.C:
|
||||
t.Errorf("timed out before receiving cluste rconfig for second device")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
p.registry["folder2"] = make(map[string]*sharedPullerState)
|
||||
p.registry["folderXXX"] = make(map[string]*sharedPullerState)
|
||||
|
||||
expect := func(updateIdx int, state *sharedPullerState, updateType protocol.FileDownloadProgressUpdateType, version protocol.Vector, blocks []int32, remove bool) {
|
||||
expect := func(updateIdx int, state *sharedPullerState, updateType protocol.FileDownloadProgressUpdateType, version protocol.Vector, blocks []int, remove bool) {
|
||||
messageIdx := -1
|
||||
for i, msg := range fc.downloadProgressMessages {
|
||||
if msg.folder == state.folder {
|
||||
@@ -222,10 +222,10 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
expectEmpty()
|
||||
|
||||
// Returns update for puller with new extra blocks
|
||||
state1.available = []int32{1}
|
||||
state1.available = []int{1}
|
||||
sendMsgs(p)
|
||||
|
||||
expect(0, state1, protocol.UpdateTypeAppend, v1, []int32{1}, true)
|
||||
expect(0, state1, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1}, true)
|
||||
expectEmpty()
|
||||
|
||||
// Does nothing if nothing changes
|
||||
@@ -239,7 +239,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
expectEmpty()
|
||||
|
||||
// Does not return an update if date blocks change but date does not (should never happen)
|
||||
state1.available = []int32{1, 2}
|
||||
state1.available = []int{1, 2}
|
||||
|
||||
sendMsgs(p)
|
||||
expectEmpty()
|
||||
@@ -249,7 +249,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(0, state1, protocol.UpdateTypeAppend, v1, []int32{2}, true)
|
||||
expect(0, state1, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{2}, true)
|
||||
expectEmpty()
|
||||
|
||||
// Returns forget and update if puller version has changed
|
||||
@@ -257,20 +257,20 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(0, state1, protocol.UpdateTypeForget, v1, nil, false)
|
||||
expect(1, state1, protocol.UpdateTypeAppend, v2, []int32{1, 2}, true)
|
||||
expect(0, state1, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, false)
|
||||
expect(1, state1, protocol.FileDownloadProgressUpdateTypeAppend, v2, []int{1, 2}, true)
|
||||
expectEmpty()
|
||||
|
||||
// Returns forget and append if sharedPullerState creation timer changes.
|
||||
|
||||
state1.available = []int32{1}
|
||||
state1.available = []int{1}
|
||||
state1.availableUpdated = tick()
|
||||
state1.created = tick()
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(0, state1, protocol.UpdateTypeForget, v2, nil, false)
|
||||
expect(1, state1, protocol.UpdateTypeAppend, v2, []int32{1}, true)
|
||||
expect(0, state1, protocol.FileDownloadProgressUpdateTypeForget, v2, nil, false)
|
||||
expect(1, state1, protocol.FileDownloadProgressUpdateTypeAppend, v2, []int{1}, true)
|
||||
expectEmpty()
|
||||
|
||||
// Sends an empty update if new file exists, but does not have any blocks yet. (To indicate that the old blocks are no longer available)
|
||||
@@ -280,12 +280,12 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(0, state1, protocol.UpdateTypeForget, v2, nil, false)
|
||||
expect(1, state1, protocol.UpdateTypeAppend, v1, nil, true)
|
||||
expect(0, state1, protocol.FileDownloadProgressUpdateTypeForget, v2, nil, false)
|
||||
expect(1, state1, protocol.FileDownloadProgressUpdateTypeAppend, v1, nil, true)
|
||||
expectEmpty()
|
||||
|
||||
// Updates for multiple files and folders can be combined
|
||||
state1.available = []int32{1, 2, 3}
|
||||
state1.available = []int{1, 2, 3}
|
||||
state1.availableUpdated = tick()
|
||||
|
||||
state2 := &sharedPullerState{
|
||||
@@ -296,7 +296,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Blocks: blocks,
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
state3 := &sharedPullerState{
|
||||
@@ -307,7 +307,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Blocks: blocks,
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
state4 := &sharedPullerState{
|
||||
@@ -318,7 +318,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Blocks: blocks,
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
p.registry["folder2"]["2"] = state2
|
||||
@@ -327,16 +327,16 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(-1, state1, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3}, false)
|
||||
expect(-1, state3, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3}, true)
|
||||
expect(-1, state2, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3}, false)
|
||||
expect(-1, state4, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3}, true)
|
||||
expect(-1, state1, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3}, false)
|
||||
expect(-1, state3, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3}, true)
|
||||
expect(-1, state2, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3}, false)
|
||||
expect(-1, state4, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3}, true)
|
||||
expectEmpty()
|
||||
|
||||
// Returns forget if puller no longer exists, as well as updates if it has been updated.
|
||||
state1.available = []int32{1, 2, 3, 4, 5}
|
||||
state1.available = []int{1, 2, 3, 4, 5}
|
||||
state1.availableUpdated = tick()
|
||||
state2.available = []int32{1, 2, 3, 4, 5}
|
||||
state2.available = []int{1, 2, 3, 4, 5}
|
||||
state2.availableUpdated = tick()
|
||||
|
||||
delete(p.registry["folder"], "3")
|
||||
@@ -344,10 +344,10 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(-1, state1, protocol.UpdateTypeAppend, v1, []int32{4, 5}, false)
|
||||
expect(-1, state3, protocol.UpdateTypeForget, v1, nil, true)
|
||||
expect(-1, state2, protocol.UpdateTypeAppend, v1, []int32{4, 5}, false)
|
||||
expect(-1, state4, protocol.UpdateTypeForget, v1, nil, true)
|
||||
expect(-1, state1, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{4, 5}, false)
|
||||
expect(-1, state3, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, true)
|
||||
expect(-1, state2, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{4, 5}, false)
|
||||
expect(-1, state4, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, true)
|
||||
expectEmpty()
|
||||
|
||||
// Deletions are sent only once (actual bug I found writing the tests)
|
||||
@@ -366,7 +366,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Blocks: blocks,
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
// Symlink
|
||||
@@ -378,7 +378,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Type: protocol.FileInfoTypeSymlink,
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
// Some other directory
|
||||
@@ -390,7 +390,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Blocks: blocks,
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
// Less than 10 blocks
|
||||
@@ -402,7 +402,7 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
Blocks: blocks[:3],
|
||||
},
|
||||
mut: sync.NewRWMutex(),
|
||||
available: []int32{1, 2, 3},
|
||||
available: []int{1, 2, 3},
|
||||
availableUpdated: time.Now(),
|
||||
}
|
||||
p.registry["folder"]["5"] = state5
|
||||
@@ -419,8 +419,8 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
delete(p.registry["folder2"], "2") // Clean up first
|
||||
|
||||
sendMsgs(p)
|
||||
expect(-1, state1, protocol.UpdateTypeForget, v1, nil, true)
|
||||
expect(-1, state2, protocol.UpdateTypeForget, v1, nil, true)
|
||||
expect(-1, state1, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, true)
|
||||
expect(-1, state2, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, true)
|
||||
|
||||
expectEmpty()
|
||||
|
||||
@@ -431,10 +431,10 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
sendMsgs(p)
|
||||
|
||||
expect(-1, state1, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3, 4, 5}, false)
|
||||
expect(-1, state3, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3}, true)
|
||||
expect(-1, state2, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3, 4, 5}, false)
|
||||
expect(-1, state4, protocol.UpdateTypeAppend, v1, []int32{1, 2, 3}, true)
|
||||
expect(-1, state1, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3, 4, 5}, false)
|
||||
expect(-1, state3, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3}, true)
|
||||
expect(-1, state2, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3, 4, 5}, false)
|
||||
expect(-1, state4, protocol.FileDownloadProgressUpdateTypeAppend, v1, []int{1, 2, 3}, true)
|
||||
expectEmpty()
|
||||
|
||||
p.temporaryIndexUnsubscribe(fc)
|
||||
@@ -444,8 +444,8 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
// See progressemitter.go for explanation why this is commented out.
|
||||
// Search for state.cleanup
|
||||
//expect(-1, state2, protocol.UpdateTypeForget, v1, nil, false)
|
||||
//expect(-1, state4, protocol.UpdateTypeForget, v1, nil, true)
|
||||
//expect(-1, state2, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, false)
|
||||
//expect(-1, state4, protocol.FileDownloadProgressUpdateTypeForget, v1, nil, true)
|
||||
|
||||
expectEmpty()
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
// sentFolderFileDownloadState represents a state of what we've announced as available
|
||||
// to some remote device for a specific file.
|
||||
type sentFolderFileDownloadState struct {
|
||||
blockIndexes []int32
|
||||
blockIndexes []int
|
||||
version protocol.Vector
|
||||
updated time.Time
|
||||
created time.Time
|
||||
@@ -44,7 +44,7 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco
|
||||
pullerVersion := puller.file.Version
|
||||
pullerBlockIndexesUpdated := puller.AvailableUpdated()
|
||||
pullerCreated := puller.created
|
||||
pullerBlockSize := int32(puller.file.BlockSize())
|
||||
pullerBlockSize := puller.file.BlockSize()
|
||||
|
||||
localFile, ok := s.files[name]
|
||||
|
||||
@@ -57,13 +57,13 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco
|
||||
updated: pullerBlockIndexesUpdated,
|
||||
version: pullerVersion,
|
||||
created: pullerCreated,
|
||||
blockSize: int(pullerBlockSize),
|
||||
blockSize: pullerBlockSize,
|
||||
}
|
||||
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: name,
|
||||
Version: pullerVersion,
|
||||
UpdateType: protocol.UpdateTypeAppend,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeAppend,
|
||||
BlockIndexes: pullerBlockIndexes,
|
||||
BlockSize: pullerBlockSize,
|
||||
})
|
||||
@@ -83,12 +83,12 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: name,
|
||||
Version: localFile.version,
|
||||
UpdateType: protocol.UpdateTypeForget,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeForget,
|
||||
})
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: name,
|
||||
Version: pullerVersion,
|
||||
UpdateType: protocol.UpdateTypeAppend,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeAppend,
|
||||
BlockIndexes: pullerBlockIndexes,
|
||||
BlockSize: pullerBlockSize,
|
||||
})
|
||||
@@ -112,7 +112,7 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: name,
|
||||
Version: localFile.version,
|
||||
UpdateType: protocol.UpdateTypeAppend,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeAppend,
|
||||
BlockIndexes: newBlocks,
|
||||
BlockSize: pullerBlockSize,
|
||||
})
|
||||
@@ -127,7 +127,7 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: name,
|
||||
Version: info.version,
|
||||
UpdateType: protocol.UpdateTypeForget,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeForget,
|
||||
})
|
||||
delete(s.files, name)
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func (s *sentFolderDownloadState) destroy() []protocol.FileDownloadProgressUpdat
|
||||
updates = append(updates, protocol.FileDownloadProgressUpdate{
|
||||
Name: name,
|
||||
Version: info.version,
|
||||
UpdateType: protocol.UpdateTypeForget,
|
||||
UpdateType: protocol.FileDownloadProgressUpdateTypeForget,
|
||||
})
|
||||
delete(s.files, name)
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ type sharedPullerState struct {
|
||||
pullNeeded int // Number of block pulls still pending
|
||||
updated time.Time // Time when any of the counters above were last updated
|
||||
closed bool // True if the file has been finalClosed.
|
||||
available []int32 // Indexes of the blocks that are available in the temporary file
|
||||
available []int // Indexes of the blocks that are available in the temporary file
|
||||
availableUpdated time.Time // Time when list of available blocks was last updated
|
||||
mut sync.RWMutex // Protects the above
|
||||
}
|
||||
|
||||
func newSharedPullerState(file protocol.FileInfo, fs fs.Filesystem, folderID, tempName string, blocks []protocol.BlockInfo, reused []int32, ignorePerms, hasCurFile bool, curFile protocol.FileInfo, sparse bool, fsync bool) *sharedPullerState {
|
||||
func newSharedPullerState(file protocol.FileInfo, fs fs.Filesystem, folderID, tempName string, blocks []protocol.BlockInfo, reused []int, ignorePerms, hasCurFile bool, curFile protocol.FileInfo, sparse bool, fsync bool) *sharedPullerState {
|
||||
return &sharedPullerState{
|
||||
file: file,
|
||||
fs: fs,
|
||||
@@ -244,7 +244,7 @@ func (s *sharedPullerState) copyDone(block protocol.BlockInfo) {
|
||||
s.mut.Lock()
|
||||
s.copyNeeded--
|
||||
s.updated = time.Now()
|
||||
s.available = append(s.available, int32(block.Offset/int64(s.file.BlockSize())))
|
||||
s.available = append(s.available, int(block.Offset/int64(s.file.BlockSize())))
|
||||
s.availableUpdated = time.Now()
|
||||
l.Debugln("sharedPullerState", s.folder, s.file.Name, "copyNeeded ->", s.copyNeeded)
|
||||
s.mut.Unlock()
|
||||
@@ -280,7 +280,7 @@ func (s *sharedPullerState) pullDone(block protocol.BlockInfo) {
|
||||
s.mut.Lock()
|
||||
s.pullNeeded--
|
||||
s.updated = time.Now()
|
||||
s.available = append(s.available, int32(block.Offset/int64(s.file.BlockSize())))
|
||||
s.available = append(s.available, int(block.Offset/int64(s.file.BlockSize())))
|
||||
s.availableUpdated = time.Now()
|
||||
l.Debugln("sharedPullerState", s.folder, s.file.Name, "pullNeeded done ->", s.pullNeeded)
|
||||
s.mut.Unlock()
|
||||
@@ -359,7 +359,7 @@ func (s *sharedPullerState) AvailableUpdated() time.Time {
|
||||
}
|
||||
|
||||
// Available returns blocks available in the current temporary file
|
||||
func (s *sharedPullerState) Available() []int32 {
|
||||
func (s *sharedPullerState) Available() []int {
|
||||
s.mut.RLock()
|
||||
blocks := s.available
|
||||
s.mut.RUnlock()
|
||||
|
||||
@@ -59,9 +59,9 @@ func benchmarkRequestsTLS(b *testing.B, conn0, conn1 net.Conn) {
|
||||
|
||||
func benchmarkRequestsConnPair(b *testing.B, conn0, conn1 net.Conn) {
|
||||
// Start up Connections on them
|
||||
c0 := NewConnection(LocalDeviceID, conn0, conn0, new(fakeModel), "c0", CompressMetadata)
|
||||
c0 := NewConnection(LocalDeviceID, conn0, conn0, new(fakeModel), "c0", CompressionMetadata)
|
||||
c0.Start()
|
||||
c1 := NewConnection(LocalDeviceID, conn1, conn1, new(fakeModel), "c1", CompressMetadata)
|
||||
c1 := NewConnection(LocalDeviceID, conn1, conn1, new(fakeModel), "c1", CompressionMetadata)
|
||||
c1.Start()
|
||||
|
||||
// Satisfy the assertions in the protocol by sending an initial cluster config
|
||||
|
||||
+313
-266
@@ -7,6 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/syncthing/syncthing/proto/ext"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
@@ -26,36 +27,36 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
type MessageType int32
|
||||
|
||||
const (
|
||||
messageTypeClusterConfig MessageType = 0
|
||||
messageTypeIndex MessageType = 1
|
||||
messageTypeIndexUpdate MessageType = 2
|
||||
messageTypeRequest MessageType = 3
|
||||
messageTypeResponse MessageType = 4
|
||||
messageTypeDownloadProgress MessageType = 5
|
||||
messageTypePing MessageType = 6
|
||||
messageTypeClose MessageType = 7
|
||||
MessageTypeClusterConfig MessageType = 0
|
||||
MessageTypeIndex MessageType = 1
|
||||
MessageTypeIndexUpdate MessageType = 2
|
||||
MessageTypeRequest MessageType = 3
|
||||
MessageTypeResponse MessageType = 4
|
||||
MessageTypeDownloadProgress MessageType = 5
|
||||
MessageTypePing MessageType = 6
|
||||
MessageTypeClose MessageType = 7
|
||||
)
|
||||
|
||||
var MessageType_name = map[int32]string{
|
||||
0: "CLUSTER_CONFIG",
|
||||
1: "INDEX",
|
||||
2: "INDEX_UPDATE",
|
||||
3: "REQUEST",
|
||||
4: "RESPONSE",
|
||||
5: "DOWNLOAD_PROGRESS",
|
||||
6: "PING",
|
||||
7: "CLOSE",
|
||||
0: "MESSAGE_TYPE_CLUSTER_CONFIG",
|
||||
1: "MESSAGE_TYPE_INDEX",
|
||||
2: "MESSAGE_TYPE_INDEX_UPDATE",
|
||||
3: "MESSAGE_TYPE_REQUEST",
|
||||
4: "MESSAGE_TYPE_RESPONSE",
|
||||
5: "MESSAGE_TYPE_DOWNLOAD_PROGRESS",
|
||||
6: "MESSAGE_TYPE_PING",
|
||||
7: "MESSAGE_TYPE_CLOSE",
|
||||
}
|
||||
|
||||
var MessageType_value = map[string]int32{
|
||||
"CLUSTER_CONFIG": 0,
|
||||
"INDEX": 1,
|
||||
"INDEX_UPDATE": 2,
|
||||
"REQUEST": 3,
|
||||
"RESPONSE": 4,
|
||||
"DOWNLOAD_PROGRESS": 5,
|
||||
"PING": 6,
|
||||
"CLOSE": 7,
|
||||
"MESSAGE_TYPE_CLUSTER_CONFIG": 0,
|
||||
"MESSAGE_TYPE_INDEX": 1,
|
||||
"MESSAGE_TYPE_INDEX_UPDATE": 2,
|
||||
"MESSAGE_TYPE_REQUEST": 3,
|
||||
"MESSAGE_TYPE_RESPONSE": 4,
|
||||
"MESSAGE_TYPE_DOWNLOAD_PROGRESS": 5,
|
||||
"MESSAGE_TYPE_PING": 6,
|
||||
"MESSAGE_TYPE_CLOSE": 7,
|
||||
}
|
||||
|
||||
func (x MessageType) String() string {
|
||||
@@ -74,13 +75,13 @@ const (
|
||||
)
|
||||
|
||||
var MessageCompression_name = map[int32]string{
|
||||
0: "NONE",
|
||||
1: "LZ4",
|
||||
0: "MESSAGE_COMPRESSION_NONE",
|
||||
1: "MESSAGE_COMPRESSION_LZ4",
|
||||
}
|
||||
|
||||
var MessageCompression_value = map[string]int32{
|
||||
"NONE": 0,
|
||||
"LZ4": 1,
|
||||
"MESSAGE_COMPRESSION_NONE": 0,
|
||||
"MESSAGE_COMPRESSION_LZ4": 1,
|
||||
}
|
||||
|
||||
func (x MessageCompression) String() string {
|
||||
@@ -94,21 +95,21 @@ func (MessageCompression) EnumDescriptor() ([]byte, []int) {
|
||||
type Compression int32
|
||||
|
||||
const (
|
||||
CompressMetadata Compression = 0
|
||||
CompressNever Compression = 1
|
||||
CompressAlways Compression = 2
|
||||
CompressionMetadata Compression = 0
|
||||
CompressionNever Compression = 1
|
||||
CompressionAlways Compression = 2
|
||||
)
|
||||
|
||||
var Compression_name = map[int32]string{
|
||||
0: "METADATA",
|
||||
1: "NEVER",
|
||||
2: "ALWAYS",
|
||||
0: "COMPRESSION_METADATA",
|
||||
1: "COMPRESSION_NEVER",
|
||||
2: "COMPRESSION_ALWAYS",
|
||||
}
|
||||
|
||||
var Compression_value = map[string]int32{
|
||||
"METADATA": 0,
|
||||
"NEVER": 1,
|
||||
"ALWAYS": 2,
|
||||
"COMPRESSION_METADATA": 0,
|
||||
"COMPRESSION_NEVER": 1,
|
||||
"COMPRESSION_ALWAYS": 2,
|
||||
}
|
||||
|
||||
func (x Compression) String() string {
|
||||
@@ -122,27 +123,27 @@ func (Compression) EnumDescriptor() ([]byte, []int) {
|
||||
type FileInfoType int32
|
||||
|
||||
const (
|
||||
FileInfoTypeFile FileInfoType = 0
|
||||
FileInfoTypeDirectory FileInfoType = 1
|
||||
FileInfoTypeDeprecatedSymlinkFile FileInfoType = 2 // Deprecated: Do not use.
|
||||
FileInfoTypeDeprecatedSymlinkDirectory FileInfoType = 3 // Deprecated: Do not use.
|
||||
FileInfoTypeSymlink FileInfoType = 4
|
||||
FileInfoTypeFile FileInfoType = 0
|
||||
FileInfoTypeDirectory FileInfoType = 1
|
||||
FileInfoTypeSymlinkFile FileInfoType = 2 // Deprecated: Do not use.
|
||||
FileInfoTypeSymlinkDirectory FileInfoType = 3 // Deprecated: Do not use.
|
||||
FileInfoTypeSymlink FileInfoType = 4
|
||||
)
|
||||
|
||||
var FileInfoType_name = map[int32]string{
|
||||
0: "FILE",
|
||||
1: "DIRECTORY",
|
||||
2: "SYMLINK_FILE",
|
||||
3: "SYMLINK_DIRECTORY",
|
||||
4: "SYMLINK",
|
||||
0: "FILE_INFO_TYPE_FILE",
|
||||
1: "FILE_INFO_TYPE_DIRECTORY",
|
||||
2: "FILE_INFO_TYPE_SYMLINK_FILE",
|
||||
3: "FILE_INFO_TYPE_SYMLINK_DIRECTORY",
|
||||
4: "FILE_INFO_TYPE_SYMLINK",
|
||||
}
|
||||
|
||||
var FileInfoType_value = map[string]int32{
|
||||
"FILE": 0,
|
||||
"DIRECTORY": 1,
|
||||
"SYMLINK_FILE": 2,
|
||||
"SYMLINK_DIRECTORY": 3,
|
||||
"SYMLINK": 4,
|
||||
"FILE_INFO_TYPE_FILE": 0,
|
||||
"FILE_INFO_TYPE_DIRECTORY": 1,
|
||||
"FILE_INFO_TYPE_SYMLINK_FILE": 2,
|
||||
"FILE_INFO_TYPE_SYMLINK_DIRECTORY": 3,
|
||||
"FILE_INFO_TYPE_SYMLINK": 4,
|
||||
}
|
||||
|
||||
func (x FileInfoType) String() string {
|
||||
@@ -163,17 +164,17 @@ const (
|
||||
)
|
||||
|
||||
var ErrorCode_name = map[int32]string{
|
||||
0: "NO_ERROR",
|
||||
1: "GENERIC",
|
||||
2: "NO_SUCH_FILE",
|
||||
3: "INVALID_FILE",
|
||||
0: "ERROR_CODE_NO_ERROR",
|
||||
1: "ERROR_CODE_GENERIC",
|
||||
2: "ERROR_CODE_NO_SUCH_FILE",
|
||||
3: "ERROR_CODE_INVALID_FILE",
|
||||
}
|
||||
|
||||
var ErrorCode_value = map[string]int32{
|
||||
"NO_ERROR": 0,
|
||||
"GENERIC": 1,
|
||||
"NO_SUCH_FILE": 2,
|
||||
"INVALID_FILE": 3,
|
||||
"ERROR_CODE_NO_ERROR": 0,
|
||||
"ERROR_CODE_GENERIC": 1,
|
||||
"ERROR_CODE_NO_SUCH_FILE": 2,
|
||||
"ERROR_CODE_INVALID_FILE": 3,
|
||||
}
|
||||
|
||||
func (x ErrorCode) String() string {
|
||||
@@ -187,18 +188,18 @@ func (ErrorCode) EnumDescriptor() ([]byte, []int) {
|
||||
type FileDownloadProgressUpdateType int32
|
||||
|
||||
const (
|
||||
UpdateTypeAppend FileDownloadProgressUpdateType = 0
|
||||
UpdateTypeForget FileDownloadProgressUpdateType = 1
|
||||
FileDownloadProgressUpdateTypeAppend FileDownloadProgressUpdateType = 0
|
||||
FileDownloadProgressUpdateTypeForget FileDownloadProgressUpdateType = 1
|
||||
)
|
||||
|
||||
var FileDownloadProgressUpdateType_name = map[int32]string{
|
||||
0: "APPEND",
|
||||
1: "FORGET",
|
||||
0: "FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_APPEND",
|
||||
1: "FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_FORGET",
|
||||
}
|
||||
|
||||
var FileDownloadProgressUpdateType_value = map[string]int32{
|
||||
"APPEND": 0,
|
||||
"FORGET": 1,
|
||||
"FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_APPEND": 0,
|
||||
"FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_FORGET": 1,
|
||||
}
|
||||
|
||||
func (x FileDownloadProgressUpdateType) String() string {
|
||||
@@ -210,9 +211,9 @@ func (FileDownloadProgressUpdateType) EnumDescriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
type Hello struct {
|
||||
DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
|
||||
ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
|
||||
ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
|
||||
DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"deviceName" xml:"deviceName"`
|
||||
ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"clientName" xml:"clientName"`
|
||||
ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"clientVersion" xml:"clientVersion"`
|
||||
}
|
||||
|
||||
func (m *Hello) Reset() { *m = Hello{} }
|
||||
@@ -249,8 +250,8 @@ func (m *Hello) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Hello proto.InternalMessageInfo
|
||||
|
||||
type Header struct {
|
||||
Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type,omitempty"`
|
||||
Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression,omitempty"`
|
||||
Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type" xml:"type"`
|
||||
Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression" xml:"compression"`
|
||||
}
|
||||
|
||||
func (m *Header) Reset() { *m = Header{} }
|
||||
@@ -287,7 +288,7 @@ func (m *Header) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Header proto.InternalMessageInfo
|
||||
|
||||
type ClusterConfig struct {
|
||||
Folders []Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders"`
|
||||
Folders []Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders" xml:"folder"`
|
||||
}
|
||||
|
||||
func (m *ClusterConfig) Reset() { *m = ClusterConfig{} }
|
||||
@@ -324,14 +325,14 @@ func (m *ClusterConfig) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_ClusterConfig proto.InternalMessageInfo
|
||||
|
||||
type Folder struct {
|
||||
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
|
||||
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
|
||||
IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignore_permissions,omitempty"`
|
||||
IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignore_delete,omitempty"`
|
||||
DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disable_temp_indexes,omitempty"`
|
||||
Paused bool `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"`
|
||||
Devices []Device `protobuf:"bytes,16,rep,name=devices,proto3" json:"devices"`
|
||||
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" xml:"id"`
|
||||
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label" xml:"label"`
|
||||
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"readOnly" xml:"readOnly"`
|
||||
IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignorePermissions" xml:"ignorePermissions"`
|
||||
IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignoreDelete" xml:"ignoreDelete"`
|
||||
DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disableTempIndexes" xml:"disableTempIndexes"`
|
||||
Paused bool `protobuf:"varint,7,opt,name=paused,proto3" json:"paused" xml:"paused"`
|
||||
Devices []Device `protobuf:"bytes,16,rep,name=devices,proto3" json:"devices" xml:"device"`
|
||||
}
|
||||
|
||||
func (m *Folder) Reset() { *m = Folder{} }
|
||||
@@ -368,15 +369,15 @@ func (m *Folder) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Folder proto.InternalMessageInfo
|
||||
|
||||
type Device struct {
|
||||
ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
|
||||
Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression,omitempty"`
|
||||
CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"cert_name,omitempty"`
|
||||
MaxSequence int64 `protobuf:"varint,6,opt,name=max_sequence,json=maxSequence,proto3" json:"max_sequence,omitempty"`
|
||||
Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer,omitempty"`
|
||||
IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"index_id"`
|
||||
SkipIntroductionRemovals bool `protobuf:"varint,9,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skip_introduction_removals,omitempty"`
|
||||
ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id" xml:"id"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name"`
|
||||
Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses" xml:"address"`
|
||||
Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression" xml:"compression"`
|
||||
CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"certName" xml:"certName"`
|
||||
MaxSequence int64 `protobuf:"varint,6,opt,name=max_sequence,json=maxSequence,proto3" json:"maxSequence" xml:"maxSequence"`
|
||||
Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer" xml:"introducer"`
|
||||
IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"indexId" xml:"indexId"`
|
||||
SkipIntroductionRemovals bool `protobuf:"varint,9,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skipIntroductionRemovals" xml:"skipIntroductionRemovals"`
|
||||
}
|
||||
|
||||
func (m *Device) Reset() { *m = Device{} }
|
||||
@@ -413,8 +414,8 @@ func (m *Device) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Device proto.InternalMessageInfo
|
||||
|
||||
type Index struct {
|
||||
Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
|
||||
Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
|
||||
Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
|
||||
Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files" xml:"file"`
|
||||
}
|
||||
|
||||
func (m *Index) Reset() { *m = Index{} }
|
||||
@@ -451,8 +452,8 @@ func (m *Index) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Index proto.InternalMessageInfo
|
||||
|
||||
type IndexUpdate struct {
|
||||
Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
|
||||
Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
|
||||
Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
|
||||
Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files" xml:"file"`
|
||||
}
|
||||
|
||||
func (m *IndexUpdate) Reset() { *m = IndexUpdate{} }
|
||||
@@ -489,30 +490,30 @@ func (m *IndexUpdate) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_IndexUpdate proto.InternalMessageInfo
|
||||
|
||||
type FileInfo struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
||||
ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
|
||||
ModifiedBy ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=ShortID" json:"modified_by"`
|
||||
Version Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version"`
|
||||
Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
|
||||
Blocks []BlockInfo `protobuf:"bytes,16,rep,name=blocks,proto3" json:"blocks"`
|
||||
SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
|
||||
BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
|
||||
Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
|
||||
Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
||||
ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
|
||||
RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" xml:"name"`
|
||||
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size" xml:"size"`
|
||||
ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modifiedS" xml:"modifiedS"`
|
||||
ModifiedBy ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=ShortID" json:"modifiedBy" xml:"modifiedBy"`
|
||||
Version Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version" xml:"version"`
|
||||
Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
|
||||
Blocks []BlockInfo `protobuf:"bytes,16,rep,name=blocks,proto3" json:"blocks" xml:"block"`
|
||||
SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlinkTarget" xml:"symlinkTarget"`
|
||||
BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
|
||||
Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type" xml:"type"`
|
||||
Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions" xml:"permissions"`
|
||||
ModifiedNs int `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3,casttype=int" json:"modifiedNs" xml:"modifiedNs"`
|
||||
RawBlockSize int `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
|
||||
// The local_flags fields stores flags that are relevant to the local
|
||||
// host only. It is not part of the protocol, doesn't get sent or
|
||||
// received (we make sure to zero it), nonetheless we need it on our
|
||||
// struct and to be able to serialize it to/from the database.
|
||||
LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
|
||||
LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
|
||||
// The version_hash is an implementation detail and not part of the wire
|
||||
// format.
|
||||
VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"`
|
||||
Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
|
||||
NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
|
||||
VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
|
||||
Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
|
||||
RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
|
||||
NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"noPermissions" xml:"noPermissions"`
|
||||
}
|
||||
|
||||
func (m *FileInfo) Reset() { *m = FileInfo{} }
|
||||
@@ -548,10 +549,10 @@ func (m *FileInfo) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_FileInfo proto.InternalMessageInfo
|
||||
|
||||
type BlockInfo struct {
|
||||
Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
WeakHash uint32 `protobuf:"varint,4,opt,name=weak_hash,json=weakHash,proto3" json:"weak_hash,omitempty"`
|
||||
Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash" xml:"hash"`
|
||||
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset" xml:"offset"`
|
||||
Size int `protobuf:"varint,2,opt,name=size,proto3,casttype=int" json:"size" xml:"size"`
|
||||
WeakHash uint32 `protobuf:"varint,4,opt,name=weak_hash,json=weakHash,proto3" json:"weakHash" xml:"weakHash"`
|
||||
}
|
||||
|
||||
func (m *BlockInfo) Reset() { *m = BlockInfo{} }
|
||||
@@ -587,7 +588,7 @@ func (m *BlockInfo) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_BlockInfo proto.InternalMessageInfo
|
||||
|
||||
type Vector struct {
|
||||
Counters []Counter `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters"`
|
||||
Counters []Counter `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters" xml:"counter"`
|
||||
}
|
||||
|
||||
func (m *Vector) Reset() { *m = Vector{} }
|
||||
@@ -624,8 +625,8 @@ func (m *Vector) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Vector proto.InternalMessageInfo
|
||||
|
||||
type Counter struct {
|
||||
ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id"`
|
||||
Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id" xml:"id"`
|
||||
Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value" xml:"value"`
|
||||
}
|
||||
|
||||
func (m *Counter) Reset() { *m = Counter{} }
|
||||
@@ -662,14 +663,14 @@ func (m *Counter) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Counter proto.InternalMessageInfo
|
||||
|
||||
type Request struct {
|
||||
ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
Size int32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
|
||||
Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"from_temporary,omitempty"`
|
||||
WeakHash uint32 `protobuf:"varint,8,opt,name=weak_hash,json=weakHash,proto3" json:"weak_hash,omitempty"`
|
||||
ID int `protobuf:"varint,1,opt,name=id,proto3,casttype=int" json:"id" xml:"id"`
|
||||
Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder" xml:"folder"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name" xml:"name"`
|
||||
Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset" xml:"offset"`
|
||||
Size int `protobuf:"varint,5,opt,name=size,proto3,casttype=int" json:"size" xml:"size"`
|
||||
Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash" xml:"hash"`
|
||||
FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"fromTemporary" xml:"fromTemporary"`
|
||||
WeakHash uint32 `protobuf:"varint,8,opt,name=weak_hash,json=weakHash,proto3" json:"weakHash" xml:"weakHash"`
|
||||
}
|
||||
|
||||
func (m *Request) Reset() { *m = Request{} }
|
||||
@@ -706,9 +707,9 @@ func (m *Request) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Request proto.InternalMessageInfo
|
||||
|
||||
type Response struct {
|
||||
ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code,omitempty"`
|
||||
ID int `protobuf:"varint,1,opt,name=id,proto3,casttype=int" json:"id" xml:"id"`
|
||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data" xml:"data"`
|
||||
Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code" xml:"code"`
|
||||
}
|
||||
|
||||
func (m *Response) Reset() { *m = Response{} }
|
||||
@@ -745,8 +746,8 @@ func (m *Response) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Response proto.InternalMessageInfo
|
||||
|
||||
type DownloadProgress struct {
|
||||
Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
|
||||
Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates"`
|
||||
Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
|
||||
Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates" xml:"update"`
|
||||
}
|
||||
|
||||
func (m *DownloadProgress) Reset() { *m = DownloadProgress{} }
|
||||
@@ -783,11 +784,11 @@ func (m *DownloadProgress) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_DownloadProgress proto.InternalMessageInfo
|
||||
|
||||
type FileDownloadProgressUpdate struct {
|
||||
UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"update_type,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Version Vector `protobuf:"bytes,3,opt,name=version,proto3" json:"version"`
|
||||
BlockIndexes []int32 `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes,proto3" json:"block_indexes,omitempty"`
|
||||
BlockSize int32 `protobuf:"varint,5,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
|
||||
UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"updateType" xml:"updateType"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name"`
|
||||
Version Vector `protobuf:"bytes,3,opt,name=version,proto3" json:"version" xml:"version"`
|
||||
BlockIndexes []int `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes,proto3,casttype=int" json:"blockIndexes" xml:"blockIndexe"`
|
||||
BlockSize int `protobuf:"varint,5,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
|
||||
}
|
||||
|
||||
func (m *FileDownloadProgressUpdate) Reset() { *m = FileDownloadProgressUpdate{} }
|
||||
@@ -860,7 +861,7 @@ func (m *Ping) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_Ping proto.InternalMessageInfo
|
||||
|
||||
type Close struct {
|
||||
Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
|
||||
Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason" xml:"reason"`
|
||||
}
|
||||
|
||||
func (m *Close) Reset() { *m = Close{} }
|
||||
@@ -925,123 +926,169 @@ func init() {
|
||||
func init() { proto.RegisterFile("lib/protocol/bep.proto", fileDescriptor_311ef540e10d9705) }
|
||||
|
||||
var fileDescriptor_311ef540e10d9705 = []byte{
|
||||
// 1846 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x73, 0xdb, 0xc6,
|
||||
0xf5, 0x27, 0x48, 0xf0, 0xd7, 0x23, 0xa5, 0x40, 0x6b, 0x5b, 0x5f, 0x7c, 0x61, 0x9b, 0x84, 0x69,
|
||||
0x3b, 0x66, 0x34, 0xa9, 0xed, 0x26, 0x69, 0x3b, 0xed, 0xb4, 0x9d, 0xe1, 0x0f, 0x48, 0xe6, 0x54,
|
||||
0x26, 0xd5, 0x25, 0xe5, 0xd4, 0x39, 0x14, 0x03, 0x12, 0x4b, 0x09, 0x63, 0x10, 0xcb, 0x02, 0xa0,
|
||||
0x64, 0xe6, 0x4f, 0xe0, 0xa9, 0xc7, 0x5e, 0x38, 0x93, 0x99, 0x9c, 0xfa, 0x9f, 0xf8, 0xe8, 0xf6,
|
||||
0xd4, 0xe9, 0x41, 0xd3, 0xc8, 0x97, 0xf4, 0xd6, 0x4b, 0xaf, 0x9d, 0xce, 0xee, 0x02, 0x24, 0x28,
|
||||
0xc5, 0x99, 0x1c, 0x7a, 0xdb, 0x7d, 0xef, 0xb3, 0x6f, 0xf7, 0x7d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f2, 0xd9, 0x4e, 0xb6, 0xb4,
|
||||
0xe1, 0xfb, 0xd4, 0x6f, 0x51, 0x9b, 0x60, 0x0e, 0xa8, 0x4d, 0x41, 0x69, 0xd3, 0x73, 0xcf, 0xa5,
|
||||
0x96, 0x7d, 0xe4, 0xd3, 0x13, 0xf6, 0xca, 0xbc, 0x57, 0x2d, 0xdb, 0x90, 0x9f, 0x71, 0x3d, 0x8d,
|
||||
0xf5, 0xf2, 0xc1, 0x66, 0xc7, 0x5e, 0x0d, 0x24, 0xc4, 0x37, 0xd6, 0xa2, 0x68, 0x69, 0xed, 0xdf,
|
||||
0x12, 0x68, 0xef, 0x47, 0xa3, 0x0e, 0x94, 0x04, 0xd2, 0x4c, 0x7c, 0xac, 0xea, 0x3f, 0x64, 0x23,
|
||||
0x2e, 0x16, 0x30, 0x5b, 0x8d, 0xbf, 0xf3, 0x55, 0x4e, 0x68, 0x67, 0xe6, 0x87, 0x69, 0xe7, 0x23,
|
||||
0xd8, 0x12, 0xaa, 0x11, 0xff, 0x41, 0x64, 0x3d, 0x53, 0xcf, 0x36, 0xd3, 0x4a, 0x0a, 0x97, 0x87,
|
||||
0xa2, 0xcd, 0xc4, 0x0f, 0xe4, 0xee, 0x86, 0xbc, 0x88, 0xea, 0x58, 0x8b, 0x49, 0x2d, 0x07, 0xf2,
|
||||
0x91, 0xe3, 0x9d, 0xd4, 0xaa, 0x90, 0x6d, 0xb9, 0x94, 0xdf, 0x67, 0xce, 0x27, 0x56, 0x40, 0xbd,
|
||||
0x98, 0x66, 0x31, 0xdb, 0xfb, 0x6b, 0x1a, 0x4a, 0x89, 0xef, 0x23, 0x7a, 0x0a, 0xdb, 0xad, 0xc3,
|
||||
0xe3, 0xfe, 0xc0, 0xc0, 0x66, 0xab, 0xd7, 0xdd, 0xef, 0x1c, 0x28, 0x29, 0xed, 0xce, 0x62, 0xa9,
|
||||
0xab, 0x93, 0x35, 0x68, 0xf3, 0x67, 0x58, 0x85, 0x6c, 0xa7, 0x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 0x35, 0x63, 0x84, 0x77, 0x7b, 0xa6, 0x81, 0x71, 0x0f,
|
||||
0xc7, 0x0c, 0xac, 0x9c, 0x5d, 0xca, 0x87, 0xe8, 0x1e, 0xe4, 0x0f, 0x8c, 0xae, 0x81, 0x3b, 0xad,
|
||||
0xb8, 0x31, 0x56, 0x90, 0x03, 0xe2, 0x11, 0xdf, 0x19, 0xa1, 0x8f, 0xa0, 0xdc, 0xed, 0x99, 0xfd,
|
||||
0xe3, 0xd6, 0xb3, 0x38, 0x75, 0xbe, 0x7f, 0x22, 0x54, 0x7f, 0x36, 0x3a, 0xe5, 0x7c, 0xee, 0xb1,
|
||||
0x1e, 0x7a, 0xd1, 0x38, 0xec, 0xb4, 0x05, 0x34, 0xa3, 0xa9, 0x8b, 0xa5, 0x7e, 0x73, 0x05, 0x8d,
|
||||
0xde, 0x70, 0x86, 0xdd, 0xb3, 0xa1, 0xf2, 0xfd, 0xba, 0x85, 0x74, 0xc8, 0x35, 0x8e, 0x8e, 0x8c,
|
||||
0x6e, 0x3b, 0x3e, 0xfd, 0xda, 0xd7, 0x98, 0x4e, 0x89, 0x67, 0x33, 0xc4, 0x7e, 0x0f, 0x1f, 0x18,
|
||||
0x83, 0xf8, 0xf0, 0x6b, 0xc4, 0x3e, 0x65, 0xff, 0xad, 0x66, 0xfd, 0xcd, 0x37, 0x95, 0xd4, 0xdb,
|
||||
0x6f, 0x2a, 0xa9, 0x37, 0x97, 0x15, 0xe9, 0xed, 0x65, 0x45, 0xfa, 0xc7, 0x65, 0x25, 0xf5, 0xed,
|
||||
0x65, 0x45, 0xfa, 0xe3, 0xbb, 0x4a, 0xea, 0xab, 0x77, 0x15, 0xe9, 0xed, 0xbb, 0x4a, 0xea, 0x6f,
|
||||
0xef, 0x2a, 0xa9, 0x61, 0x8e, 0x6b, 0xde, 0xa7, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x7a,
|
||||
0xfc, 0x00, 0x82, 0x0f, 0x00, 0x00,
|
||||
// 2584 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4d, 0x6c, 0xe3, 0xc6,
|
||||
0xf5, 0x17, 0xf5, 0x61, 0xcb, 0x63, 0x7b, 0x23, 0xcf, 0x7e, 0x29, 0xda, 0x8d, 0xa8, 0xff, 0xfc,
|
||||
0x37, 0xad, 0xe3, 0x34, 0xde, 0xc4, 0x49, 0xda, 0x34, 0x49, 0x13, 0xe8, 0x83, 0xb6, 0x95, 0xd8,
|
||||
0x92, 0x3b, 0xf2, 0x6e, 0xba, 0x8b, 0x16, 0x04, 0x2d, 0x8e, 0x6d, 0x62, 0x29, 0x52, 0x25, 0x65,
|
||||
0xef, 0x3a, 0xe8, 0xa9, 0xbd, 0x04, 0x3a, 0x14, 0x45, 0x4e, 0x45, 0x51, 0xa1, 0x69, 0x2f, 0xbd,
|
||||
0x15, 0xe8, 0xa1, 0x97, 0xdc, 0x7a, 0x29, 0x72, 0x5c, 0x04, 0x28, 0x50, 0xf4, 0x40, 0x20, 0xbb,
|
||||
0x97, 0x56, 0x47, 0x1d, 0x7b, 0x2a, 0xe6, 0x83, 0xe4, 0xd0, 0xb2, 0x03, 0x27, 0x39, 0xf4, 0xc6,
|
||||
0xf7, 0x7b, 0x1f, 0x1c, 0xce, 0xfb, 0xbd, 0x37, 0x6f, 0x24, 0x70, 0xcd, 0xb6, 0xf6, 0x6e, 0xf7,
|
||||
0x3d, 0x77, 0xe0, 0x76, 0x5d, 0xfb, 0xf6, 0x1e, 0xe9, 0xaf, 0x32, 0x01, 0xe6, 0x43, 0xac, 0x34,
|
||||
0x47, 0x1e, 0x0d, 0x38, 0x58, 0xfa, 0x7f, 0x8f, 0xf4, 0x5d, 0x9f, 0x9b, 0xef, 0x1d, 0xed, 0xdf,
|
||||
0x3e, 0x70, 0x0f, 0x5c, 0x26, 0xb0, 0x27, 0x6e, 0x84, 0x9e, 0x28, 0x20, 0xb7, 0x49, 0x6c, 0xdb,
|
||||
0x85, 0x75, 0x30, 0x6f, 0x92, 0x63, 0xab, 0x4b, 0x74, 0xc7, 0xe8, 0x91, 0xa2, 0x52, 0x51, 0x96,
|
||||
0xe7, 0x6a, 0x68, 0x1c, 0xa8, 0x80, 0xc3, 0x2d, 0xa3, 0x47, 0x26, 0x81, 0x5a, 0x78, 0xd4, 0xb3,
|
||||
0xdf, 0x44, 0x31, 0x84, 0xb0, 0xa4, 0xa7, 0x41, 0xba, 0xb6, 0x45, 0x9c, 0x01, 0x0f, 0x92, 0x8e,
|
||||
0x83, 0x70, 0x38, 0x11, 0x24, 0x86, 0x10, 0x96, 0xf4, 0xb0, 0x0d, 0x2e, 0x89, 0x20, 0xc7, 0xc4,
|
||||
0xf3, 0x2d, 0xd7, 0x29, 0x66, 0x58, 0x9c, 0xe5, 0x71, 0xa0, 0x2e, 0x72, 0xcd, 0x5d, 0xae, 0x98,
|
||||
0x04, 0xea, 0x65, 0x29, 0x94, 0x40, 0x11, 0x4e, 0x5a, 0xa1, 0x3f, 0x2b, 0x60, 0x66, 0x93, 0x18,
|
||||
0x26, 0xf1, 0x60, 0x15, 0x64, 0x07, 0x27, 0x7d, 0xfe, 0x79, 0x97, 0xd6, 0xae, 0xae, 0x86, 0x1b,
|
||||
0xb7, 0xba, 0x4d, 0x7c, 0xdf, 0x38, 0x20, 0xbb, 0x27, 0x7d, 0x52, 0xbb, 0x36, 0x0e, 0x54, 0x66,
|
||||
0x36, 0x09, 0x54, 0xc0, 0xe2, 0x53, 0x01, 0x61, 0x86, 0x41, 0x13, 0xcc, 0x77, 0xdd, 0x5e, 0xdf,
|
||||
0x23, 0x3e, 0x5b, 0x5b, 0x9a, 0x45, 0xba, 0x39, 0x15, 0xa9, 0x1e, 0xdb, 0xd4, 0x6e, 0x8d, 0x03,
|
||||
0x55, 0x76, 0x9a, 0x04, 0xea, 0x12, 0x5f, 0x77, 0x8c, 0x21, 0x2c, 0x5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c, 0xbb, 0x13, 0x2b, 0x27, 0x81, 0x7a, 0x9d,
|
||||
0xaf, 0xfa, 0xb4, 0x06, 0xe1, 0x69, 0x6b, 0xf8, 0x3e, 0x58, 0x14, 0x2f, 0x30, 0x89, 0x4d, 0x06,
|
||||
0xa4, 0x98, 0x63, 0xb1, 0xbf, 0x35, 0x0e, 0xd4, 0x05, 0xae, 0x68, 0x30, 0x7c, 0x12, 0xa8, 0x50,
|
||||
0x0a, 0xcb, 0x41, 0x84, 0x13, 0x36, 0xd0, 0x04, 0x57, 0x4c, 0xcb, 0x37, 0xf6, 0x6c, 0xa2, 0x0f,
|
||||
0x48, 0xaf, 0xaf, 0x5b, 0x8e, 0x49, 0x1e, 0x11, 0xbf, 0x38, 0xc3, 0x62, 0xae, 0x8d, 0x03, 0x15,
|
||||
0x0a, 0xfd, 0x2e, 0xe9, 0xf5, 0x9b, 0x5c, 0x3b, 0x09, 0xd4, 0x22, 0xaf, 0xa9, 0x29, 0x15, 0xc2,
|
||||
0x67, 0xd8, 0xc3, 0x35, 0x30, 0xd3, 0x37, 0x8e, 0x7c, 0x62, 0x16, 0x67, 0x59, 0xdc, 0xd2, 0x38,
|
||||
0x50, 0x05, 0x12, 0x25, 0x9c, 0x8b, 0x08, 0x0b, 0x9c, 0x92, 0x87, 0x57, 0xa9, 0x5f, 0x2c, 0x9c,
|
||||
0x26, 0x4f, 0x83, 0x29, 0x62, 0xf2, 0x08, 0xc3, 0x28, 0x16, 0x97, 0x11, 0x0e, 0x15, 0xe8, 0x6f,
|
||||
0x39, 0x30, 0xc3, 0x9d, 0x60, 0x2d, 0x22, 0xcf, 0x42, 0x6d, 0x8d, 0x06, 0xf8, 0x67, 0xa0, 0xe6,
|
||||
0xb9, 0xae, 0xd9, 0x38, 0x8f, 0x4c, 0x1f, 0x3d, 0xbe, 0xa5, 0x48, 0x84, 0x5a, 0x01, 0x59, 0xa9,
|
||||
0x59, 0xb0, 0xda, 0x73, 0x78, 0x9b, 0xe0, 0xb5, 0xe7, 0xb0, 0x06, 0xc1, 0x30, 0xf8, 0x36, 0x98,
|
||||
0x33, 0x4c, 0x93, 0xd6, 0x08, 0xf1, 0x8b, 0x99, 0x4a, 0x86, 0x72, 0x76, 0x1c, 0xa8, 0x31, 0x38,
|
||||
0x09, 0xd4, 0x45, 0xe6, 0x25, 0x10, 0x84, 0x63, 0x1d, 0xfc, 0x49, 0xb2, 0x72, 0xb3, 0xa7, 0x7b,
|
||||
0xc0, 0x37, 0x2b, 0x59, 0xca, 0xf4, 0x2e, 0xf1, 0x44, 0xeb, 0xcb, 0xf1, 0x82, 0xa2, 0x4c, 0xa7,
|
||||
0xa0, 0x68, 0x7c, 0x9c, 0xe9, 0x21, 0x80, 0x70, 0xa4, 0x83, 0x1b, 0x60, 0xa1, 0x67, 0x3c, 0xd2,
|
||||
0x7d, 0xf2, 0xd3, 0x23, 0xe2, 0x74, 0x09, 0xe3, 0x4c, 0x86, 0xaf, 0xa2, 0x67, 0x3c, 0xea, 0x08,
|
||||
0x38, 0x5a, 0x85, 0x84, 0x21, 0x2c, 0x5b, 0xc0, 0x1a, 0x00, 0x96, 0x33, 0xf0, 0x5c, 0xf3, 0xa8,
|
||||
0x4b, 0x3c, 0x41, 0x11, 0xd6, 0x81, 0x63, 0x34, 0xea, 0xc0, 0x31, 0x84, 0xb0, 0xa4, 0x87, 0x07,
|
||||
0x20, 0xcf, 0xb8, 0xab, 0x5b, 0x66, 0x31, 0x5f, 0x51, 0x96, 0xb3, 0xb5, 0x2d, 0x91, 0xdc, 0x59,
|
||||
0xc6, 0x42, 0x96, 0xdb, 0xf0, 0x91, 0x72, 0x86, 0x59, 0x37, 0xcd, 0x68, 0xf7, 0x85, 0x4c, 0xfb,
|
||||
0x46, 0x68, 0xf6, 0x9b, 0xf8, 0x11, 0x87, 0xf6, 0xf0, 0x67, 0xa0, 0xe4, 0x3f, 0xb0, 0x68, 0xa5,
|
||||
0xf0, 0x77, 0x0f, 0x2c, 0xd7, 0xd1, 0x3d, 0xd2, 0x73, 0x8f, 0x0d, 0xdb, 0x2f, 0xce, 0xb1, 0xc5,
|
||||
0xbf, 0x33, 0x0e, 0xd4, 0x22, 0xb5, 0x6a, 0x4a, 0x46, 0x58, 0xd8, 0x4c, 0x02, 0xb5, 0xcc, 0xde,
|
||||
0x78, 0x9e, 0x01, 0xc2, 0xe7, 0xfa, 0xa2, 0x9f, 0x2b, 0x20, 0xc7, 0x96, 0x44, 0x6b, 0x8a, 0xb7,
|
||||
0x46, 0xd1, 0x08, 0x59, 0x4d, 0x71, 0x64, 0xaa, 0x89, 0x0a, 0x1c, 0x6a, 0x20, 0xb7, 0x6f, 0xd9,
|
||||
0xc4, 0x2f, 0xa6, 0x59, 0x45, 0x41, 0xa9, 0x1d, 0x5b, 0x36, 0x69, 0x3a, 0xfb, 0x6e, 0xed, 0x86,
|
||||
0xa8, 0x29, 0x6e, 0x18, 0x31, 0x9a, 0x4a, 0x08, 0x73, 0x10, 0x7d, 0xa4, 0x80, 0x79, 0xb6, 0x88,
|
||||
0x3b, 0x7d, 0xd3, 0x18, 0x90, 0xff, 0xe5, 0x52, 0x7e, 0x0f, 0x40, 0x3e, 0x74, 0x88, 0xca, 0x52,
|
||||
0xb9, 0x40, 0x59, 0xae, 0x80, 0xac, 0x6f, 0x7d, 0x48, 0x58, 0x7b, 0xcf, 0x70, 0x5b, 0x2a, 0x47,
|
||||
0xb6, 0x54, 0x40, 0x98, 0x61, 0xf0, 0x5d, 0x00, 0x7a, 0xae, 0x69, 0xed, 0x5b, 0xc4, 0xd4, 0x7d,
|
||||
0x56, 0x26, 0x99, 0x5a, 0x85, 0xd6, 0x70, 0x88, 0x76, 0x26, 0x81, 0xfa, 0x0c, 0x27, 0x79, 0x88,
|
||||
0x20, 0x1c, 0x6b, 0x69, 0x15, 0x47, 0x01, 0xf6, 0x4e, 0x8a, 0x0b, 0x8c, 0x9f, 0x6f, 0x87, 0xfc,
|
||||
0xec, 0x1c, 0xba, 0xde, 0x80, 0x91, 0x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x8f, 0x18, 0xf6, 0x28, 0x1d, 0x31, 0x4c, 0xa6, 0x47, 0x8c, 0x64, 0x89, 0x43,
|
||||
0x3b, 0xca, 0x78, 0xc7, 0x4d, 0x8c, 0x8d, 0x79, 0x16, 0x9a, 0x31, 0xde, 0x71, 0x93, 0x23, 0x23,
|
||||
0x67, 0x7c, 0x02, 0x45, 0x38, 0x69, 0xf5, 0x66, 0xf6, 0xd7, 0x9f, 0xa8, 0x29, 0xf4, 0x85, 0x02,
|
||||
0xe6, 0xa2, 0xea, 0xa3, 0x8d, 0x8f, 0x6d, 0x59, 0x86, 0xed, 0x18, 0x23, 0xea, 0x21, 0xdf, 0x2a,
|
||||
0x4e, 0xd4, 0x43, 0xb6, 0x47, 0x0c, 0xa3, 0x8d, 0xdd, 0xdd, 0xdf, 0xf7, 0xc9, 0x80, 0xb5, 0xd4,
|
||||
0x0c, 0x6f, 0xec, 0x1c, 0x89, 0x1a, 0x3b, 0x17, 0x11, 0x16, 0x38, 0x7c, 0x45, 0x34, 0xd6, 0x34,
|
||||
0xa3, 0xd0, 0x73, 0x67, 0x37, 0xd6, 0x90, 0x81, 0xbc, 0xbf, 0xbe, 0x05, 0xe6, 0x1e, 0x12, 0xe3,
|
||||
0x01, 0x4f, 0x25, 0xaf, 0x06, 0xd6, 0x72, 0x28, 0x28, 0xd2, 0xc8, 0x5b, 0x4e, 0x08, 0x20, 0x1c,
|
||||
0xe9, 0xc4, 0x37, 0xde, 0x07, 0x33, 0xbc, 0xd3, 0xc1, 0x1d, 0x90, 0xef, 0xba, 0x47, 0xce, 0x20,
|
||||
0xbe, 0x75, 0x2c, 0xc9, 0xe3, 0x12, 0xd3, 0xd4, 0xfe, 0x4f, 0xb4, 0xa0, 0xc8, 0x34, 0xca, 0x91,
|
||||
0x00, 0xe8, 0x9c, 0x23, 0x54, 0xe8, 0x17, 0x0a, 0x98, 0x15, 0x8e, 0x70, 0x33, 0x9a, 0x1e, 0xb3,
|
||||
0xb5, 0x37, 0x4e,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36, 0xb8, 0x57, 0xa6, 0x54, 0x1c, 0x8e, 0x2a, 0x57, 0x22, 0x2f, 0x71, 0x71, 0xa0, 0x6e,
|
||||
0x2b, 0x9f, 0x2b, 0xa0, 0xfc, 0xe5, 0x87, 0x17, 0xfc, 0x00, 0xbc, 0xc0, 0xf6, 0x6b, 0xaa, 0x15,
|
||||
0x88, 0xbe, 0xc5, 0xf7, 0xb0, 0xba, 0xb3, 0xa3, 0xb5, 0x1a, 0x85, 0x54, 0x69, 0x79, 0x38, 0xaa,
|
||||
0xdc, 0xfa, 0xf2, 0x90, 0xd5, 0x7e, 0x9f, 0x38, 0xe6, 0x05, 0x03, 0xaf, 0xb7, 0xf1, 0x86, 0xb6,
|
||||
0x5b, 0x50, 0x2e, 0x12, 0x78, 0xdd, 0xa5, 0x37, 0xf5, 0xda, 0xf6, 0x67, 0x5f, 0x94, 0x53, 0x8f,
|
||||
0xbf, 0x28, 0xa7, 0x3e, 0x7b, 0x52, 0x56, 0x1e, 0x3f, 0x29, 0x2b, 0xbf, 0x7a, 0x5a, 0x4e, 0x7d,
|
||||
0xf2, 0xb4, 0xac, 0x3c, 0x7e, 0x5a, 0x4e, 0xfd, 0xe3, 0x69, 0x39, 0x75, 0xff, 0xc5, 0x03, 0x6b,
|
||||
0x70, 0x78, 0xb4, 0xb7, 0xda, 0x75, 0x7b, 0xb7, 0xfd, 0x13, 0xa7, 0x3b, 0x38, 0xb4, 0x9c, 0x03,
|
||||
0xe9, 0x49, 0xfe, 0xd7, 0x69, 0x6f, 0x86, 0x3d, 0xbd, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0xf3, 0xce, 0x28, 0x00, 0x8c, 0x1a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Hello) Marshal() (dAtA []byte, err error) {
|
||||
@@ -3768,7 +3815,7 @@ func (m *FileInfo) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ModifiedNs |= int32(b&0x7F) << shift
|
||||
m.ModifiedNs |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -3806,7 +3853,7 @@ func (m *FileInfo) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.RawBlockSize |= int32(b&0x7F) << shift
|
||||
m.RawBlockSize |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -4050,7 +4097,7 @@ func (m *BlockInfo) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Size |= int32(b&0x7F) << shift
|
||||
m.Size |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -4353,7 +4400,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ID |= int32(b&0x7F) << shift
|
||||
m.ID |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -4455,7 +4502,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Size |= int32(b&0x7F) << shift
|
||||
m.Size |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -4600,7 +4647,7 @@ func (m *Response) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ID |= int32(b&0x7F) << shift
|
||||
m.ID |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -4916,7 +4963,7 @@ func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType == 0 {
|
||||
var v int32
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowBep
|
||||
@@ -4926,7 +4973,7 @@ func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int32(b&0x7F) << shift
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -4967,10 +5014,10 @@ func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
elementCount = count
|
||||
if elementCount != 0 && len(m.BlockIndexes) == 0 {
|
||||
m.BlockIndexes = make([]int32, 0, elementCount)
|
||||
m.BlockIndexes = make([]int, 0, elementCount)
|
||||
}
|
||||
for iNdEx < postIndex {
|
||||
var v int32
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowBep
|
||||
@@ -4980,7 +5027,7 @@ func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int32(b&0x7F) << shift
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -5004,7 +5051,7 @@ func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.BlockSize |= int32(b&0x7F) << shift
|
||||
m.BlockSize |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ func (f FileInfo) String() string {
|
||||
case FileInfoTypeFile:
|
||||
return fmt.Sprintf("File{Name:%q, Sequence:%d, Permissions:0%o, ModTime:%v, Version:%v, VersionHash:%x, Length:%d, Deleted:%v, Invalid:%v, LocalFlags:0x%x, NoPermissions:%v, BlockSize:%d, Blocks:%v, BlocksHash:%x}",
|
||||
f.Name, f.Sequence, f.Permissions, f.ModTime(), f.Version, f.VersionHash, f.Size, f.Deleted, f.RawInvalid, f.LocalFlags, f.NoPermissions, f.RawBlockSize, f.Blocks, f.BlocksHash)
|
||||
case FileInfoTypeSymlink, FileInfoTypeDeprecatedSymlinkDirectory, FileInfoTypeDeprecatedSymlinkFile:
|
||||
case FileInfoTypeSymlink, FileInfoTypeSymlinkDirectory, FileInfoTypeSymlinkFile:
|
||||
return fmt.Sprintf("Symlink{Name:%q, Type:%v, Sequence:%d, Version:%v, VersionHash:%x, Deleted:%v, Invalid:%v, LocalFlags:0x%x, NoPermissions:%v, SymlinkTarget:%q}",
|
||||
f.Name, f.Type, f.Sequence, f.Version, f.VersionHash, f.Deleted, f.RawInvalid, f.LocalFlags, f.NoPermissions, f.SymlinkTarget)
|
||||
default:
|
||||
@@ -99,7 +99,7 @@ func (f FileInfo) ShouldConflict() bool {
|
||||
|
||||
func (f FileInfo) IsSymlink() bool {
|
||||
switch f.Type {
|
||||
case FileInfoTypeSymlink, FileInfoTypeDeprecatedSymlinkDirectory, FileInfoTypeDeprecatedSymlinkFile:
|
||||
case FileInfoTypeSymlink, FileInfoTypeSymlinkDirectory, FileInfoTypeSymlinkFile:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
@@ -9,20 +9,20 @@ const (
|
||||
)
|
||||
|
||||
var compressionMarshal = map[Compression]string{
|
||||
CompressNever: "never",
|
||||
CompressMetadata: "metadata",
|
||||
CompressAlways: "always",
|
||||
CompressionNever: "never",
|
||||
CompressionMetadata: "metadata",
|
||||
CompressionAlways: "always",
|
||||
}
|
||||
|
||||
var compressionUnmarshal = map[string]Compression{
|
||||
// Legacy
|
||||
"false": CompressNever,
|
||||
"true": CompressMetadata,
|
||||
"false": CompressionNever,
|
||||
"true": CompressionMetadata,
|
||||
|
||||
// Current
|
||||
"never": CompressNever,
|
||||
"metadata": CompressMetadata,
|
||||
"always": CompressAlways,
|
||||
"never": CompressionNever,
|
||||
"metadata": CompressionMetadata,
|
||||
"always": CompressionAlways,
|
||||
}
|
||||
|
||||
func (c Compression) GoString() string {
|
||||
|
||||
@@ -9,21 +9,21 @@ func TestCompressionMarshal(t *testing.T) {
|
||||
s string
|
||||
c Compression
|
||||
}{
|
||||
{"true", CompressMetadata},
|
||||
{"false", CompressNever},
|
||||
{"never", CompressNever},
|
||||
{"metadata", CompressMetadata},
|
||||
{"always", CompressAlways},
|
||||
{"whatever", CompressMetadata},
|
||||
{"true", CompressionMetadata},
|
||||
{"false", CompressionNever},
|
||||
{"never", CompressionNever},
|
||||
{"metadata", CompressionMetadata},
|
||||
{"always", CompressionAlways},
|
||||
{"whatever", CompressionMetadata},
|
||||
}
|
||||
|
||||
mTestcases := []struct {
|
||||
s string
|
||||
c Compression
|
||||
}{
|
||||
{"never", CompressNever},
|
||||
{"metadata", CompressMetadata},
|
||||
{"always", CompressAlways},
|
||||
{"never", CompressionNever},
|
||||
{"metadata", CompressionMetadata},
|
||||
{"always", CompressionAlways},
|
||||
}
|
||||
|
||||
var c Compression
|
||||
|
||||
+11
-19
@@ -16,14 +16,6 @@ type HelloIntf interface {
|
||||
Marshal() ([]byte, error)
|
||||
}
|
||||
|
||||
// The HelloResult is the non version specific interpretation of the other
|
||||
// side's Hello message.
|
||||
type HelloResult struct {
|
||||
DeviceName string
|
||||
ClientName string
|
||||
ClientVersion string
|
||||
}
|
||||
|
||||
var (
|
||||
// ErrTooOldVersion is returned by ExchangeHello when the other side
|
||||
// speaks an older, incompatible version of the protocol.
|
||||
@@ -33,9 +25,9 @@ var (
|
||||
ErrUnknownMagic = errors.New("the remote device speaks an unknown (newer?) version of the protocol")
|
||||
)
|
||||
|
||||
func ExchangeHello(c io.ReadWriter, h HelloIntf) (HelloResult, error) {
|
||||
func ExchangeHello(c io.ReadWriter, h HelloIntf) (Hello, error) {
|
||||
if err := writeHello(c, h); err != nil {
|
||||
return HelloResult{}, err
|
||||
return Hello{}, err
|
||||
}
|
||||
return readHello(c)
|
||||
}
|
||||
@@ -51,41 +43,41 @@ func IsVersionMismatch(err error) bool {
|
||||
}
|
||||
}
|
||||
|
||||
func readHello(c io.Reader) (HelloResult, error) {
|
||||
func readHello(c io.Reader) (Hello, error) {
|
||||
header := make([]byte, 4)
|
||||
if _, err := io.ReadFull(c, header); err != nil {
|
||||
return HelloResult{}, err
|
||||
return Hello{}, err
|
||||
}
|
||||
|
||||
switch binary.BigEndian.Uint32(header) {
|
||||
case HelloMessageMagic:
|
||||
// This is a v0.14 Hello message in proto format
|
||||
if _, err := io.ReadFull(c, header[:2]); err != nil {
|
||||
return HelloResult{}, err
|
||||
return Hello{}, err
|
||||
}
|
||||
msgSize := binary.BigEndian.Uint16(header[:2])
|
||||
if msgSize > 32767 {
|
||||
return HelloResult{}, errors.New("hello message too big")
|
||||
return Hello{}, errors.New("hello message too big")
|
||||
}
|
||||
buf := make([]byte, msgSize)
|
||||
if _, err := io.ReadFull(c, buf); err != nil {
|
||||
return HelloResult{}, err
|
||||
return Hello{}, err
|
||||
}
|
||||
|
||||
var hello Hello
|
||||
if err := hello.Unmarshal(buf); err != nil {
|
||||
return HelloResult{}, err
|
||||
return Hello{}, err
|
||||
}
|
||||
return HelloResult(hello), nil
|
||||
return Hello(hello), nil
|
||||
|
||||
case 0x00010001, 0x00010000, Version13HelloMagic:
|
||||
// This is the first word of an older cluster config message or an
|
||||
// old magic number. (Version 0, message ID 1, message type 0,
|
||||
// compression enabled or disabled)
|
||||
return HelloResult{}, ErrTooOldVersion
|
||||
return Hello{}, ErrTooOldVersion
|
||||
}
|
||||
|
||||
return HelloResult{}, ErrUnknownMagic
|
||||
return Hello{}, ErrUnknownMagic
|
||||
}
|
||||
|
||||
func writeHello(c io.Writer, h HelloIntf) error {
|
||||
|
||||
+32
-29
@@ -153,12 +153,12 @@ type rawConnection struct {
|
||||
cr *countingReader
|
||||
cw *countingWriter
|
||||
|
||||
awaiting map[int32]chan asyncResult
|
||||
awaiting map[int]chan asyncResult
|
||||
awaitingMut sync.Mutex
|
||||
|
||||
idxMut sync.Mutex // ensures serialization of Index calls
|
||||
|
||||
nextID int32
|
||||
nextID int
|
||||
nextIDMut sync.Mutex
|
||||
|
||||
inbox chan message
|
||||
@@ -213,7 +213,7 @@ func NewConnection(deviceID DeviceID, reader io.Reader, writer io.Writer, receiv
|
||||
receiver: nativeModel{receiver},
|
||||
cr: cr,
|
||||
cw: cw,
|
||||
awaiting: make(map[int32]chan asyncResult),
|
||||
awaiting: make(map[int]chan asyncResult),
|
||||
inbox: make(chan message),
|
||||
outbox: make(chan asyncMessage),
|
||||
closeBox: make(chan asyncMessage),
|
||||
@@ -301,7 +301,7 @@ func (c *rawConnection) Request(ctx context.Context, folder string, name string,
|
||||
Folder: folder,
|
||||
Name: name,
|
||||
Offset: offset,
|
||||
Size: int32(size),
|
||||
Size: size,
|
||||
Hash: hash,
|
||||
WeakHash: weakHash,
|
||||
FromTemporary: fromTemporary,
|
||||
@@ -322,11 +322,9 @@ func (c *rawConnection) Request(ctx context.Context, folder string, name string,
|
||||
}
|
||||
|
||||
// ClusterConfig sends the cluster configuration message to the peer.
|
||||
// It must be called just once (as per BEP), otherwise it will panic.
|
||||
func (c *rawConnection) ClusterConfig(config ClusterConfig) {
|
||||
select {
|
||||
case c.clusterConfigBox <- &config:
|
||||
close(c.clusterConfigBox)
|
||||
case <-c.closed:
|
||||
}
|
||||
}
|
||||
@@ -386,13 +384,12 @@ func (c *rawConnection) dispatcherLoop() (err error) {
|
||||
switch msg := msg.(type) {
|
||||
case *ClusterConfig:
|
||||
l.Debugln("read ClusterConfig message")
|
||||
if state != stateInitial {
|
||||
return fmt.Errorf("protocol error: cluster config message in state %d", state)
|
||||
if state == stateInitial {
|
||||
state = stateReady
|
||||
}
|
||||
if err := c.receiver.ClusterConfig(c.id, *msg); err != nil {
|
||||
return errors.Wrap(err, "receiver error")
|
||||
}
|
||||
state = stateReady
|
||||
|
||||
case *Index:
|
||||
l.Debugln("read Index message")
|
||||
@@ -625,7 +622,7 @@ func checkFilename(name string) error {
|
||||
}
|
||||
|
||||
func (c *rawConnection) handleRequest(req Request) {
|
||||
res, err := c.receiver.Request(c.id, req.Folder, req.Name, req.Size, req.Offset, req.Hash, req.WeakHash, req.FromTemporary)
|
||||
res, err := c.receiver.Request(c.id, req.Folder, req.Name, int32(req.Size), req.Offset, req.Hash, req.WeakHash, req.FromTemporary)
|
||||
if err != nil {
|
||||
c.send(context.Background(), &Response{
|
||||
ID: req.ID,
|
||||
@@ -683,6 +680,12 @@ func (c *rawConnection) writerLoop() {
|
||||
}
|
||||
for {
|
||||
select {
|
||||
case cc := <-c.clusterConfigBox:
|
||||
err := c.writeMessage(cc)
|
||||
if err != nil {
|
||||
c.internalClose(err)
|
||||
return
|
||||
}
|
||||
case hm := <-c.outbox:
|
||||
err := c.writeMessage(hm.msg)
|
||||
if hm.done != nil {
|
||||
@@ -797,21 +800,21 @@ func (c *rawConnection) writeUncompressedMessage(msg message) error {
|
||||
func (c *rawConnection) typeOf(msg message) MessageType {
|
||||
switch msg.(type) {
|
||||
case *ClusterConfig:
|
||||
return messageTypeClusterConfig
|
||||
return MessageTypeClusterConfig
|
||||
case *Index:
|
||||
return messageTypeIndex
|
||||
return MessageTypeIndex
|
||||
case *IndexUpdate:
|
||||
return messageTypeIndexUpdate
|
||||
return MessageTypeIndexUpdate
|
||||
case *Request:
|
||||
return messageTypeRequest
|
||||
return MessageTypeRequest
|
||||
case *Response:
|
||||
return messageTypeResponse
|
||||
return MessageTypeResponse
|
||||
case *DownloadProgress:
|
||||
return messageTypeDownloadProgress
|
||||
return MessageTypeDownloadProgress
|
||||
case *Ping:
|
||||
return messageTypePing
|
||||
return MessageTypePing
|
||||
case *Close:
|
||||
return messageTypeClose
|
||||
return MessageTypeClose
|
||||
default:
|
||||
panic("bug: unknown message type")
|
||||
}
|
||||
@@ -819,21 +822,21 @@ func (c *rawConnection) typeOf(msg message) MessageType {
|
||||
|
||||
func (c *rawConnection) newMessage(t MessageType) (message, error) {
|
||||
switch t {
|
||||
case messageTypeClusterConfig:
|
||||
case MessageTypeClusterConfig:
|
||||
return new(ClusterConfig), nil
|
||||
case messageTypeIndex:
|
||||
case MessageTypeIndex:
|
||||
return new(Index), nil
|
||||
case messageTypeIndexUpdate:
|
||||
case MessageTypeIndexUpdate:
|
||||
return new(IndexUpdate), nil
|
||||
case messageTypeRequest:
|
||||
case MessageTypeRequest:
|
||||
return new(Request), nil
|
||||
case messageTypeResponse:
|
||||
case MessageTypeResponse:
|
||||
return new(Response), nil
|
||||
case messageTypeDownloadProgress:
|
||||
case MessageTypeDownloadProgress:
|
||||
return new(DownloadProgress), nil
|
||||
case messageTypePing:
|
||||
case MessageTypePing:
|
||||
return new(Ping), nil
|
||||
case messageTypeClose:
|
||||
case MessageTypeClose:
|
||||
return new(Close), nil
|
||||
default:
|
||||
return nil, errUnknownMessage
|
||||
@@ -842,14 +845,14 @@ func (c *rawConnection) newMessage(t MessageType) (message, error) {
|
||||
|
||||
func (c *rawConnection) shouldCompressMessage(msg message) bool {
|
||||
switch c.compression {
|
||||
case CompressNever:
|
||||
case CompressionNever:
|
||||
return false
|
||||
|
||||
case CompressAlways:
|
||||
case CompressionAlways:
|
||||
// Use compression for large enough messages
|
||||
return msg.ProtoSize() >= compressionThreshold
|
||||
|
||||
case CompressMetadata:
|
||||
case CompressionMetadata:
|
||||
_, isResponse := msg.(*Response)
|
||||
// Compress if it's large enough and not a response message
|
||||
return !isResponse && msg.ProtoSize() >= compressionThreshold
|
||||
|
||||
@@ -31,9 +31,9 @@ func TestPing(t *testing.T) {
|
||||
ar, aw := io.Pipe()
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, newTestModel(), "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c0 := NewConnection(c0ID, ar, bw, newTestModel(), "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c0.Start()
|
||||
c1 := NewConnection(c1ID, br, aw, newTestModel(), "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c1 := NewConnection(c1ID, br, aw, newTestModel(), "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c1.Start()
|
||||
c0.ClusterConfig(ClusterConfig{})
|
||||
c1.ClusterConfig(ClusterConfig{})
|
||||
@@ -55,9 +55,9 @@ func TestClose(t *testing.T) {
|
||||
ar, aw := io.Pipe()
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c0.Start()
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "name", CompressionAlways)
|
||||
c1.Start()
|
||||
c0.ClusterConfig(ClusterConfig{})
|
||||
c1.ClusterConfig(ClusterConfig{})
|
||||
@@ -97,7 +97,7 @@ func TestCloseOnBlockingSend(t *testing.T) {
|
||||
|
||||
m := newTestModel()
|
||||
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.BlockingRW{}, m, "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.BlockingRW{}, m, "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c.Start()
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
@@ -147,9 +147,9 @@ func TestCloseRace(t *testing.T) {
|
||||
ar, aw := io.Pipe()
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "c0", CompressNever).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "c0", CompressionNever).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c0.Start()
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "c1", CompressNever)
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "c1", CompressionNever)
|
||||
c1.Start()
|
||||
c0.ClusterConfig(ClusterConfig{})
|
||||
c1.ClusterConfig(ClusterConfig{})
|
||||
@@ -184,7 +184,7 @@ func TestCloseRace(t *testing.T) {
|
||||
func TestClusterConfigFirst(t *testing.T) {
|
||||
m := newTestModel()
|
||||
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.NoopRW{}, m, "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.NoopRW{}, m, "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c.Start()
|
||||
|
||||
select {
|
||||
@@ -234,7 +234,7 @@ func TestCloseTimeout(t *testing.T) {
|
||||
|
||||
m := newTestModel()
|
||||
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.BlockingRW{}, m, "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.BlockingRW{}, m, "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c.Start()
|
||||
|
||||
done := make(chan struct{})
|
||||
@@ -260,6 +260,12 @@ func TestMarshalIndexMessage(t *testing.T) {
|
||||
m1.Files = nil
|
||||
}
|
||||
for i, f := range m1.Files {
|
||||
if len(f.BlocksHash) == 0 {
|
||||
m1.Files[i].BlocksHash = nil
|
||||
}
|
||||
if len(f.VersionHash) == 0 {
|
||||
m1.Files[i].VersionHash = nil
|
||||
}
|
||||
if len(f.Blocks) == 0 {
|
||||
m1.Files[i].Blocks = nil
|
||||
} else {
|
||||
@@ -330,7 +336,13 @@ func TestMarshalClusterConfigMessage(t *testing.T) {
|
||||
if len(m1.Folders[i].Devices) == 0 {
|
||||
m1.Folders[i].Devices = nil
|
||||
}
|
||||
for j := range m1.Folders[i].Devices {
|
||||
if len(m1.Folders[i].Devices[j].Addresses) == 0 {
|
||||
m1.Folders[i].Devices[j].Addresses = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return testMarshal(t, "clusterconfig", &m1, &ClusterConfig{})
|
||||
}
|
||||
|
||||
@@ -362,7 +374,10 @@ func TestMarshalFDPU(t *testing.T) {
|
||||
if len(m1.Version.Counters) == 0 {
|
||||
m1.Version.Counters = nil
|
||||
}
|
||||
return testMarshal(t, "close", &m1, &FileDownloadProgressUpdate{})
|
||||
if len(m1.BlockIndexes) == 0 {
|
||||
m1.BlockIndexes = nil
|
||||
}
|
||||
return testMarshal(t, "fdpu", &m1, &FileDownloadProgressUpdate{})
|
||||
}
|
||||
|
||||
if err := quick.Check(f, quickCfg); err != nil {
|
||||
@@ -831,7 +846,7 @@ func TestSha256OfEmptyBlock(t *testing.T) {
|
||||
func TestClusterConfigAfterClose(t *testing.T) {
|
||||
m := newTestModel()
|
||||
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.BlockingRW{}, m, "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.BlockingRW{}, m, "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c.Start()
|
||||
|
||||
c.internalClose(errManual)
|
||||
@@ -853,7 +868,7 @@ func TestDispatcherToCloseDeadlock(t *testing.T) {
|
||||
// Verify that we don't deadlock when calling Close() from within one of
|
||||
// the model callbacks (ClusterConfig).
|
||||
m := newTestModel()
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.NoopRW{}, m, "name", CompressAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
c := NewConnection(c0ID, &testutils.BlockingRW{}, &testutils.NoopRW{}, m, "name", CompressionAlways).(wireFormatConnection).Connection.(*rawConnection)
|
||||
m.ccFn = func(devID DeviceID, cc ClusterConfig) {
|
||||
c.Close(errManual)
|
||||
}
|
||||
|
||||
@@ -136,6 +136,10 @@ func (ph *parallelHasher) hashFiles(ctx context.Context) {
|
||||
|
||||
func (ph *parallelHasher) closeWhenDone() {
|
||||
ph.wg.Wait()
|
||||
// In case the hasher aborted on context, wait for filesystem
|
||||
// walking/progress routine to finish.
|
||||
for range ph.inbox {
|
||||
}
|
||||
if ph.done != nil {
|
||||
close(ph.done)
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ func Blocks(ctx context.Context, r io.Reader, blocksize int, sizehint int64, cou
|
||||
thisHash, hashes = hashes[:hashLength], hashes[hashLength:]
|
||||
|
||||
b := protocol.BlockInfo{
|
||||
Size: int32(n),
|
||||
Size: int(n),
|
||||
Offset: offset,
|
||||
Hash: thisHash,
|
||||
WeakHash: weakHf.Sum32(),
|
||||
|
||||
+2
-2
@@ -350,7 +350,7 @@ func (w *walker) walkRegular(ctx context.Context, relPath string, info fs.FileIn
|
||||
f, _ := CreateFileInfo(info, relPath, nil)
|
||||
f = w.updateFileInfo(f, curFile)
|
||||
f.NoPermissions = w.IgnorePerms
|
||||
f.RawBlockSize = int32(blockSize)
|
||||
f.RawBlockSize = blockSize
|
||||
|
||||
if hasCurFile {
|
||||
if curFile.IsEquivalentOptional(f, w.ModTimeWindow, w.IgnorePerms, true, w.LocalFlags) {
|
||||
@@ -611,7 +611,7 @@ func CreateFileInfo(fi fs.FileInfo, name string, filesystem fs.Filesystem) (prot
|
||||
}
|
||||
f.Permissions = uint32(fi.Mode() & fs.ModePerm)
|
||||
f.ModifiedS = fi.ModTime().Unix()
|
||||
f.ModifiedNs = int32(fi.ModTime().Nanosecond())
|
||||
f.ModifiedNs = fi.ModTime().Nanosecond()
|
||||
if fi.IsDir() {
|
||||
f.Type = protocol.FileInfoTypeDirectory
|
||||
return f, nil
|
||||
|
||||
@@ -133,6 +133,8 @@ func (a *App) Start() error {
|
||||
}
|
||||
|
||||
func (a *App) startup() error {
|
||||
a.mainService.Add(ur.NewFailureHandler(a.cfg, a.evLogger))
|
||||
|
||||
a.mainService.Add(a.ll)
|
||||
|
||||
if a.opts.AuditWriter != nil {
|
||||
@@ -240,9 +242,11 @@ func (a *App) startup() error {
|
||||
l.Infoln("Detected upgrade from", prevVersion, "to", build.Version)
|
||||
}
|
||||
|
||||
// Drop delta indexes in case we've changed random stuff we
|
||||
// shouldn't have. We will resend our index on next connect.
|
||||
db.DropDeltaIndexIDs(a.ll)
|
||||
if a.cfg.Options().SendFullIndexOnUpgrade {
|
||||
// Drop delta indexes in case we've changed random stuff we
|
||||
// shouldn't have. We will resend our index on next connect.
|
||||
db.DropDeltaIndexIDs(a.ll)
|
||||
}
|
||||
}
|
||||
|
||||
if build.Version != prevVersion {
|
||||
|
||||
@@ -289,9 +289,9 @@ func (r *Report) FieldNames() []string {
|
||||
"FolderAutoNormalize",
|
||||
"DeviceIntroducer",
|
||||
"DeviceCustomCertName",
|
||||
"DeviceCompressAlways",
|
||||
"DeviceCompressMetadata",
|
||||
"DeviceCompressNever",
|
||||
"DeviceCompressionAlways",
|
||||
"DeviceCompressionMetadata",
|
||||
"DeviceCompressionNever",
|
||||
"DeviceDynamicAddr",
|
||||
"DeviceStaticAddr",
|
||||
"AnnounceGlobalEnabled",
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
// Copyright (C) 2020 The Syncthing Authors.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
package ur
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/build"
|
||||
"github.com/syncthing/syncthing/lib/config"
|
||||
"github.com/syncthing/syncthing/lib/dialer"
|
||||
"github.com/syncthing/syncthing/lib/events"
|
||||
"github.com/syncthing/syncthing/lib/util"
|
||||
|
||||
"github.com/thejerf/suture"
|
||||
)
|
||||
|
||||
var (
|
||||
// When a specific failure first occurs, it is delayed by minDelay. If
|
||||
// more of the same failures occurs those are further delayed and
|
||||
// aggregated for maxDelay.
|
||||
minDelay = 10 * time.Second
|
||||
maxDelay = time.Minute
|
||||
sendTimeout = time.Minute
|
||||
)
|
||||
|
||||
type FailureReport struct {
|
||||
Description string
|
||||
Count int
|
||||
Version string
|
||||
}
|
||||
|
||||
type FailureHandler interface {
|
||||
suture.Service
|
||||
config.Committer
|
||||
}
|
||||
|
||||
func NewFailureHandler(cfg config.Wrapper, evLogger events.Logger) FailureHandler {
|
||||
h := &failureHandler{
|
||||
cfg: cfg,
|
||||
evLogger: evLogger,
|
||||
optsChan: make(chan config.OptionsConfiguration),
|
||||
}
|
||||
h.Service = util.AsServiceWithError(h.serve, h.String())
|
||||
return h
|
||||
}
|
||||
|
||||
type failureHandler struct {
|
||||
suture.Service
|
||||
cfg config.Wrapper
|
||||
evLogger events.Logger
|
||||
optsChan chan config.OptionsConfiguration
|
||||
evChan <-chan events.Event
|
||||
buf map[string]*failureStat
|
||||
}
|
||||
|
||||
type failureStat struct {
|
||||
first, last time.Time
|
||||
count int
|
||||
}
|
||||
|
||||
func (h *failureHandler) serve(ctx context.Context) error {
|
||||
go func() {
|
||||
h.optsChan <- h.cfg.Options()
|
||||
}()
|
||||
h.cfg.Subscribe(h)
|
||||
defer h.cfg.Unsubscribe(h)
|
||||
|
||||
var url string
|
||||
var err error
|
||||
var sub events.Subscription
|
||||
timer := time.NewTimer(minDelay)
|
||||
resetTimer := make(chan struct{})
|
||||
outer:
|
||||
for {
|
||||
select {
|
||||
case opts := <-h.optsChan:
|
||||
// Sub nil checks just for safety - config updates can be racy.
|
||||
if opts.URAccepted > 0 {
|
||||
if sub == nil {
|
||||
sub = h.evLogger.Subscribe(events.Failure)
|
||||
h.evChan = sub.C()
|
||||
}
|
||||
} else if sub != nil {
|
||||
sub.Unsubscribe()
|
||||
sub = nil
|
||||
}
|
||||
url = opts.CRURL + "/failure"
|
||||
case e := <-h.evChan:
|
||||
descr := e.Data.(string)
|
||||
if stat, ok := h.buf[descr]; ok {
|
||||
stat.last = e.Time
|
||||
stat.count++
|
||||
} else {
|
||||
h.buf[descr] = &failureStat{
|
||||
first: e.Time,
|
||||
last: e.Time,
|
||||
count: 1,
|
||||
}
|
||||
}
|
||||
case <-timer.C:
|
||||
reports := make([]FailureReport, 0, len(h.buf))
|
||||
now := time.Now()
|
||||
for descr, stat := range h.buf {
|
||||
if now.Sub(stat.last) > minDelay || now.Sub(stat.first) > maxDelay {
|
||||
reports = append(reports, FailureReport{
|
||||
Description: descr,
|
||||
Count: stat.count,
|
||||
Version: build.LongVersion,
|
||||
})
|
||||
delete(h.buf, descr)
|
||||
}
|
||||
}
|
||||
if len(reports) > 0 {
|
||||
// Lets keep process events/configs while it might be timing out for a while
|
||||
go func() {
|
||||
sendFailureReports(ctx, reports, url)
|
||||
select {
|
||||
case resetTimer <- struct{}{}:
|
||||
case <-ctx.Done():
|
||||
}
|
||||
}()
|
||||
}
|
||||
case <-resetTimer:
|
||||
timer.Reset(minDelay)
|
||||
case <-ctx.Done():
|
||||
break outer
|
||||
}
|
||||
}
|
||||
|
||||
if sub != nil {
|
||||
sub.Unsubscribe()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (h *failureHandler) VerifyConfiguration(_, _ config.Configuration) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *failureHandler) CommitConfiguration(from, to config.Configuration) bool {
|
||||
if from.Options.CREnabled != to.Options.CREnabled || from.Options.CRURL != to.Options.CRURL {
|
||||
h.optsChan <- to.Options
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (h *failureHandler) String() string {
|
||||
return "FailureHandler"
|
||||
}
|
||||
|
||||
func sendFailureReports(ctx context.Context, reports []FailureReport, url string) {
|
||||
var b bytes.Buffer
|
||||
if err := json.NewEncoder(&b).Encode(reports); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
client := &http.Client{
|
||||
Transport: &http.Transport{
|
||||
DialContext: dialer.DialContext,
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
},
|
||||
}
|
||||
|
||||
reqCtx, reqCancel := context.WithTimeout(ctx, sendTimeout)
|
||||
defer reqCancel()
|
||||
req, err := http.NewRequestWithContext(reqCtx, http.MethodGet, url, &b)
|
||||
if err != nil {
|
||||
l.Infoln("Failed to send failure report:", err)
|
||||
return
|
||||
}
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
l.Infoln("Failed to send failure report:", err)
|
||||
return
|
||||
}
|
||||
resp.Body.Close()
|
||||
return
|
||||
}
|
||||
@@ -164,11 +164,11 @@ func (s *Service) reportData(ctx context.Context, urVersion int, preview bool) (
|
||||
report.DeviceUses.CustomCertName++
|
||||
}
|
||||
switch cfg.Compression {
|
||||
case protocol.CompressAlways:
|
||||
case protocol.CompressionAlways:
|
||||
report.DeviceUses.CompressAlways++
|
||||
case protocol.CompressMetadata:
|
||||
case protocol.CompressionMetadata:
|
||||
report.DeviceUses.CompressMetadata++
|
||||
case protocol.CompressNever:
|
||||
case protocol.CompressionNever:
|
||||
report.DeviceUses.CompressNever++
|
||||
default:
|
||||
l.Warnf("Unhandled versioning type for usage reports: %s", cfg.Compression)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "STDISCOSRV" "1" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "STDISCOSRV" "1" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
stdiscosrv \- Syncthing Discovery Server
|
||||
.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "STRELAYSRV" "1" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "STRELAYSRV" "1" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
strelaysrv \- Syncthing Relay Server
|
||||
.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-BEP" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-BEP" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-bep \- Block Exchange Protocol v1
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-CONFIG" "5" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-CONFIG" "5" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-config \- Syncthing Configuration
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-DEVICE-IDS" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-DEVICE-IDS" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-device-ids \- Understanding Device IDs
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-EVENT-API" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-EVENT-API" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-event-api \- Event API
|
||||
.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-FAQ" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-FAQ" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-faq \- Frequently Asked Questions
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-GLOBALDISCO" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-GLOBALDISCO" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-globaldisco \- Global Discovery Protocol v3
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-LOCALDISCO" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-LOCALDISCO" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-localdisco \- Local Discovery Protocol v4
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-NETWORKING" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-NETWORKING" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-networking \- Firewall Setup
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-RELAY" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-RELAY" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-relay \- Relay Protocol v1
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-REST-API" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-REST-API" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-rest-api \- REST API
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-SECURITY" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-SECURITY" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-security \- Security Principles
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-STIGNORE" "5" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-STIGNORE" "5" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-stignore \- Prevent files from being synchronized to other nodes
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-VERSIONING" "7" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING-VERSIONING" "7" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-versioning \- Keep automatic backups of deleted files by other nodes
|
||||
.
|
||||
|
||||
+19
-4
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING" "1" "Sep 06, 2020" "v1" "Syncthing"
|
||||
.TH "SYNCTHING" "1" "Sep 23, 2020" "v1" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing \- Syncthing
|
||||
.
|
||||
@@ -38,7 +38,8 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.ft C
|
||||
syncthing [\-audit] [\-auditfile=<file|\-|\-\->] [\-browser\-only] [device\-id]
|
||||
[\-generate=<dir>] [\-gui\-address=<address>] [\-gui\-apikey=<key>]
|
||||
[\-home=<dir>] [\-logfile=<filename>] [\-logflags=<flags>]
|
||||
[\-home=<dir> | \-config=<dir> \-data=<dir>]
|
||||
[\-logfile=<filename>] [\-logflags=<flags>]
|
||||
[\-no\-browser] [\-no\-console] [\-no\-restart] [\-paths] [\-paused]
|
||||
[\-reset\-database] [\-reset\-deltas] [\-unpaused] [\-upgrade]
|
||||
[\-upgrade\-check] [\-upgrade\-to=<url>] [\-verbose] [\-version]
|
||||
@@ -89,8 +90,22 @@ or file path (\fB/var/run/st.sock\fP, for UNIX sockets).
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-home=<dir>
|
||||
Set configuration directory. The default configuration directory is
|
||||
\fB$HOME/.config/syncthing\fP (Unix\-like), \fB$HOME/Library/Application Support/Syncthing\fP (Mac) and \fB%LOCALAPPDATA%\eSyncthing\fP (Windows).
|
||||
Set common configuration and data directory. The default configuration
|
||||
directory is \fB$HOME/.config/syncthing\fP (Unix\-like),
|
||||
\fB$HOME/Library/Application Support/Syncthing\fP (Mac) and
|
||||
\fB%LOCALAPPDATA%\eSyncthing\fP (Windows).
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-config=<dir>
|
||||
Set configuration directory. Alternative to \fB\-home\fP and must be used
|
||||
together with \fB\-data\fP\&.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-data=<dir>
|
||||
Set data (e.g. database) directory. Alternative to \fB\-home\fP and must be used
|
||||
together with \fB\-config\fP\&.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
|
||||
@@ -17,6 +17,7 @@ extend google.protobuf.FieldOptions {
|
||||
optional bool restart = 75008;
|
||||
optional bool device_id = 75009;
|
||||
optional string goname = 75010;
|
||||
optional string gotype = 75011;
|
||||
}
|
||||
|
||||
extend google.protobuf.EnumValueOptions {
|
||||
|
||||
+31
-21
@@ -84,6 +84,15 @@ var E_Goname = &proto.ExtensionDesc{
|
||||
Filename: "ext.proto",
|
||||
}
|
||||
|
||||
var E_Gotype = &proto.ExtensionDesc{
|
||||
ExtendedType: (*descriptor.FieldOptions)(nil),
|
||||
ExtensionType: (*string)(nil),
|
||||
Field: 75011,
|
||||
Name: "ext.gotype",
|
||||
Tag: "bytes,75011,opt,name=gotype",
|
||||
Filename: "ext.proto",
|
||||
}
|
||||
|
||||
var E_Enumgoname = &proto.ExtensionDesc{
|
||||
ExtendedType: (*descriptor.EnumValueOptions)(nil),
|
||||
ExtensionType: (*string)(nil),
|
||||
@@ -101,31 +110,32 @@ func init() {
|
||||
proto.RegisterExtension(E_Restart)
|
||||
proto.RegisterExtension(E_DeviceId)
|
||||
proto.RegisterExtension(E_Goname)
|
||||
proto.RegisterExtension(E_Gotype)
|
||||
proto.RegisterExtension(E_Enumgoname)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("ext.proto", fileDescriptor_95fe6908ffcf64d3) }
|
||||
|
||||
var fileDescriptor_95fe6908ffcf64d3 = []byte{
|
||||
// 305 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd1, 0x3d, 0x4b, 0x03, 0x31,
|
||||
0x18, 0xc0, 0x71, 0x8e, 0x16, 0xdb, 0x66, 0xec, 0x24, 0x82, 0xb5, 0x6e, 0x9d, 0xee, 0x10, 0x41,
|
||||
0x31, 0x74, 0x52, 0x14, 0x1c, 0x44, 0x28, 0xe2, 0xe0, 0x52, 0xd2, 0xcb, 0xd3, 0x34, 0x92, 0x97,
|
||||
0x72, 0x49, 0x24, 0x6e, 0xea, 0x37, 0xf0, 0x2b, 0x39, 0x69, 0x27, 0xfd, 0x06, 0xd2, 0xd1, 0xef,
|
||||
0xe0, 0x0b, 0x77, 0x97, 0x93, 0x42, 0x87, 0xdb, 0x42, 0xf8, 0xff, 0x1e, 0x12, 0x1e, 0xd4, 0x01,
|
||||
0x6f, 0xe3, 0x79, 0xa6, 0xad, 0xee, 0x36, 0xc0, 0xdb, 0xad, 0x3e, 0xd3, 0x9a, 0x09, 0x48, 0x8a,
|
||||
0xab, 0x89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||||
0xb7, 0x33, 0x37, 0x89, 0x53, 0x2d, 0x13, 0x73, 0xaf, 0x52, 0x3b, 0xe3, 0x8a, 0xad, 0x9c, 0x8a,
|
||||
0xd9, 0x09, 0x78, 0xfb, 0x17, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x40, 0x4c, 0x73, 0x42, 0x02, 0x00,
|
||||
0x00,
|
||||
// 318 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd1, 0xcb, 0x4a, 0x33, 0x31,
|
||||
0x14, 0xc0, 0x71, 0x86, 0x96, 0xaf, 0x6d, 0x96, 0x5d, 0x7d, 0x08, 0xd6, 0xba, 0xeb, 0x6a, 0x06,
|
||||
0x11, 0x14, 0x43, 0x57, 0x8a, 0x82, 0x0b, 0x11, 0x8a, 0xb8, 0x70, 0x53, 0xd2, 0x99, 0xd3, 0x34,
|
||||
0x92, 0xcb, 0x30, 0x39, 0x23, 0xd3, 0x9d, 0x97, 0x27, 0xf0, 0x95, 0x5c, 0x69, 0x57, 0xfa, 0x06,
|
||||
0xd2, 0xa5, 0xef, 0xe0, 0x85, 0xe9, 0xa4, 0x5a, 0xe8, 0x22, 0xbb, 0x10, 0xfe, 0xbf, 0x93, 0x84,
|
||||
0x90, 0x16, 0x14, 0x18, 0xa6, 0x99, 0x41, 0xd3, 0xae, 0x41, 0x81, 0x1b, 0x5d, 0x6e, 0x0c, 0x97,
|
||||
0x10, 0x2d, 0xb6, 0x46, 0xf9, 0x38, 0x4a, 0xc0, 0xc6, 0x99, 0x48, 0xd1, 0x64, 0x55, 0x46, 0xfb,
|
||||
0xa4, 0x59, 0x28, 0x39, 0x44, 0xc6, 0x6d, 0x7b, 0x2b, 0xac, 0xf2, 0x70, 0x99, 0x87, 0x67, 0x60,
|
||||
0x2d, 0xe3, 0x70, 0x9e, 0xa2, 0x30, 0xda, 0xfe, 0x7f, 0x7c, 0xaa, 0x77, 0x83, 0x5e, 0x73, 0xd0,
|
||||
0x28, 0x94, 0xbc, 0x60, 0xdc, 0xd2, 0x1d, 0x52, 0x2b, 0x94, 0x6c, 0x6f, 0xae, 0xc1, 0x13, 0x01,
|
||||
0x32, 0x59, 0xb2, 0xcf, 0x97, 0x92, 0xb5, 0x06, 0x65, 0x4b, 0x77, 0x49, 0xfd, 0xda, 0x1a, 0xed,
|
||||
0x33, 0x5f, 0xce, 0x2c, 0x62, 0x7a, 0x40, 0x1a, 0x09, 0x8c, 0x59, 0x2e, 0xd1, 0xe7, 0xbe, 0x9d,
|
||||
0x5b, 0xf6, 0x25, 0xcd, 0xc0, 0x22, 0xcb, 0xbc, 0xf4, 0x76, 0xe6, 0x5e, 0xe7, 0x7a, 0xda, 0x27,
|
||||
0xad, 0x04, 0x6e, 0x44, 0x0c, 0x43, 0x91, 0xf8, 0xf0, 0x9d, 0xc3, 0xcd, 0x4a, 0x9c, 0x26, 0x74,
|
||||
0x9f, 0xfc, 0xe3, 0x46, 0x33, 0x05, 0x3e, 0x7a, 0x3f, 0xab, 0xae, 0xec, 0xf2, 0x0a, 0xe2, 0x34,
|
||||
0xf5, 0xc2, 0x87, 0x3f, 0x58, 0xe6, 0xf4, 0x88, 0x10, 0xd0, 0xb9, 0x72, 0xa7, 0x6e, 0xaf, 0xe1,
|
||||
0x63, 0x9d, 0xab, 0x4b, 0x26, 0xf3, 0xdf, 0xff, 0xfc, 0x78, 0xab, 0x06, 0xac, 0xb0, 0xc3, 0xbd,
|
||||
0xe7, 0x79, 0x27, 0x78, 0x9d, 0x77, 0x82, 0xf7, 0x79, 0x27, 0xb8, 0xea, 0x71, 0x81, 0x93, 0x7c,
|
||||
0x14, 0xc6, 0x46, 0x45, 0x76, 0xaa, 0x63, 0x9c, 0x08, 0xcd, 0x57, 0x56, 0x8b, 0xd9, 0x11, 0x14,
|
||||
0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xa4, 0x49, 0x7c, 0x7b, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+1
-4
@@ -25,10 +25,7 @@ import (
|
||||
|
||||
// Inception, go generate calls the script itself that then deals with generation.
|
||||
// This is only done because go:generate does not support wildcards in paths.
|
||||
//go:generate go run generate.go lib/config lib/fs
|
||||
|
||||
// Use the standard compiler here. We can revisit this later, but we don't plan on exposing this via any APIs.
|
||||
//go:generate protoc -I ../ -I . --gogofast_out=paths=source_relative:.. lib/protocol/bep.proto
|
||||
//go:generate go run generate.go lib/protocol lib/config lib/fs lib/db
|
||||
|
||||
func main() {
|
||||
for _, path := range os.Args[1:] {
|
||||
|
||||
@@ -2,7 +2,11 @@ syntax = "proto3";
|
||||
|
||||
package config;
|
||||
|
||||
import "repos/protobuf/gogoproto/gogo.proto";
|
||||
|
||||
enum BlockPullOrder {
|
||||
option (gogoproto.goproto_enum_stringer) = false;
|
||||
|
||||
BLOCK_PULL_ORDER_STANDARD = 0;
|
||||
BLOCK_PULL_ORDER_RANDOM = 1;
|
||||
BLOCK_PULL_ORDER_IN_ORDER = 2;
|
||||
|
||||
@@ -2,7 +2,11 @@ syntax = "proto3";
|
||||
|
||||
package config;
|
||||
|
||||
import "repos/protobuf/gogoproto/gogo.proto";
|
||||
|
||||
enum FolderType {
|
||||
option (gogoproto.goproto_enum_stringer) = false;
|
||||
|
||||
FOLDER_TYPE_SEND_RECEIVE = 0;
|
||||
FOLDER_TYPE_SEND_ONLY = 1;
|
||||
FOLDER_TYPE_RECEIVE_ONLY = 2;
|
||||
|
||||
@@ -55,6 +55,7 @@ message OptionsConfiguration {
|
||||
Tuning database_tuning = 46 [(ext.restart) = true];
|
||||
int32 max_concurrent_incoming_request_kib = 47 [(ext.goname) = "RawMaxCIRequestKiB", (ext.xml) = "maxConcurrentIncomingRequestKiB", (ext.json) = "maxConcurrentIncomingRequestKiB"];
|
||||
bool announce_lan_addresses = 48 [(ext.goname)= "AnnounceLANAddresses", (ext.xml) = "announceLANAddresses", (ext.json) = "announceLANAddresses", (ext.default) = "true"];
|
||||
bool send_full_index_on_upgrade = 49;
|
||||
|
||||
|
||||
// Legacy deprecated
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user