mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
- db: channel_queries (ListChannels, GetChannel, CRUD, permissions),
message_queries (CreateMessage, GetMessage, GetMessages paginated,
EditMessage, DeleteMessage soft, AddReaction, RemoveReaction,
GetReactions, SearchMessages FTS5, UpdateReadState)
- db: fix in-memory DB isolation — SetMaxOpenConns(1) for :memory: path
- ws/hub: replace stub with full Hub (register/unregister, broadcast to
channel/all, send to user, thread-safe, buffered broadcast channel)
- ws/client: Client with send channel, NewTestClient helpers for tests
- ws/handlers: dispatch chat_send/edit/delete, reaction_add/remove,
typing_start, presence_update — all with rate limiting and permission checks
- ws/messages: JSON builder helpers for all server→client message types
- ws/serve: ServeWS HTTP handler, WS auth handshake (10s timeout),
ready payload, writePump/readPump goroutines, graceful disconnect
- api: channel_handler — GET /channels, GET /channels/{id}/messages,
GET /search; fixed double-mount of /api/v1 route group
- api/router: mount channel routes, start hub, register /api/v1/ws
Test coverage: api 77.6%, auth 90.9%, db 84.2%, ws 26.7% (serve.go
requires live WS connection; hub/handlers/messages fully covered)
40 lines
1.4 KiB
AMPL
40 lines
1.4 KiB
AMPL
module github.com/owncord/server
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/go-chi/chi/v5 v5.2.5
|
|
github.com/knadh/koanf/parsers/yaml v1.1.0
|
|
github.com/knadh/koanf/providers/env v1.1.0
|
|
github.com/knadh/koanf/providers/file v1.2.1
|
|
github.com/knadh/koanf/providers/structs v1.0.0
|
|
github.com/knadh/koanf/v2 v2.3.3
|
|
github.com/microcosm-cc/bluemonday v1.0.27
|
|
go.yaml.in/yaml/v3 v3.0.3
|
|
golang.org/x/crypto v0.49.0
|
|
modernc.org/sqlite v1.46.1
|
|
nhooyr.io/websocket v1.8.17
|
|
)
|
|
|
|
require (
|
|
github.com/aymerick/douceur v0.2.0 // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/fatih/structs v1.1.0 // indirect
|
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
|
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/gorilla/css v1.0.1 // indirect
|
|
github.com/knadh/koanf/maps v0.1.2 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mitchellh/copystructure v1.2.0 // indirect
|
|
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
|
|
golang.org/x/net v0.51.0 // indirect
|
|
golang.org/x/sys v0.42.0 // indirect
|
|
modernc.org/libc v1.67.6 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.11.0 // indirect
|
|
)
|