Files
storage-appliance/internal/domain/domain.go

66 lines
949 B
Go

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
}