postgres

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgres

func NewPostgres(url url.URL) (db.DB, error)

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) BeginTx

func (db DB) BeginTx(ctx context.Context) (db.Tx, error)

func (DB) CreateApp

func (q DB) CreateApp(ctx context.Context, app *models.App) error

func (DB) CreateDeployment

func (q DB) CreateDeployment(ctx context.Context, deployment *models.Deployment) error

func (DB) CreateDomain added in v0.5.0

func (q DB) CreateDomain(ctx context.Context, domain *models.Domain) error

func (DB) CreateSiteIfNotExist

func (q DB) CreateSiteIfNotExist(ctx context.Context, site *models.Site) (*db.SiteInfo, error)

func (DB) CreateUser

func (q DB) CreateUser(ctx context.Context, user *models.User) error

func (DB) DeleteCertificateData

func (q DB) DeleteCertificateData(ctx context.Context, key string) error

func (DB) DeleteDomain added in v0.5.0

func (q DB) DeleteDomain(ctx context.Context, id string, now time.Time) error

func (DB) DeleteExpiredDeployments

func (q DB) DeleteExpiredDeployments(ctx context.Context, now time.Time, expireBefore time.Time) (int64, error)

func (DB) GetApp

func (q DB) GetApp(ctx context.Context, id string) (*models.App, error)

func (DB) GetCertDataEntry

func (q DB) GetCertDataEntry(ctx context.Context, key string) (*models.CertDataEntry, error)

func (DB) GetCredential

func (q DB) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error)

func (DB) GetDeployment

func (q DB) GetDeployment(ctx context.Context, appID string, id string) (*models.Deployment, error)

func (DB) GetDeploymentByName

func (q DB) GetDeploymentByName(ctx context.Context, appID string, name string) (*models.Deployment, error)

func (DB) GetDeploymentSiteNames

func (q DB) GetDeploymentSiteNames(ctx context.Context, deployment *models.Deployment) ([]string, error)

func (DB) GetDomainByName added in v0.5.0

func (q DB) GetDomainByName(ctx context.Context, domainName string) (*models.Domain, error)

func (DB) GetDomainBySite added in v0.5.0

func (q DB) GetDomainBySite(ctx context.Context, appID string, siteName string) (*models.Domain, error)

func (DB) GetSiteByName

func (q DB) GetSiteByName(ctx context.Context, appID string, name string) (*models.Site, error)

func (DB) GetSiteDeployment

func (q DB) GetSiteDeployment(ctx context.Context, appID string, siteName string) (*models.Deployment, error)

func (DB) GetSiteInfo

func (q DB) GetSiteInfo(ctx context.Context, appID string, siteID string) (*db.SiteInfo, error)

func (DB) GetUser

func (q DB) GetUser(ctx context.Context, id string) (*models.User, error)

func (DB) ListApps

func (q DB) ListApps(ctx context.Context, credentialIDs []models.CredentialID) ([]*models.App, error)

func (DB) ListCertificateData

func (q DB) ListCertificateData(ctx context.Context, prefix string) ([]string, error)

func (DB) ListCredentialIDs

func (q DB) ListCredentialIDs(ctx context.Context, userID string) ([]models.CredentialID, error)

func (DB) ListDeployments

func (q DB) ListDeployments(ctx context.Context, appID string) ([]db.DeploymentInfo, error)

func (DB) ListDomains added in v0.5.0

func (q DB) ListDomains(ctx context.Context, appID string) ([]*models.Domain, error)

func (DB) ListSitesInfo

func (q DB) ListSitesInfo(ctx context.Context, appID string) ([]db.SiteInfo, error)

func (DB) Locker

func (d DB) Locker(ctx context.Context) (db.LockerDB, error)

func (DB) MarkDeploymentUploaded

func (q DB) MarkDeploymentUploaded(ctx context.Context, now time.Time, deployment *models.Deployment) error

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 (q DB) SetSiteDeployment(ctx context.Context, site *models.Site) error

func (DB) UpdateAppConfig

func (q DB) UpdateAppConfig(ctx context.Context, app *models.App) error

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) Commit

func (t Tx) Commit() error

func (Tx) CreateApp

