Add initial Go server skeleton with HTTP handlers, middleware, job runner, and stubs

This commit is contained in:
Dev
2025-12-13 15:18:04 +00:00
commit 61570cae23
28 changed files with 921 additions and 0 deletions

65
internal/domain/domain.go Normal file
View File

@@ -0,0 +1,65 @@
package domain
import "time"
type UUID string
type User struct {
ID UUID `json:"id" db:"id"`
Username string `json:"username" db:"username"`
Password string `json:"-" db:"password_hash"`
Role string `json:"role" db:"role"`
CreatedAt time.Time
}
type Role struct {
Name string
Permissions []string
}
type Disk struct {
ID UUID
Path string
Serial string
Model string
Size int64
Health string
}
type Pool struct {
Name string
GUID string
Health string
Capacity string
}
type Dataset struct {
Name string
Pool string
Type string
Config map[string]string
}
type Share struct {
ID UUID
Name string
Path string
Type string // nfs or smb
}
type LUN struct {
ID UUID
TargetIQN string
LUNID int
Path string
}
type Job struct {
ID UUID
Type string
Status string
Progress int
Owner UUID
CreatedAt time.Time
UpdatedAt time.Time
}