77 lines
1.1 KiB
Go
77 lines
1.1 KiB
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 PoolHealth struct {
|
|
Pool string
|
|
Status string
|
|
Detail string
|
|
}
|
|
|
|
type Snapshot struct {
|
|
Name string
|
|
Dataset string
|
|
CreatedAt time.Time
|
|
}
|
|
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
|
|
}
|