func (q Tx) CreateApp(ctx context.Context, app *models.App) error

func (Tx) CreateDeployment

func (q Tx) CreateDeployment(ctx context.Context, deployment *models.Deployment) error

func (Tx) CreateDomain added in v0.5.0

func (q Tx) CreateDomain(ctx context.Context, domain *models.Domain) error

func (Tx) CreateSiteIfNotExist

func (q Tx) CreateSiteIfNotExist(ctx context.Context, site *models.Site) (*db.SiteInfo, error)

func (Tx) CreateUser

func (q Tx) CreateUser(ctx context.Context, user *models.User) error

func (Tx) DeleteCertificateData

func (q Tx) DeleteCertificateData(ctx context.Context, key string) error

func (Tx) DeleteDomain added in v0.5.0

func (q Tx) DeleteDomain(ctx context.Context, id string, now time.Time) error

func (Tx) DeleteExpiredDeployments

func (q Tx) DeleteExpiredDeployments(ctx context.Context, now time.Time, expireBefore time.Time) (int64, error)

func (Tx) GetApp

func (q Tx) GetApp(ctx context.Context, id string) (*models.App, error)

func (Tx) GetCertDataEntry

func (q Tx) GetCertDataEntry(ctx context.Context, key string) (*models.CertDataEntry, error)

func (Tx) GetCredential

func (q Tx) GetCredential(ctx context.Context, id models.CredentialID) (*models.UserCredential, error)

func (Tx) GetDeployment

func (q Tx) GetDeployment(ctx context.Context, appID string, id string) (*models.Deployment, error)

func (Tx) GetDeploymentByName

func (q Tx) GetDeploymentByName(ctx context.Context, appID string, name string) (*models.Deployment, error)

func (Tx) GetDeploymentSiteNames

func (q Tx) GetDeploymentSiteNames(ctx context.Context, deployment *models.Deployment) ([]string, error)

func (Tx) GetDomainByName added in v0.5.0

func (q Tx) GetDomainByName(ctx context.Context, domainName string) (*models.Domain, error)

func (Tx) GetDomainBySite added in v0.5.0

func (q Tx) GetDomainBySite(ctx context.Context, appID string, siteName string) (*models.Domain, error)

func (Tx) GetSiteByName

func (q Tx) GetSiteByName(ctx context.Context, appID string, name string) (*models.Site, error)

func (Tx) GetSiteDeployment

func (q Tx) GetSiteDeployment(ctx context.Context, appID string, siteName string) (*models.Deployment, error)

func (Tx) GetSiteInfo

func (q Tx) GetSiteInfo(ctx context.Context, appID string, siteID string) (*db.SiteInfo, error)

func (Tx) GetUser

func (q Tx) GetUser(ctx context.Context, id string) (*models.User, error)

func (Tx) ListApps

func (q Tx) ListApps(ctx context.Context, credentialIDs []models.CredentialID) ([]*models.App, error)

func (Tx) ListCertificateData

func (q Tx) ListCertificateData(ctx context.Context, prefix string) ([]string, error)

func (Tx) ListCredentialIDs

func (q Tx) ListCredentialIDs(ctx context.Context, userID string) ([]models.CredentialID, error)

func (Tx) ListDeployments

func (q Tx) ListDeployments(ctx context.Context, appID string) ([]db.DeploymentInfo, error)

func (Tx) ListDomains added in v0.5.0

func (q Tx) ListDomains(ctx context.Context, appID string) ([]*models.Domain, error)

func (Tx) ListSitesInfo

func (q Tx) ListSitesInfo(ctx context.Context, appID string) ([]db.SiteInfo, error)

func (Tx) MarkDeploymentUploaded

func (q Tx) MarkDeploymentUploaded(ctx context.Context, now time.Time, deployment *models.Deployment) error

func (Tx) Rollback

func (t Tx) Rollback() error

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 (q Tx) SetSiteDeployment(ctx context.Context, site *models.Site) error

func (Tx) UpdateAppConfig

func (q Tx) UpdateAppConfig(ctx context.Context, app *models.App) error

func (Tx) UpdateCredentialData

func (q Tx) UpdateCredentialData(ctx context.Context, cred *models.UserCredential) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL