- go.mod with git.eeqj.de/sneak/chat module - internal packages: globals, logger, config, db, healthcheck, middleware, handlers, server - SQLite database with embedded migration system (schema_migrations tracking) - Migration 001: schema_migrations table - Migration 002: channels table - Config with chat-specific vars (MAX_HISTORY, SESSION_TIMEOUT, MAX_MESSAGE_SIZE, MOTD, SERVER_NAME, FEDERATION_KEY) - Healthcheck endpoint at /.well-known/healthcheck.json - Makefile, .gitignore - cmd/chatd/main.go entry point
24 lines
267 B
Go
24 lines
267 B
Go
package globals
|
|
|
|
import (
|
|
"go.uber.org/fx"
|
|
)
|
|
|
|
var (
|
|
Appname string
|
|
Version string
|
|
)
|
|
|
|
type Globals struct {
|
|
Appname string
|
|
Version string
|
|
}
|
|
|
|
func New(lc fx.Lifecycle) (*Globals, error) {
|
|
n := &Globals{
|
|
Appname: Appname,
|
|
Version: Version,
|
|
}
|
|
return n, nil
|
|
}
|