feat(project): switch go modules

This commit is contained in:
Dustin Stiles 2025-03-25 13:14:27 -04:00
parent 159ec353ff
commit eb2b596f77
Signed by: duwstiles
GPG Key ID: BCD9912EC231FC87
26 changed files with 54 additions and 83 deletions

View File

@ -4,15 +4,15 @@
## Documentation
- [dsfx standard docs](https://koti.casa/numenor-labs/dsfx/src/branch/main/docs/README.md)
- [dsfx standard docs](./docs/README.md)
## Start
```bash
# Run a server
go run koti.casa/numenor-labs/dsfx/cmd/dsfx@main
go run numenor-labs.us/dsfx/cmd/dsfx@main
# serving: dsfx://0.0.0.0:8000#<ed25519_public_key>
# Get the client
go run koti.casa/numenor-labs/dsfx/cmd/dsfxctl@main test dsfx://0.0.0.0:8000#<ed25519_public_key>
go run numenor-labs.us/dsfx/cmd/dsfxctl@main test dsfx://0.0.0.0:8000#<ed25519_public_key>
```

View File

@ -3,9 +3,9 @@ package main
import (
"context"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"koti.casa/numenor-labs/dsfx/internal/lib/system"
"koti.casa/numenor-labs/dsfx/internal/peer"
"numenor-labs.us/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/system"
"numenor-labs.us/dsfx/internal/peer"
)
func main() {

View File

@ -3,9 +3,9 @@ package main
import (
"context"
"koti.casa/numenor-labs/dsfx/internal/client"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"koti.casa/numenor-labs/dsfx/internal/lib/system"
"numenor-labs.us/dsfx/internal/client"
"numenor-labs.us/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/system"
)
func main() {

View File

@ -1,7 +1,7 @@
# DSFX Internals
Welcome, friend! You are viewing the DSFX internal documentation. If you want to _use_
DSFX, you don't need to read this and could head straight to our user-level docs [here](https://koti.casa/numenor-labs/dsfx/src/branch/main/docs/README.md).
DSFX, you don't need to read this and could head straight to our user-level docs [here](../README.md).
If you want to learn how DSFX works inside, here's what we got:

View File

@ -8,7 +8,7 @@ server on your deployment machine.
If you opted to _not_ install dsfx locally, then you can run it directly with the go toolchain.
```bash
go run koti.casa/numenor-labs/dsfx/cmd/dsfx@main
go run numenor-labs.us/dsfx/cmd/dsfx@main
```
Otherwise, you can run the server with the `dsfx` command. For those who built

View File

@ -38,42 +38,13 @@ are a few commands for various operating systems (not comprehensive):
If the above commands don't work for you, please refer to the official
documentation for your operating system.
### Git Setup
Currently we are hosted on **gitea cloud**, which hides everything from the
public internet by default. This means that the machine you are deploying to
will need to be able to access the gitea cloud instance. One way to do this is
to use the `.netrc` file in conjunction with a personal access token. Once you
have a personal access token, you can create a `.netrc` file in your home
directory with the following contents:
```plaintext
machine koti.casa login <your username> password <gitea personal access token>
```
Finally, you'll need to set the `GOPRIVATE` environment variable to allow go to fetch
private repositories. You can do this by running the following command:
```bash
export GOPRIVATE=koti.casa
```
If you want to persist this setting across sessions, you can add the above line to your
`~/.bashrc` or `~/.bash_profile`.
### Stopping Point
At this point, you should have the go toolchain installed and configured. If you
only want to run the server, and you don't care to actually install it, you can
you can skip directly the [deploying docs](./deploying.md).
### Installation
Now that you have the go toolchain set up with access to our repository, you can simply install the
project by using the `go install` command.
```bash
go install koti.casa/numenorlabs/dsfx/cmd/dsfx@main
go install numenor-labs.us/dsfx/cmd/dsfx@main
```
Assuming that you have the `GOPATH` environment variable set up correctly, you will now be able to

2
go.mod
View File

@ -1,3 +1,3 @@
module koti.casa/numenor-labs/dsfx
module numenor-labs.us/dsfx
go 1.24.1

View File

@ -13,12 +13,12 @@ import (
"net"
"os"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"koti.casa/numenor-labs/dsfx/internal/lib/logging"
"koti.casa/numenor-labs/dsfx/internal/lib/network"
"koti.casa/numenor-labs/dsfx/internal/lib/storage/scoped"
"koti.casa/numenor-labs/dsfx/internal/lib/system"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/logging"
"numenor-labs.us/dsfx/internal/lib/network"
"numenor-labs.us/dsfx/internal/lib/storage/scoped"
"numenor-labs.us/dsfx/internal/lib/system"
)
const (

View File

@ -4,7 +4,7 @@ import (
"crypto/rand"
"testing"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/encryption"
"numenor-labs.us/dsfx/internal/lib/crypto/encryption"
)
func TestEncryptDecrypt(t *testing.T) {

View File

@ -3,7 +3,7 @@ package disk_test
import (
"testing"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/disk"
)
func TestDefaultDisk(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"bytes"
"testing"
"koti.casa/numenor-labs/dsfx/internal/lib/frame"
"numenor-labs.us/dsfx/internal/lib/frame"
)
func TestLenPrefixedWriteTo(t *testing.T) {

View File

@ -1,7 +1,7 @@
goos: linux
goarch: amd64
pkg: koti.casa/numenor-labs/dsfx/internal/lib/handshake
pkg: numenor-labs.us/dsfx/internal/lib/handshake
cpu: Intel(R) Core(TM) Ultra 9 185H
BenchmarkHandshake 4508 285270 ns/op 12976 B/op 131 allocs/op
PASS
ok koti.casa/numenor-labs/dsfx/internal/lib/handshake 1.291s
ok numenor-labs.us/dsfx/internal/lib/handshake 1.291s

View File

@ -10,12 +10,12 @@ import (
"io"
"log/slog"
"koti.casa/numenor-labs/dsfx/internal/lib/assert"
"koti.casa/numenor-labs/dsfx/internal/lib/buffer"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/encryption"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/keyexchange"
"koti.casa/numenor-labs/dsfx/internal/lib/logging"
"numenor-labs.us/dsfx/internal/lib/assert"
"numenor-labs.us/dsfx/internal/lib/buffer"
"numenor-labs.us/dsfx/internal/lib/crypto/encryption"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/crypto/keyexchange"
"numenor-labs.us/dsfx/internal/lib/logging"
)
const (

View File

@ -10,8 +10,8 @@ import (
"sync"
"testing"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"koti.casa/numenor-labs/dsfx/internal/lib/handshake"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/handshake"
)
func TestHandshake(t *testing.T) {

View File

@ -8,7 +8,7 @@ import (
"net"
"strings"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
)
var (

View File

@ -5,8 +5,8 @@ import (
"net"
"time"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/encryption"
"koti.casa/numenor-labs/dsfx/internal/lib/frame"
"numenor-labs.us/dsfx/internal/lib/crypto/encryption"
"numenor-labs.us/dsfx/internal/lib/frame"
)
// Conn is a wrapper around net.TCPConn that encrypts and decrypts data as it is

View File

@ -6,8 +6,8 @@ import (
"log/slog"
"net"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"koti.casa/numenor-labs/dsfx/internal/lib/handshake"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/handshake"
)
// Listener ...

View File

@ -5,8 +5,8 @@ import (
"crypto/ed25519"
"net"
"koti.casa/numenor-labs/dsfx/internal/lib/handshake"
"koti.casa/numenor-labs/dsfx/internal/lib/logging"
"numenor-labs.us/dsfx/internal/lib/handshake"
"numenor-labs.us/dsfx/internal/lib/logging"
)
// Dial ...

View File

@ -4,7 +4,7 @@ import (
"io/fs"
"path/filepath"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/disk"
)
// StorageScope is an interface that extends the disk.Disk interface by ensuring

View File

@ -4,8 +4,8 @@ import (
"io/fs"
"testing"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"koti.casa/numenor-labs/dsfx/internal/lib/storage/scoped"
"numenor-labs.us/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/storage/scoped"
)
func TestScopedStorage_Scope(t *testing.T) {

View File

@ -3,7 +3,7 @@ package system
import (
"os"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/disk"
)
// Default returns a default implementation of the System interface.

View File

@ -1,7 +1,7 @@
package system
import (
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/disk"
)
type System interface {

View File

@ -13,12 +13,12 @@ import (
"os"
"strings"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"koti.casa/numenor-labs/dsfx/internal/lib/logging"
"koti.casa/numenor-labs/dsfx/internal/lib/network"
"koti.casa/numenor-labs/dsfx/internal/lib/storage/scoped"
"koti.casa/numenor-labs/dsfx/internal/lib/system"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/logging"
"numenor-labs.us/dsfx/internal/lib/network"
"numenor-labs.us/dsfx/internal/lib/storage/scoped"
"numenor-labs.us/dsfx/internal/lib/system"
)
const (

View File

@ -8,7 +8,7 @@ import (
"sync"
"time"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/disk"
)
// Tolerance defines simulation tolerance parameters.

View File

@ -6,8 +6,8 @@ import (
"sync"
"time"
"koti.casa/numenor-labs/dsfx/internal/lib/disk"
"koti.casa/numenor-labs/dsfx/internal/lib/system"
"numenor-labs.us/dsfx/internal/lib/disk"
"numenor-labs.us/dsfx/internal/lib/system"
)
// SimSystem is a simulated implementation of system.System.

View File

@ -4,7 +4,7 @@ import (
"fmt"
"os"
"koti.casa/numenor-labs/dsfx/internal/lib/crypto/identity"
"numenor-labs.us/dsfx/internal/lib/crypto/identity"
)
func main() {