Documentation ¶
Index ¶
- Variables
- func WithTx(ctx context.Context, db DB, fn func(Tx) error) error
- type AppsDB
- type CertStorage
- func (s *CertStorage) Delete(ctx context.Context, key string) error
- func (s *CertStorage) Exists(ctx context.Context, key string) bool
- func (s *CertStorage) List(ctx context.Context, prefix string, recursive bool) ([]string, error)
- func (s *CertStorage) Load(ctx context.Context, key string) ([]byte, error)
- func (s *CertStorage) Lock(ctx context.Context, name string) error
- func (s *CertStorage) Stat(ctx context.Context, key string) (certmagic.KeyInfo, error)
- func (s *CertStorage) Store(ctx context.Context, key string, value []byte) error
- func (s *CertStorage) Unlock(ctx context.Context, name string) error
- type CertificateDB
- type DB
- type DBQuery
- type DeploymentInfo
- type DeploymentsDB
- type DomainsDB
- type Factory
- type LockerDB
- type SiteInfo
- type SitesDB
- type Tx
- type UserDB
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRollback = errors.New("rollback tx")
View Source
var FactoryMap = make(map[string]Factory)
Functions ¶
Types ¶
type CertStorage ¶
type CertStorage struct { DB DB // contains filtered or unexported fields }
func NewCertStorage ¶
func NewCertStorage(db DB, pass string) *CertStorage
type CertificateDB ¶
type CertificateDB interface { GetCertDataEntry(ctx context.Context, key string) (*models.CertDataEntry, error) SetCertDataEntry(ctx context.Context, entry *models.CertDataEntry) error DeleteCertificateData(ctx context.Context, key string) error ListCertificateData(ctx context.Context, prefix string) ([]string, error) }
type DB ¶
type DBQuery ¶
type DBQuery interface { AppsDB SitesDB DeploymentsDB DomainsDB UserDB CertificateDB }
type DeploymentInfo ¶
type DeploymentInfo struct { *models.Deployment FirstSiteName *string `db:"site_name"` }
type DeploymentsDB ¶
type DeploymentsDB interface { CreateDeployment(ctx context.Context, deployment *models.Deployment) error GetDeployment(ctx context.Context, appID string, id string) (*models.Deployment, error) GetDeploymentByName(ctx context.Context, appID string, name string) (*models.Deployment, error) ListDeployments(ctx context.Context, appID string) ([]DeploymentInfo, error) MarkDeploymentUploaded(ctx context.Context, now time.Time, deployment *models.Deployment) error GetSiteDeployment(ctx context.Context, appID string, siteName string) (*models.Deployment, error) GetDeploymentSiteNames(ctx context.Context, deployment *models.Deployment) ([]string, error) SetDeploymentExpiry(ctx context.Context, deployment *models.Deployment) error DeleteExpiredDeployments(ctx context.Context, now time.Time, expireBefore time.Time) (int64, error) }
type DomainsDB ¶ added in v0.5.0
type DomainsDB interface { CreateDomain(ctx context.Context, domain *models.Domain) error GetDomainByName(ctx context.Context, domain string) (*models.Domain, error) GetDomainBySite(ctx context.Context, appID string, siteName string) (*models.Domain, error) DeleteDomain(ctx context.Context, id string, now time.Time) error ListDomains(ctx context.Context, appID string) ([]*models.Domain, error) }
type SitesDB ¶
type SitesDB interface { CreateSiteIfNotExist(ctx context.Context, site *models.Site) (*SiteInfo, error) GetSiteByName(ctx context.Context, appID string, siteName string) (*models.Site, error) GetSiteInfo(ctx context.Context, appID string, id string) (*SiteInfo, error) ListSitesInfo(ctx context.Context, appID string) ([]SiteInfo, error) SetSiteDeployment(ctx context.Context, site *models.Site) error }
type UserDB ¶
type UserDB interface { GetUser(ctx context.Context, id string) (*models.User, error) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error) CreateUser(ctx context.Context, user *models.User) error AddCredential(ctx context.Context, credential *models.UserCredential) error UpdateCredentialData(ctx context.Context, cred *models.UserCredential) error ListCredentialIDs(ctx context.Context, userID string) ([]models.CredentialID, error) }
Click to show internal directories.
Click to hide internal directories.