61 lines
1.7 KiB
Go
61 lines
1.7 KiB
Go
package db
|
|
|
|
import "time"
|
|
|
|
type User struct {
|
|
ID int64 `json:"id"`
|
|
Username string `json:"username"`
|
|
UID *int64 `json:"uid,omitempty"`
|
|
GID *int64 `json:"gid,omitempty"`
|
|
Groups []string `json:"groups"`
|
|
SMBEnabled bool `json:"smb_enabled"`
|
|
Disabled bool `json:"disabled"`
|
|
// PendingPassword holds a not-yet-applied password. Never serialized.
|
|
PendingPassword string `json:"-"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Admin struct {
|
|
ID int64 `json:"id"`
|
|
Username string `json:"username"`
|
|
PasswordHash string `json:"-"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type SambaShare struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Path string `json:"path"`
|
|
Comment string `json:"comment"`
|
|
ReadOnly bool `json:"read_only"`
|
|
GuestOK bool `json:"guest_ok"`
|
|
ValidUsers []string `json:"valid_users"`
|
|
ValidGroups []string `json:"valid_groups"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type NFSExport struct {
|
|
ID int64 `json:"id"`
|
|
Path string `json:"path"`
|
|
Clients []string `json:"clients"`
|
|
Options string `json:"options"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type DirtyModule struct {
|
|
Module string `json:"module"`
|
|
MarkedAt time.Time `json:"marked_at"`
|
|
}
|
|
|
|
type ApplyLogEntry struct {
|
|
ID int64 `json:"id"`
|
|
Module string `json:"module"`
|
|
Message string `json:"message"`
|
|
Success bool `json:"success"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|