Rename
This commit is contained in:
parent
5a94afa0f7
commit
e382c8eb69
|
@ -33,11 +33,11 @@ can check coverage `with go test --cover github.com/s-rah/go-ricochet`
|
|||
|
||||
Format your code (the path might be slightly different):
|
||||
|
||||
* `gofmt -l=true -s -w src/github.com/s-rah/go-ricochet/`
|
||||
* `gofmt -l=true -s -w src/git.openprivacy.ca/openprivacy/libricochet-go/`
|
||||
|
||||
Run the following commands, and address any issues which arise:
|
||||
|
||||
* `go vet github.com/s-rah/go-ricochet/...`
|
||||
* `go vet git.openprivacy.ca/openprivacy/libricochet-go/...`
|
||||
* `/golint application/ channels/ connection/ examples/ identity/ policies/ testing/ utils`
|
||||
|
||||
## 4. Code Review
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# GoRicochet [![Build Status](https://travis-ci.org/s-rah/go-ricochet.svg?branch=master)](https://travis-ci.org/s-rah/go-ricochet) [![Go Report Card](https://goreportcard.com/badge/github.com/s-rah/go-ricochet)](https://goreportcard.com/report/github.com/s-rah/go-ricochet) [![Coverage Status](https://coveralls.io/repos/github/s-rah/go-ricochet/badge.svg?branch=master)](https://coveralls.io/github/s-rah/go-ricochet?branch=master)
|
||||
# libricochet-go [![Build Status](https://travis-ci.org/s-rah/go-ricochet.svg?branch=master)](https://travis-ci.org/s-rah/go-ricochet) [![Go Report Card](https://goreportcard.com/badge/github.com/s-rah/go-ricochet)](https://goreportcard.com/report/github.com/s-rah/go-ricochet) [![Coverage Status](https://coveralls.io/repos/github/s-rah/go-ricochet/badge.svg?branch=master)](https://coveralls.io/github/s-rah/go-ricochet?branch=master)
|
||||
|
||||
GoRicochet is an experimental implementation of the [Ricochet Protocol](https://ricochet.im)
|
||||
libricochet-go is an experimental implementation of the [Ricochet Protocol](https://ricochet.im)
|
||||
in Go.
|
||||
|
||||
## Features
|
||||
|
@ -15,8 +15,8 @@ Below is a simple echo bot, which responds to any chat message. You can also fin
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -2,10 +2,10 @@ package application
|
|||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"log"
|
||||
"net"
|
||||
"sync"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package application
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
)
|
||||
|
||||
// ApplicationInstance is a concrete instance of a ricochet application, encapsulating a connection
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
@ -84,7 +84,7 @@ func main() {
|
|||
}
|
||||
})
|
||||
|
||||
echobot.Init(pk, af, new(application.AcceptAllContactManager))
|
||||
echobot.Init("echobot", pk, af, new(application.AcceptAllContactManager))
|
||||
log.Printf("echobot listening on %s", l.Addr().String())
|
||||
echobot.Run(l)
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@ package channels
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/chat"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/chat"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ package channels
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/chat"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/chat"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -2,9 +2,9 @@ package channels
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/contact"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/contact"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
)
|
||||
|
||||
// Defining Versions
|
||||
|
|
|
@ -2,9 +2,9 @@ package channels
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/contact"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/contact"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package channels
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
)
|
||||
|
||||
// Handler reacts to low-level events on a protocol channel. There
|
||||
|
|
|
@ -8,10 +8,10 @@ import (
|
|||
"crypto/sha256"
|
||||
"encoding/asn1"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/auth"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/auth"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"io"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"bytes"
|
||||
"crypto/rsa"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package connection
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
)
|
||||
|
||||
// AuthorizationManager helps keep track of permissions for a connection
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package connection
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
)
|
||||
|
||||
// AutoConnectionHandler implements the ConnectionHandler interface on behalf of
|
||||
|
|
|
@ -2,9 +2,9 @@ package connection
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package connection
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package connection
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"io"
|
||||
"log"
|
||||
"sync"
|
||||
|
|
|
@ -2,8 +2,8 @@ package connection
|
|||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"net"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
|
@ -2,8 +2,8 @@ package connection
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
)
|
||||
|
||||
// ControlChannel encapsulates logic for the control channel processing
|
||||
|
|
|
@ -2,9 +2,9 @@ package connection
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package connection
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
)
|
||||
|
||||
// Handler reacts to low-level events on a protocol connection.
|
||||
|
|
|
@ -2,10 +2,10 @@ package connection
|
|||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"github.com/s-rah/go-ricochet/policies"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/policies"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package connection
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"github.com/s-rah/go-ricochet/policies"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/policies"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"crypto"
|
||||
"crypto/rsa"
|
||||
"encoding/asn1"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
)
|
||||
|
||||
// Identity is an encapsulation of Name, PrivateKey and other features
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package goricochet
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"io"
|
||||
"net"
|
||||
"testing"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package goricochet
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"net"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package policies
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package goricochet
|
||||
|
||||
import (
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"io"
|
||||
"net"
|
||||
)
|
||||
|
|
|
@ -2,9 +2,9 @@ package testing
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
|
||||
"log"
|
||||
"runtime"
|
||||
"strconv"
|
||||
|
|
|
@ -2,10 +2,10 @@ package utils
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/wire/auth"
|
||||
"github.com/s-rah/go-ricochet/wire/chat"
|
||||
"github.com/s-rah/go-ricochet/wire/contact"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/auth"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/chat"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/contact"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
)
|
||||
|
||||
// MessageBuilder allows a client to construct specific data packets for the
|
||||
|
|
|
@ -2,7 +2,7 @@ package utils
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ package Protocol_Data_AuthHiddenService
|
|||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import Protocol_Data_Control "github.com/s-rah/go-ricochet/wire/control"
|
||||
import Protocol_Data_Control "git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
|
|
|
@ -17,7 +17,7 @@ package Protocol_Data_ContactRequest
|
|||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import Protocol_Data_Control "github.com/s-rah/go-ricochet/wire/control"
|
||||
import Protocol_Data_Control "git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
|
|
Reference in New Issue