Renaming to cwtch.im

This commit is contained in:
Sarah Jamie Lewis 2018-05-28 11:05:06 -07:00
parent 6de91969ae
commit 77e62b1b66
35 changed files with 68 additions and 68 deletions

View File

@ -1,7 +1,7 @@
package app package app
import ( import (
"git.mascherari.press/cwtch/peer" "cwtch.im/cwtch/peer"
"log" "log"
) )

View File

@ -1,8 +1,8 @@
package main package main
import ( import (
app2 "cwtch.im/cwtch/app"
"fmt" "fmt"
app2 "git.mascherari.press/cwtch/app"
"github.com/c-bata/go-prompt" "github.com/c-bata/go-prompt"
"strings" "strings"

View File

@ -2,9 +2,9 @@ package model
import ( import (
"crypto/rand" "crypto/rand"
"cwtch.im/cwtch/protocol"
"errors" "errors"
"fmt" "fmt"
"git.mascherari.press/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"
"golang.org/x/crypto/nacl/secretbox" "golang.org/x/crypto/nacl/secretbox"

View File

@ -1,7 +1,7 @@
package model package model
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"testing" "testing"
"time" "time"

View File

@ -55,7 +55,7 @@ func (t *Timeline) Swap(i, j int) {
t.Messages[i], t.Messages[j] = t.Messages[j], t.Messages[i] t.Messages[i], t.Messages[j] = t.Messages[j], t.Messages[i]
} }
// Less checks 2 messages (i andj) in the timeline and returns true if i occcured before j, else false // Less checks 2 messages (i and j) in the timeline and returns true if i occcured before j, else false
func (t *Timeline) Less(i, j int) bool { func (t *Timeline) Less(i, j int) bool {
if t.Messages[i].Timestamp.Before(t.Messages[j].Timestamp) { if t.Messages[i].Timestamp.Before(t.Messages[j].Timestamp) {

View File

@ -1,7 +1,7 @@
package model package model
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"strconv" "strconv"
"testing" "testing"

View File

@ -3,10 +3,10 @@ package model
import ( import (
"crypto/rand" "crypto/rand"
"crypto/rsa" "crypto/rsa"
"cwtch.im/cwtch/protocol"
"encoding/asn1" "encoding/asn1"
"encoding/json" "encoding/json"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"
"golang.org/x/crypto/ed25519" "golang.org/x/crypto/ed25519"

View File

@ -1,7 +1,7 @@
package model package model
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"testing" "testing"
) )

View File

@ -1,8 +1,8 @@
package connections package connections
import ( import (
"git.mascherari.press/cwtch/model" "cwtch.im/cwtch/model"
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"sync" "sync"
"time" "time"
) )

View File

@ -1,14 +1,14 @@
package connections package connections
import ( import (
"git.mascherari.press/cwtch/peer/peer" "cwtch.im/cwtch/peer/peer"
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/connection" "github.com/s-rah/go-ricochet/connection"
"github.com/s-rah/go-ricochet/identity" "github.com/s-rah/go-ricochet/identity"
//"github.com/s-rah/go-ricochet/utils" //"github.com/s-rah/go-ricochet/utils"
"git.mascherari.press/cwtch/model" "cwtch.im/cwtch/model"
"log" "log"
"time" "time"
) )

View File

@ -2,9 +2,9 @@ package connections
import ( import (
"crypto/rsa" "crypto/rsa"
"git.mascherari.press/cwtch/model" "cwtch.im/cwtch/model"
"git.mascherari.press/cwtch/peer/peer" "cwtch.im/cwtch/peer/peer"
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/connection" "github.com/s-rah/go-ricochet/connection"
@ -86,7 +86,7 @@ func TestPeerPeerConnection(t *testing.T) {
} }
profile := model.GenerateNewProfile("sarah") profile := model.GenerateNewProfile("sarah")
ppc := NewPeerPeerConnection("127.0.0.1:5452|" + onionAddr, profile) ppc := NewPeerPeerConnection("127.0.0.1:5452|"+onionAddr, profile)
//numcalls := 0 //numcalls := 0
tp := new(TestPeer) tp := new(TestPeer)
tp.Init() tp.Init()

View File

@ -1,11 +1,11 @@
package connections package connections
import ( import (
"cwtch.im/cwtch/peer/fetch"
"cwtch.im/cwtch/peer/listen"
"cwtch.im/cwtch/peer/send"
"cwtch.im/cwtch/protocol"
"errors" "errors"
"git.mascherari.press/cwtch/peer/fetch"
"git.mascherari.press/cwtch/peer/listen"
"git.mascherari.press/cwtch/peer/send"
"git.mascherari.press/cwtch/protocol"
"github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/connection" "github.com/s-rah/go-ricochet/connection"

View File

@ -2,9 +2,9 @@ package connections
import ( import (
"crypto/rsa" "crypto/rsa"
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"git.mascherari.press/cwtch/server/fetch" "cwtch.im/cwtch/server/fetch"
"git.mascherari.press/cwtch/server/send" "cwtch.im/cwtch/server/send"
"github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/connection" "github.com/s-rah/go-ricochet/connection"

View File

@ -1,13 +1,13 @@
package peer package peer
import ( import (
"cwtch.im/cwtch/model"
"cwtch.im/cwtch/peer/connections"
"cwtch.im/cwtch/peer/peer"
"cwtch.im/cwtch/protocol"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"git.mascherari.press/cwtch/model"
"git.mascherari.press/cwtch/peer/connections"
"git.mascherari.press/cwtch/peer/peer"
"git.mascherari.press/cwtch/protocol"
"github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/application"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/connection" "github.com/s-rah/go-ricochet/connection"

View File

@ -1,8 +1,8 @@
package fetch package fetch
import ( import (
"cwtch.im/cwtch/protocol"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,7 +1,7 @@
package fetch package fetch
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,8 +1,8 @@
package listen package listen
import ( import (
"cwtch.im/cwtch/protocol"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,7 +1,7 @@
package listen package listen
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,7 +1,7 @@
package peer package peer
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,7 +1,7 @@
package peer package peer
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,9 +1,9 @@
package send package send
import ( import (
"cwtch.im/cwtch/protocol"
"cwtch.im/cwtch/protocol/spam"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"git.mascherari.press/cwtch/protocol/spam"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,8 +1,8 @@
package send package send
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"git.mascherari.press/cwtch/protocol/spam" "cwtch.im/cwtch/protocol/spam"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,7 +1,7 @@
package main package main
import ( import (
cwtchserver "git.mascherari.press/cwtch/server" cwtchserver "cwtch.im/cwtch/server"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"
"io/ioutil" "io/ioutil"
"log" "log"
@ -14,11 +14,11 @@ func checkAndGenPrivateKey(privateKeyFile string) {
if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) { if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) {
log.Printf("no private key found!") log.Printf("no private key found!")
log.Printf("generating new private key...") log.Printf("generating new private key...")
pk, pk_err := utils.GeneratePrivateKey() pk, err := utils.GeneratePrivateKey()
if pk_err != nil { if err != nil {
log.Fatalf("error generating new private key: %v\n", err) log.Fatalf("error generating new private key: %v\n", err)
} }
err := ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400) err = ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400)
if err != nil { if err != nil {
log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err) log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err)
} }

View File

@ -1,8 +1,8 @@
package fetch package fetch
import ( import (
"cwtch.im/cwtch/protocol"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,7 +1,7 @@
package fetch package fetch
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,8 +1,8 @@
package listen package listen
import ( import (
"cwtch.im/cwtch/protocol"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,7 +1,7 @@
package listen package listen
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,9 +1,9 @@
package send package send
import ( import (
"cwtch.im/cwtch/protocol"
"cwtch.im/cwtch/protocol/spam"
"errors" "errors"
"git.mascherari.press/cwtch/protocol"
"git.mascherari.press/cwtch/protocol/spam"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,8 +1,8 @@
package send package send
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"git.mascherari.press/cwtch/protocol/spam" "cwtch.im/cwtch/protocol/spam"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"

View File

@ -1,10 +1,10 @@
package server package server
import ( import (
"git.mascherari.press/cwtch/server/fetch" "cwtch.im/cwtch/server/fetch"
"git.mascherari.press/cwtch/server/listen" "cwtch.im/cwtch/server/listen"
"git.mascherari.press/cwtch/server/send" "cwtch.im/cwtch/server/send"
"git.mascherari.press/cwtch/storage" "cwtch.im/cwtch/storage"
"github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/application"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"

View File

@ -1,9 +1,9 @@
package server package server
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"git.mascherari.press/cwtch/server/listen" "cwtch.im/cwtch/server/listen"
"git.mascherari.press/cwtch/storage" "cwtch.im/cwtch/storage"
"github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/application"
"github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/channels"
) )

View File

@ -1,8 +1,8 @@
package server package server
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"git.mascherari.press/cwtch/storage" "cwtch.im/cwtch/storage"
"github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/application"
"os" "os"
"testing" "testing"

View File

@ -2,9 +2,9 @@ package storage
import ( import (
"bufio" "bufio"
"cwtch.im/cwtch/protocol"
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.mascherari.press/cwtch/protocol"
"log" "log"
"os" "os"
"sync" "sync"

View File

@ -1,7 +1,7 @@
package storage package storage
import ( import (
"git.mascherari.press/cwtch/protocol" "cwtch.im/cwtch/protocol"
"os" "os"
"strconv" "strconv"
"testing" "testing"

View File

@ -1,11 +1,11 @@
package testing package testing
import ( import (
"cwtch.im/cwtch/model"
"cwtch.im/cwtch/peer"
"cwtch.im/cwtch/protocol"
cwtchserver "cwtch.im/cwtch/server"
"fmt" "fmt"
"git.mascherari.press/cwtch/model"
"git.mascherari.press/cwtch/peer"
"git.mascherari.press/cwtch/protocol"
cwtchserver "git.mascherari.press/cwtch/server"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet"
"github.com/s-rah/go-ricochet/utils" "github.com/s-rah/go-ricochet/utils"
@ -28,11 +28,11 @@ var (
func checkAndGenPrivateKey(privateKeyFile string) (generated bool) { func checkAndGenPrivateKey(privateKeyFile string) (generated bool) {
if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) { if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) {
fmt.Println("generating new private key...") fmt.Println("generating new private key...")
pk, pk_err := utils.GeneratePrivateKey() pk, err := utils.GeneratePrivateKey()
if pk_err != nil { if err != nil {
log.Fatalf("error generating new private key: %v\n", err) log.Fatalf("error generating new private key: %v\n", err)
} }
err := ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400) err = ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400)
if err != nil { if err != nil {
log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err) log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err)
} }