Documentation
¶
Index ¶
- func ProbeStatusLabel(kind string) string
- func RenderDashboard(w io.Writer, d Dashboard) error
- func RenderDashboardWidth(w io.Writer, d Dashboard, width int) error
- func SnapshotAgeLabel(t time.Time) string
- type ActionKind
- type ActivityPanel
- type ActivityStatus
- type BackupFreshness
- type Dashboard
- type DashboardLayout
- type Modal
- type ModalField
- type ModalFieldKind
- type ModalKind
- type ProfileAction
- type ProfileCard
- type ProfileSnapshot
- type ProfileStatus
- type ProfileView
- type Rect
- type RepositoryState
- type SnapshotLoader
- type StoreHealth
- type StoreProbe
- type StoreReachability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProbeStatusLabel ¶
func SnapshotAgeLabel ¶
Types ¶
type ActionKind ¶
type ActionKind string
const ( ActionKindInit ActionKind = "init" ActionKindBackup ActionKind = "backup" ActionKindCheck ActionKind = "check" )
type ActivityPanel ¶
type ActivityStatus ¶
type ActivityStatus string
const ( ActivityStatusIdle ActivityStatus = "" ActivityStatusRunning ActivityStatus = "running" ActivityStatusSuccess ActivityStatus = "success" ActivityStatusError ActivityStatus = "error" )
type BackupFreshness ¶
type BackupFreshness string
const ( BackupFreshnessUnknown BackupFreshness = "" BackupFreshnessNever BackupFreshness = "never" BackupFreshnessRecent BackupFreshness = "recent" BackupFreshnessStale BackupFreshness = "stale" )
type Dashboard ¶
type Dashboard struct {
ProfileCount int
StoreCount int
AuthCount int
SelectedProfile string
SelectedView ProfileView
Activity ActivityPanel
Modal *Modal
Profiles []ProfileCard
}
func BuildDashboard ¶
func BuildDashboard(cfg *engine.ProfilesConfig, probes map[string]StoreProbe) Dashboard
func BuildDashboardFromConfig ¶
func BuildDashboardFromConfig(ctx context.Context, cfg *engine.ProfilesConfig, load SnapshotLoader) Dashboard
type DashboardLayout ¶
type DashboardLayout struct {
ProfileRows map[int]string
ProfileRect Rect
ActionRows map[int]string
ActionRect Rect
}
func LayoutDashboardWidth ¶
func LayoutDashboardWidth(d Dashboard, width int) DashboardLayout
type ModalField ¶
type ModalFieldKind ¶
type ModalFieldKind string
const ( ModalFieldText ModalFieldKind = "text" ModalFieldSelect ModalFieldKind = "select" )
type ProfileAction ¶
type ProfileAction struct {
Kind ActionKind
Key string
Label string
Enabled bool
Reason string
}
type ProfileCard ¶
type ProfileCard struct {
Name string
Source string
StoreRef string
AuthRef string
Enabled bool
Status ProfileStatus
StatusNote string
StoreHealth StoreHealth
Reachability StoreReachability
Repository RepositoryState
BackupState BackupFreshness
LastBackup string
LastRef string
History []ProfileSnapshot
Actions []ProfileAction
}
type ProfileSnapshot ¶
type ProfileStatus ¶
type ProfileStatus string
const ( ProfileStatusReady ProfileStatus = "ready" ProfileStatusDisabled ProfileStatus = "disabled" ProfileStatusWarning ProfileStatus = "warning" ProfileStatusError ProfileStatus = "error" )
type ProfileView ¶
type ProfileView string
const ( ProfileViewSummary ProfileView = "summary" ProfileViewHistory ProfileView = "history" )
type RepositoryState ¶
type RepositoryState string
const ( RepositoryStateUnknown RepositoryState = "unknown" RepositoryStateInitialized RepositoryState = "initialized" RepositoryStateNotInitialized RepositoryState = "not_initialized" )
type SnapshotLoader ¶
type SnapshotLoader func(context.Context, string, engine.ProfileStore) ([]engine.SnapshotEntry, error)
type StoreHealth ¶
type StoreHealth string
const ( StoreHealthReady StoreHealth = "ready" StoreHealthPending StoreHealth = "pending" StoreHealthDisabled StoreHealth = "disabled" StoreHealthMissingStore StoreHealth = "missing_store" StoreHealthMissingAuth StoreHealth = "missing_auth" StoreHealthProviderMismatch StoreHealth = "provider_mismatch" StoreHealthNotInitialized StoreHealth = "not_initialized" StoreHealthUnknown StoreHealth = "unknown" )
type StoreProbe ¶
type StoreProbe struct {
Status string
Error string
Snapshots []engine.SnapshotEntry
}
type StoreReachability ¶
type StoreReachability string
const ( StoreReachabilityUnknown StoreReachability = "unknown" StoreReachabilityPending StoreReachability = "pending" StoreReachabilityReachable StoreReachability = "reachable" )
Click to show internal directories.
Click to hide internal directories.