Skip to content

Commit

Permalink
feat: get server building again
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Oct 30, 2024
1 parent 9f9fecd commit d53a19e
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion cmd/cs/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"log"
"github.com/cfoust/sour/pkg/cs"
"log"
)

func Test(a int) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"compress/gzip"
"flag"
"io"
"os"
"log"
"os"
"time"

I "github.com/cfoust/sour/pkg/game/io"
Expand Down
6 changes: 3 additions & 3 deletions cmd/server/auth/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"time"
"unsafe"

"github.com/cfoust/sour/svc/server/auth/crypto"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/state"
"github.com/cfoust/sour/cmd/server/auth/crypto"
"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/state"

"gorm.io/gorm"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/ingress/enet.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"sync"
"time"

"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/pkg/enet"
"github.com/cfoust/sour/pkg/game/io"
"github.com/cfoust/sour/pkg/utils"
"github.com/cfoust/sour/svc/server/state"
)

type PacketACK struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/ingress/module.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ingress

import (
"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/pkg/game/io"
"github.com/cfoust/sour/pkg/utils"
"github.com/cfoust/sour/svc/server/state"
)

// A unique identifier for this client for the lifetime of their session.
Expand Down
8 changes: 4 additions & 4 deletions cmd/server/ingress/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
"sync"
"time"

"github.com/cfoust/sour/cmd/server/auth"
"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/cmd/server/watcher"
"github.com/cfoust/sour/pkg/game/io"
"github.com/cfoust/sour/pkg/utils"
"github.com/cfoust/sour/svc/server/auth"
"github.com/cfoust/sour/svc/server/state"
"github.com/cfoust/sour/svc/server/watcher"

"github.com/fxamacker/cbor/v2"
"github.com/mileusna/useragent"
"nhooyr.io/websocket"
"github.com/rs/zerolog/log"
"nhooyr.io/websocket"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"os/signal"
"time"

"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/cmd/server/service"
"github.com/cfoust/sour/cmd/server/static"
"github.com/cfoust/sour/pkg/assets"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/ingress"
"github.com/cfoust/sour/svc/server/servers"
"github.com/cfoust/sour/svc/server/service"
"github.com/cfoust/sour/svc/server/static"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/servers/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"sync"
"time"

"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/pkg/assets"
C "github.com/cfoust/sour/pkg/game/constants"
P "github.com/cfoust/sour/pkg/game/protocol"
"github.com/cfoust/sour/pkg/maps"
"github.com/cfoust/sour/pkg/server"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/ingress"

"github.com/repeale/fp-go"
"github.com/repeale/fp-go/option"
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/service/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"time"

"github.com/cfoust/sour/cmd/server/auth"
"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/pkg/game"
P "github.com/cfoust/sour/pkg/game/protocol"
"github.com/cfoust/sour/svc/server/auth"
"github.com/cfoust/sour/svc/server/state"
)

func (c *Cluster) DoAuthChallenge(ctx context.Context, user *User, id string) (*state.User, error) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/server/service/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"strings"
"time"

"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/cmd/server/verse"
"github.com/cfoust/sour/pkg/game"
"github.com/cfoust/sour/pkg/game/commands"
"github.com/cfoust/sour/pkg/game/constants"
"github.com/cfoust/sour/pkg/server/protocol/gamemode"
"github.com/cfoust/sour/svc/server/ingress"
"github.com/cfoust/sour/svc/server/servers"
"github.com/cfoust/sour/svc/server/verse"

"github.com/repeale/fp-go/option"
"github.com/rs/zerolog/log"
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/service/cs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/cfoust/sour/pkg/game"
"github.com/cfoust/sour/pkg/utils"
C "github.com/cfoust/sour/pkg/game/constants"
P "github.com/cfoust/sour/pkg/game/protocol"
"github.com/cfoust/sour/pkg/utils"
)

//go:embed purgatory.ogz
Expand All @@ -25,7 +25,7 @@ func sendServerInfo(ctx context.Context, u *User, domain string) (P.Connect, err
info,
)
if err != nil {
return P.Connect{}, err
return P.Connect{}, err
}

connect := msg.(P.Connect)
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/service/elo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"sync"

"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/state"
"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/state"

"gorm.io/gorm"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/service/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"strings"
"time"

"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/pkg/chanlock"
"github.com/cfoust/sour/pkg/game"
"github.com/cfoust/sour/pkg/game/constants"
"github.com/cfoust/sour/pkg/game/io"
P "github.com/cfoust/sour/pkg/game/protocol"
S "github.com/cfoust/sour/pkg/server"
"github.com/cfoust/sour/svc/server/ingress"
"github.com/cfoust/sour/svc/server/servers"

"github.com/rs/zerolog/log"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/server/service/matchmaking.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"sync"
"time"

"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/pkg/game"
P "github.com/cfoust/sour/pkg/game/protocol"
"github.com/cfoust/sour/pkg/mmr"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/ingress"
"github.com/cfoust/sour/svc/server/servers"

"github.com/repeale/fp-go/option"
"github.com/rs/zerolog"
Expand Down
10 changes: 5 additions & 5 deletions cmd/server/service/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (
"sync"
"time"

"github.com/cfoust/sour/cmd/server/auth"
"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/cmd/server/verse"
"github.com/cfoust/sour/pkg/assets"
"github.com/cfoust/sour/pkg/chanlock"
"github.com/cfoust/sour/pkg/game"
"github.com/cfoust/sour/pkg/game/commands"
P "github.com/cfoust/sour/pkg/game/protocol"
"github.com/cfoust/sour/svc/server/auth"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/ingress"
"github.com/cfoust/sour/svc/server/servers"
"github.com/cfoust/sour/svc/server/verse"

"github.com/go-redis/redis/v9"
"github.com/rs/zerolog/log"
Expand Down
10 changes: 5 additions & 5 deletions cmd/server/service/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/cfoust/sour/pkg/server"
"github.com/cfoust/sour/pkg/utils"

"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/ingress"
"github.com/cfoust/sour/svc/server/servers"
"github.com/cfoust/sour/svc/server/state"
"github.com/cfoust/sour/svc/server/verse"
"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/ingress"
"github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/cmd/server/verse"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/state/module.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package state

import (
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/cmd/server/config"

"github.com/go-redis/redis/v9"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/server/stores/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"time"

"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/pkg/assets"
"github.com/cfoust/sour/pkg/utils"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/state"

"gorm.io/gorm"
)
Expand All @@ -30,7 +30,7 @@ func (s *AssetStorage) Get(ctx context.Context, asset *state.Asset) ([]byte, err
asset.Accessed = time.Now()
err := s.db.WithContext(ctx).Save(asset).Error
if err != nil {
return nil, err
return nil, err
}

return store.Get(ctx, asset.Hash)
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/verse/editing.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"time"
"unsafe"

"github.com/cfoust/sour/cmd/server/ingress"
C "github.com/cfoust/sour/pkg/game/constants"
P "github.com/cfoust/sour/pkg/game/protocol"
"github.com/cfoust/sour/pkg/maps"
"github.com/cfoust/sour/pkg/maps/worldio"
"github.com/cfoust/sour/svc/server/ingress"

"github.com/rs/zerolog/log"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/verse/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"regexp"
"time"

"github.com/cfoust/sour/cmd/server/state"
"github.com/cfoust/sour/cmd/server/stores"
"github.com/cfoust/sour/pkg/maps"
"github.com/cfoust/sour/pkg/utils"
"github.com/cfoust/sour/svc/server/state"
"github.com/cfoust/sour/svc/server/stores"

"gorm.io/gorm"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/server/verse/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"strings"
"time"

"github.com/cfoust/sour/cmd/server/config"
"github.com/cfoust/sour/cmd/server/ingress"
gameServers "github.com/cfoust/sour/cmd/server/servers"
"github.com/cfoust/sour/pkg/assets"
"github.com/cfoust/sour/pkg/game/commands"
C "github.com/cfoust/sour/pkg/game/constants"
"github.com/cfoust/sour/pkg/server"
"github.com/cfoust/sour/pkg/utils"
"github.com/cfoust/sour/svc/server/config"
"github.com/cfoust/sour/svc/server/ingress"
gameServers "github.com/cfoust/sour/svc/server/servers"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/watcher/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ type Server struct {
type Servers map[Address]Server

type Watcher struct {
serverMutex sync.Mutex
servers Servers
serverMutex sync.Mutex
servers Servers
}

func NewWatcher() *Watcher {
Expand Down

0 comments on commit d53a19e

Please sign in to comment.