projectStore

package
v0.0.0-...-27c9e6d Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListDBProjects = `
Select id, name, description, tag, type, theme from projects
WHERE account_id = $1 AND has_database = true
`
View Source
var ListProjectExternalDomains = `
SELECT project_tag, internal_domain, external_domain from project_domain
WHERE account_id = $1 AND external_domain != '';
`
View Source
var ListProjects = `
Select id, name, description, tag, has_database, type, theme from projects
WHERE account_id = $1
`

Functions

This section is empty.

Types

type ProjectStore

type ProjectStore interface {
	AddProject(ctx context.Context, accountId string, project models.Project) error
	CreateProjectDatabase(ctx context.Context, accountId string, projectName string) error
	CreateDbUserAndGrantAccess(ctx context.Context, accountId string, projectName string) error
	ListProjects(ctx context.Context, accountId string) ([]models.Project, error)
	ListDBProjects(ctx context.Context, accountId string) ([]models.Project, error)
	ListProjectExternalDomains(ctx context.Context, accountId string) ([]models.ProjectDomain, error)
	GetProject(ctx context.Context, accountId string, projectName string) (models.Project, error)
	GetProjectByTag(ctx context.Context, tag string) (models.Project, error)
	GetProjectDomain(ctx context.Context, accountId, projectTag string) (models.ProjectDomain, error)
	GetProjectDomainByCertificateArn(ctx context.Context, certificateArn string) (models.ProjectDomain, error)
	UpsertProjectDomain(ctx context.Context, projectDomain models.ProjectDomain) error
	UpdateProjectByTag(ctx context.Context, projectTag string, project models.Project) error

	// This function deletes the domain associated with the project
	DeleteProjectDomain(ctx context.Context, projectDomain models.ProjectDomain) error

	// This function deletes the project record from the database
	DeleteProjectByTag(ctx context.Context, projectTag string) error
}

func New

func New(db *db.DB) ProjectStore

Jump to

Keyboard shortcuts

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