Documentation ¶
Index ¶
- func NewPostgres(url url.URL) (db.DB, error)
- type DB
- func (q DB) AddCredential(ctx context.Context, credential *models.UserCredential) error
- func (db DB) BeginTx(ctx context.Context) (db.Tx, error)
- func (q DB) CreateApp(ctx context.Context, app *models.App) error
- func (q DB) CreateDeployment(ctx context.Context, deployment *models.Deployment) error
- func (q DB) CreateDomain(ctx context.Context, domain *models.Domain) error
- func (q DB) CreateSiteIfNotExist(ctx context.Context, site *models.Site) (*db.SiteInfo, error)
- func (q DB) CreateUser(ctx context.Context, user *models.User) error
- func (q DB) DeleteCertificateData(ctx context.Context, key string) error
- func (q DB) DeleteDomain(ctx context.Context, id string, now time.Time) error
- func (q DB) DeleteExpiredDeployments(ctx context.Context, now time.Time, expireBefore time.Time) (int64, error)
- func (q DB) GetApp(ctx context.Context, id string) (*models.App, error)
- func (q DB) GetCertDataEntry(ctx context.Context, key string) (*models.CertDataEntry, error)
- func (q DB) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error)
- func (q DB) GetDeployment(ctx context.Context, appID string, id string) (*models.Deployment, error)
- func (q DB) GetDeploymentByName(ctx context.Context, appID string, name string) (*models.Deployment, error)
- func (q DB) GetDeploymentSiteNames(ctx context.Context, deployment *models.Deployment) ([]string, error)
- func (q DB) GetDomainByName(ctx context.Context, domainName string) (*models.Domain, error)
- func (q DB) GetDomainBySite(ctx context.Context, appID string, siteName string) (*models.Domain, error)
- func (q DB) GetSiteByName(ctx context.Context, appID string, name string) (*models.Site, error)
- func (q DB) GetSiteDeployment(ctx context.Context, appID string, siteName string) (*models.Deployment, error)
- func (q DB) GetSiteInfo(ctx context.Context, appID string, siteID string) (*db.SiteInfo, error)
- func (q DB) GetUser(ctx context.Context, id string) (*models.User, error)
- func (q DB) ListApps(ctx context.Context, credentialIDs []models.CredentialID) ([]*models.App, error)
- func (q DB) ListCertificateData(ctx context.Context, prefix string) ([]string, error)
- func (q DB) ListCredentialIDs(ctx context.Context, userID string) ([]models.CredentialID, error)
- func (q DB) ListDeployments(ctx context.Context, appID string) ([]db.DeploymentInfo, error)
- func (q DB) ListDomains(ctx context.Context, appID string) ([]*models.Domain, error)
- func (q DB) ListSitesInfo(ctx context.Context, appID string) ([]db.SiteInfo, error)
- func (d DB) Locker(ctx context.Context) (db.LockerDB, error)
- func (q DB) MarkDeploymentUploaded(ctx context.Context, now time.Time, deployment *models.Deployment) error
- func (q DB) SetCertDataEntry(ctx context.Context, entry *models.CertDataEntry) error
- func (q DB) SetDeploymentExpiry(ctx context.Context, deployment *models.Deployment) error
- func (q DB) SetSiteDeployment(ctx context.Context, site *models.Site) error
- func (q DB) UpdateAppConfig(ctx context.Context, app *models.App) error
- func (q DB) UpdateCredentialData(ctx context.Context, cred *models.UserCredential) error
- type Tx
- func (q Tx) AddCredential(ctx context.Context, credential *models.UserCredential) error
- func (t Tx) Commit() error
- func (q Tx) CreateApp(ctx context.Context, app *models.App) error
- func (q Tx) CreateDeployment(ctx context.Context, deployment *models.Deployment) error
- func (q Tx) CreateDomain(ctx context.Context, domain *models.Domain) error
- func (q Tx) CreateSiteIfNotExist(ctx context.Context, site *models.Site) (*db.SiteInfo, error)
- func (q Tx) CreateUser(ctx context.Context, user *models.User) error
- func (q Tx) DeleteCertificateData(ctx context.Context, key string) error
- func (q Tx) DeleteDomain(ctx context.Context, id string, now time.Time) error
- func (q Tx) DeleteExpiredDeployments(ctx context.Context, now time.Time, expireBefore time.Time) (int64, error)
- func (q Tx) GetApp(ctx context.Context, id string) (*models.App, error)
- func (q Tx) GetCertDataEntry(ctx context.Context, key string) (*models.CertDataEntry, error)
- func (q Tx) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error)
- func (q Tx) GetDeployment(ctx context.Context, appID string, id string) (*models.Deployment, error)
- func (q Tx) GetDeploymentByName(ctx context.Context, appID string, name string) (*models.Deployment, error)
- func (q Tx) GetDeploymentSiteNames(ctx context.Context, deployment *models.Deployment) ([]string, error)
- func (q Tx) GetDomainByName(ctx context.Context, domainName string) (*models.Domain, error)
- func (q Tx) GetDomainBySite(ctx context.Context, appID string, siteName string) (*models.Domain, error)
- func (q Tx) GetSiteByName(ctx context.Context, appID string, name string) (*models.Site, error)
- func (q Tx) GetSiteDeployment(ctx context.Context, appID string, siteName string) (*models.Deployment, error)
- func (q Tx) GetSiteInfo(ctx context.Context, appID string, siteID string) (*db.SiteInfo, error)
- func (q Tx) GetUser(ctx context.Context, id string) (*models.User, error)
- func (q Tx) ListApps(ctx context.Context, credentialIDs []models.CredentialID) ([]*models.App, error)
- func (q Tx) ListCertificateData(ctx context.Context, prefix string) ([]string, error)
- func (q Tx) ListCredentialIDs(ctx context.Context, userID string) ([]models.CredentialID, error)
- func (q Tx) ListDeployments(ctx context.Context, appID string) ([]db.DeploymentInfo, error)
- func (q Tx) ListDomains(ctx context.Context, appID string) ([]*models.Domain, error)
- func (q Tx) ListSitesInfo(ctx context.Context, appID string) ([]db.SiteInfo, error)
- func (q Tx) MarkDeploymentUploaded(ctx context.Context, now time.Time, deployment *models.Deployment) error
- func (t Tx) Rollback() error
- func (q Tx) SetCertDataEntry(ctx context.Context, entry *models.CertDataEntry) error
- func (q Tx) SetDeploymentExpiry(ctx context.Context, deployment *models.Deployment) error
- func (q Tx) SetSiteDeployment(ctx context.Context, site *models.Site) error
- func (q Tx) UpdateAppConfig(ctx context.Context, app *models.App) error
- func (q Tx) UpdateCredentialData(ctx context.Context, cred *models.UserCredential) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (DB) AddCredential ¶
func (q DB) AddCredential(ctx context.Context, credential *models.UserCredential) error
func (DB) CreateDeployment ¶
func (q DB) CreateDeployment(ctx context.Context, deployment *models.Deployment) error
func (DB) CreateDomain ¶ added in v0.5.0
func (DB) CreateSiteIfNotExist ¶
func (DB) DeleteCertificateData ¶
func (DB) DeleteDomain ¶ added in v0.5.0
func (DB) DeleteExpiredDeployments ¶
func (DB) GetCertDataEntry ¶
func (DB) GetCredential ¶
func (q DB) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error)
func (DB) GetDeployment ¶
func (DB) GetDeploymentByName ¶
func (DB) GetDeploymentSiteNames ¶
func (DB) GetDomainByName ¶ added in v0.5.0
func (DB) GetDomainBySite ¶ added in v0.5.0
func (DB) GetSiteByName ¶
func (DB) GetSiteDeployment ¶
func (DB) GetSiteInfo ¶
func (DB) ListCertificateData ¶
func (DB) ListCredentialIDs ¶
func (DB) ListDeployments ¶
func (DB) ListDomains ¶ added in v0.5.0
func (DB) ListSitesInfo ¶
func (DB) MarkDeploymentUploaded ¶
func (DB) SetCertDataEntry ¶
func (q DB) SetCertDataEntry(ctx context.Context, entry *models.CertDataEntry) error
func (DB) SetDeploymentExpiry ¶
func (q DB) SetDeploymentExpiry(ctx context.Context, deployment *models.Deployment) error
func (DB) SetSiteDeployment ¶
func (DB) UpdateCredentialData ¶
func (q DB) UpdateCredentialData(ctx context.Context, cred *models.UserCredential) error
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (Tx) AddCredential ¶
func (q Tx) AddCredential(ctx context.Context, credential *models.UserCredential) error
func (Tx) CreateDeployment ¶
func (q Tx) CreateDeployment(ctx context.Context, deployment *models.Deployment) error
func (Tx) CreateDomain ¶ added in v0.5.0
func (Tx) CreateSiteIfNotExist ¶
func (Tx) DeleteCertificateData ¶
func (Tx) DeleteDomain ¶ added in v0.5.0
func (Tx) DeleteExpiredDeployments ¶
func (Tx) GetCertDataEntry ¶
func (Tx) GetCredential ¶
func (q Tx) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error)
func (Tx) GetDeployment ¶
func (Tx) GetDeploymentByName ¶
func (Tx) GetDeploymentSiteNames ¶
func (Tx) GetDomainByName ¶ added in v0.5.0
func (Tx) GetDomainBySite ¶ added in v0.5.0
func (Tx) GetSiteByName ¶
func (Tx) GetSiteDeployment ¶
func (Tx) GetSiteInfo ¶
func (Tx) ListCertificateData ¶
func (Tx) ListCredentialIDs ¶
func (Tx) ListDeployments ¶
func (Tx) ListDomains ¶ added in v0.5.0
func (Tx) ListSitesInfo ¶
func (Tx) MarkDeploymentUploaded ¶
func (Tx) SetCertDataEntry ¶
func (q Tx) SetCertDataEntry(ctx context.Context, entry *models.CertDataEntry) error
func (Tx) SetDeploymentExpiry ¶
func (q Tx) SetDeploymentExpiry(ctx context.Context, deployment *models.Deployment) error
func (Tx) SetSiteDeployment ¶
func (Tx) UpdateCredentialData ¶
func (q Tx) UpdateCredentialData(ctx context.Context, cred *models.UserCredential) error
Click to show internal directories.
Click to hide internal directories.