Versions in this module Expand all Collapse all v1 v1.0.0 Sep 5, 2026 Changes in this version + var DB *gorm.DB + var MonitorDB *gorm.DB + func Checkpoint() + func CountSnapshotsByEnvironmentID(envID uint) (int64, error) + func DeleteAccountByID(accountID uint) error + func DeleteAccountSiteByID(id uint) error + func DeleteDomainByID(id uint) error + func DeleteEnvironmentByID(envID uint) error + func DeleteProviderByID(id uint) error + func DeleteSiteByID(siteID uint) error + func GetConfiguration(captainID uint, key string) (string, error) + func GetSystemLoad() float64 + func InitDB() error + func InitMonitorDB() error + func InsertSnapshot(snapshot *Snapshot) error + func LogMonitorRunEnd(runID uint, siteCount, errorCount, retryAttempts, restoredCount int, ...) + func LogMonitorRunSkipped(parallelism int) + func LogMonitorRunStart(command string, parallelism int) uint + func ParseTargetString(target string) (environment string, minorTargets []string) + func SetConfiguration(captainID uint, key, value string) error + func UpsertAccount(account Account) error + func UpsertAccountDomain(ad AccountDomain) error + func UpsertAccountSite(as AccountSite) error + func UpsertAccountUser(au AccountUser) error + func UpsertConnection(conn Connection) error + func UpsertDomain(d Domain) error + func UpsertEnvironment(env Environment, skipUsers bool) error + func UpsertProvider(p Provider) error + func UpsertRecipe(recipe *Recipe) error + func UpsertSite(site Site) error + type Account struct + AccountID uint + BillingUserID uint + CreatedAt string + Defaults string + Metrics string + Name string + Plan string + Status string + UpdatedAt string + func GetAccountByID(id uint) (*Account, error) + func (Account) TableName() string + type AccountDomain struct + AccountDomainID uint + AccountID uint + CreatedAt string + DomainID uint + UpdatedAt string + func (AccountDomain) TableName() string + type AccountSite struct + AccountID uint + AccountSiteID uint + CreatedAt string + SiteID uint + UpdatedAt string + func (AccountSite) TableName() string + type AccountUser struct + AccountID uint + AccountUserID uint + CreatedAt string + Level string + UpdatedAt string + UserID uint + func (AccountUser) TableName() string + type AuthDetails struct + Password string + Username string + type BackupSettings struct + Active bool + Interval string + Mode string + type Capture struct + CaptureID uint + CreatedAt string + EnvironmentID uint + GitCommit string + Pages string + SiteID uint + func (Capture) TableName() string + type Configuration struct + CaptainID uint + ConfigKey string + ConfigValue string + ConfigurationID uint + CreatedAt string + UpdatedAt string + func (Configuration) TableName() string + type Connection struct + CreatedAt string + Domain string + ID uint + Token string + func GetAllConnections() ([]Connection, error) + func GetConnectionByDomain(domain string) (*Connection, error) + func (Connection) TableName() string + type Domain struct + CreatedAt string + Details string + DomainID uint + Name string + Price string + ProviderDomainID string + ProviderID string + RemoteID string + Status string + UpdatedAt string + func (Domain) TableName() string + type Environment struct + Address string + CapturePages string + Core string + CoreVerifyChecksums string + CreatedAt string + DatabaseName string + DatabasePassword string + DatabaseUsername string + Details string + Environment string + EnvironmentID uint + Fathom string + HomeDirectory string + HomeURL string + MonitorEnabled string + OffloadAccessKey string + OffloadBucket string + OffloadEnabled string + OffloadPath string + OffloadProvider string + OffloadSecretKey string + PHPMemory string + Password string + Plugins string + Port string + Protocol string + Screenshot string + SiteID uint + Storage string + SubsiteCount string + Themes string + Token string + UpdatedAt string + UpdatesEnabled string + UpdatesExcludePlugins string + UpdatesExcludeThemes string + Username string + Users string + Visits string + func FindEnvironmentsBySiteID(siteID uint) ([]Environment, error) + func GetEnvironmentByID(id uint) (*Environment, error) + func (Environment) TableName() string + func (e *Environment) ParseDetails() EnvironmentDetails + type EnvironmentDetails struct + Auth *AuthDetails + CapturePluginPages []string + ConsoleErrors json.RawMessage + Fathom json.RawMessage + ScreenshotBase string + type FetchSiteMatchingArgs struct + Environment string + Field string + Filter *SiteFilter + Provider string + Targets []string + type Key struct + CreatedAt string + Fingerprint string + KeyID uint + Main bool + Title string + UpdatedAt string + UserID uint + func (Key) TableName() string + type MonitorRun struct + Command string + Duration int64 + EndTime int64 + ErrorCount int + ID uint + NotificationSent bool + Parallelism int + RestoredCount int + RetryAttempts int + SiteCount int + StartTime int64 + Status string + SystemLoad float64 + func (MonitorRun) TableName() string + type Provider struct + Configurations string + CreatedAt string + Credentials string + Details string + Name string + Provider string + ProviderID uint + Status string + UpdatedAt string + UserID uint + func GetAllProviders() ([]Provider, error) + func GetProviderByID(id uint) (*Provider, error) + func (Provider) TableName() string + func (p *Provider) GetCredential(name string) string + func (p *Provider) GetCredentialsMap() map[string]string + type Recipe struct + Content string + CreatedAt string + RecipeID uint + Title string + UpdatedAt string + func GetRecipeByID(recipeID uint) (*Recipe, error) + func (Recipe) TableName() string + type Site struct + AccountID uint + CreatedAt string + CustomerID uint + Details string + Name string + Provider string + ProviderID string + ProviderSiteID string + Screenshot string + Site string + SiteID uint + Status string + Token string + UpdatedAt string + func GetAllActiveSites() ([]Site, error) + func GetSiteByID(id uint) (*Site, error) + func GetSiteByName(name string) (*Site, error) + func GetSiteByNameAndProvider(name, provider string) (*Site, error) + func GetSiteByProviderSiteID(providerSiteID, provider string) (*Site, error) + func SearchSites(search, searchField string) ([]Site, error) + func (Site) TableName() string + func (s *Site) ParseDetails() SiteDetails + type SiteDetails struct + BackupSettings *BackupSettings + ConsoleErrors json.RawMessage + Core json.RawMessage + EnvironmentVars json.RawMessage + Key string + Mailgun json.RawMessage + RemoteKey string + Removed json.RawMessage + ScreenshotBase string + Storage json.RawMessage + Subsites json.RawMessage + Verify json.RawMessage + Visits json.RawMessage + type SiteEnvironmentResult struct + Address string + Core string + DatabasePassword string + DatabaseUsername string + Environment string + HomeDirField string + HomeURL string + MonitorEnabled string + Name string + Plugins string + Port string + Provider string + Site string + SiteID uint + Storage string + Themes string + UpdatesEnabled string + UpdatesExcludePlugins string + UpdatesExcludeThemes string + Username string + Visits string + func FetchSitesMatching(args FetchSiteMatchingArgs) ([]SiteEnvironmentResult, error) + type SiteFilter struct + Name string + Status string + Type string + Version string + type Snapshot struct + CreatedAt string + Email string + EnvironmentID uint + ExpiresAt string + Notes string + SiteID uint + SnapshotID uint + SnapshotName string + Storage string + Token string + UserID uint + func GetSnapshotByID(id uint) (*Snapshot, error) + func GetSnapshotsByEnvironmentID(envID uint, limit int) ([]Snapshot, error) + func (Snapshot) TableName() string