mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-14 01:04:14 +00:00
Move top level packages to internal.
This commit is contained in:
parent
fbdbd722b1
commit
14817e31f6
4
build.go
4
build.go
@ -233,11 +233,11 @@ func setBuildEnv() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func assets() {
|
func assets() {
|
||||||
runPipe("auto/gui.files.go", "godep", "go", "run", "cmd/genassets/main.go", "gui")
|
runPipe("internal/auto/gui.files.go", "godep", "go", "run", "cmd/genassets/main.go", "gui")
|
||||||
}
|
}
|
||||||
|
|
||||||
func xdr() {
|
func xdr() {
|
||||||
for _, f := range []string{"discover/packets", "files/leveldb", "protocol/message"} {
|
for _, f := range []string{"internal/discover/packets", "internal/files/leveldb", "internal/protocol/message"} {
|
||||||
runPipe(f+"_xdr.go", "go", "run", "./Godeps/_workspace/src/github.com/calmh/xdr/cmd/genxdr/main.go", "--", f+".go")
|
runPipe(f+"_xdr.go", "go", "run", "./Godeps/_workspace/src/github.com/calmh/xdr/cmd/genxdr/main.go", "--", f+".go")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/files"
|
"github.com/syncthing/syncthing/internal/files"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.crypto/bcrypt"
|
"code.google.com/p/go.crypto/bcrypt"
|
||||||
"github.com/syncthing/syncthing/auto"
|
"github.com/syncthing/syncthing/internal/auto"
|
||||||
"github.com/syncthing/syncthing/config"
|
"github.com/syncthing/syncthing/internal/config"
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
"github.com/syncthing/syncthing/model"
|
"github.com/syncthing/syncthing/internal/model"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syncthing/syncthing/upgrade"
|
"github.com/syncthing/syncthing/internal/upgrade"
|
||||||
"github.com/vitrun/qart/qr"
|
"github.com/vitrun/qart/qr"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.crypto/bcrypt"
|
"code.google.com/p/go.crypto/bcrypt"
|
||||||
"github.com/syncthing/syncthing/config"
|
"github.com/syncthing/syncthing/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/osutil"
|
"github.com/syncthing/syncthing/internal/osutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
var csrfTokens []string
|
var csrfTokens []string
|
||||||
|
@ -27,15 +27,15 @@ import (
|
|||||||
|
|
||||||
"code.google.com/p/go.crypto/bcrypt"
|
"code.google.com/p/go.crypto/bcrypt"
|
||||||
"github.com/juju/ratelimit"
|
"github.com/juju/ratelimit"
|
||||||
"github.com/syncthing/syncthing/config"
|
"github.com/syncthing/syncthing/internal/config"
|
||||||
"github.com/syncthing/syncthing/discover"
|
"github.com/syncthing/syncthing/internal/discover"
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
"github.com/syncthing/syncthing/files"
|
"github.com/syncthing/syncthing/internal/files"
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
"github.com/syncthing/syncthing/model"
|
"github.com/syncthing/syncthing/internal/model"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syncthing/syncthing/upgrade"
|
"github.com/syncthing/syncthing/internal/upgrade"
|
||||||
"github.com/syncthing/syncthing/upnp"
|
"github.com/syncthing/syncthing/internal/upnp"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||||
)
|
)
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/model"
|
"github.com/syncthing/syncthing/internal/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Current version number of the usage report, for acceptance purposes. If
|
// Current version number of the usage report, for acceptance purposes. If
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/auto"
|
"github.com/syncthing/syncthing/internal/auto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAssets(t *testing.T) {
|
func TestAssets(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -14,10 +14,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"code.google.com/p/go.crypto/bcrypt"
|
"code.google.com/p/go.crypto/bcrypt"
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
"github.com/syncthing/syncthing/osutil"
|
"github.com/syncthing/syncthing/internal/osutil"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
var l = logger.DefaultLogger
|
var l = logger.DefaultLogger
|
@ -9,7 +9,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
var node1, node2, node3, node4 protocol.NodeID
|
var node1, node2, node3, node4 protocol.NodeID
|
@ -136,4 +136,3 @@ This is the XDR encoding of:
|
|||||||
unsigned int MagicNumber;
|
unsigned int MagicNumber;
|
||||||
string NodeID<>;
|
string NodeID<>;
|
||||||
}
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -14,9 +14,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/beacon"
|
"github.com/syncthing/syncthing/internal/beacon"
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Discoverer struct {
|
type Discoverer struct {
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
)
|
)
|
||||||
|
|
||||||
var timeout = 100 * time.Millisecond
|
var timeout = 100 * time.Millisecond
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -10,8 +10,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/lamport"
|
"github.com/syncthing/syncthing/internal/lamport"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
"github.com/syndtr/goleveldb/leveldb/iterator"
|
"github.com/syndtr/goleveldb/leveldb/iterator"
|
||||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
"github.com/syndtr/goleveldb/leveldb/opt"
|
@ -13,8 +13,8 @@ package files
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/lamport"
|
"github.com/syncthing/syncthing/internal/lamport"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
)
|
)
|
||||||
|
|
@ -11,9 +11,9 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/files"
|
"github.com/syncthing/syncthing/internal/files"
|
||||||
"github.com/syncthing/syncthing/lamport"
|
"github.com/syncthing/syncthing/internal/lamport"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
"github.com/syndtr/goleveldb/leveldb/storage"
|
"github.com/syndtr/goleveldb/leveldb/storage"
|
||||||
)
|
)
|
@ -13,7 +13,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/fnmatch"
|
"github.com/syncthing/syncthing/internal/fnmatch"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Pattern struct {
|
type Pattern struct {
|
@ -10,7 +10,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/ignore"
|
"github.com/syncthing/syncthing/internal/ignore"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIgnore(t *testing.T) {
|
func TestIgnore(t *testing.T) {
|
@ -7,7 +7,7 @@ package luhn_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/luhn"
|
"github.com/syncthing/syncthing/internal/luhn"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerate(t *testing.T) {
|
func TestGenerate(t *testing.T) {
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package model
|
package model
|
||||||
|
|
||||||
import "github.com/syncthing/syncthing/protocol"
|
import "github.com/syncthing/syncthing/internal/protocol"
|
||||||
|
|
||||||
type bqAdd struct {
|
type bqAdd struct {
|
||||||
file protocol.FileInfo
|
file protocol.FileInfo
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -19,15 +19,15 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/config"
|
"github.com/syncthing/syncthing/internal/config"
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
"github.com/syncthing/syncthing/files"
|
"github.com/syncthing/syncthing/internal/files"
|
||||||
"github.com/syncthing/syncthing/ignore"
|
"github.com/syncthing/syncthing/internal/ignore"
|
||||||
"github.com/syncthing/syncthing/lamport"
|
"github.com/syncthing/syncthing/internal/lamport"
|
||||||
"github.com/syncthing/syncthing/osutil"
|
"github.com/syncthing/syncthing/internal/osutil"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syncthing/syncthing/scanner"
|
"github.com/syncthing/syncthing/internal/scanner"
|
||||||
"github.com/syncthing/syncthing/stats"
|
"github.com/syncthing/syncthing/internal/stats"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
)
|
)
|
||||||
|
|
@ -11,8 +11,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/config"
|
"github.com/syncthing/syncthing/internal/config"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
"github.com/syndtr/goleveldb/leveldb/storage"
|
"github.com/syndtr/goleveldb/leveldb/storage"
|
||||||
)
|
)
|
@ -32,12 +32,12 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/config"
|
"github.com/syncthing/syncthing/internal/config"
|
||||||
"github.com/syncthing/syncthing/events"
|
"github.com/syncthing/syncthing/internal/events"
|
||||||
"github.com/syncthing/syncthing/osutil"
|
"github.com/syncthing/syncthing/internal/osutil"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
"github.com/syncthing/syncthing/scanner"
|
"github.com/syncthing/syncthing/internal/scanner"
|
||||||
"github.com/syncthing/syncthing/versioner"
|
"github.com/syncthing/syncthing/internal/versioner"
|
||||||
)
|
)
|
||||||
|
|
||||||
type requestResult struct {
|
type requestResult struct {
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -13,7 +13,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/luhn"
|
"github.com/syncthing/syncthing/internal/luhn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NodeID [32]byte
|
type NodeID [32]byte
|
@ -9,7 +9,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The parallell hasher reads FileInfo structures from the inbox, hashes the
|
// The parallell hasher reads FileInfo structures from the inbox, hashes the
|
@ -9,7 +9,7 @@ import (
|
|||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
const StandardBlockSize = 128 * 1024
|
const StandardBlockSize = 128 * 1024
|
@ -9,7 +9,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
var blocksTestData = []struct {
|
var blocksTestData = []struct {
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user