Documentation
¶
Index ¶
- Constants
- Variables
- func NewServerStore(db *sqlx.DB) store.ServerStore
- func PartialMatch(column, value string) (string, string)
- func ProvideApplicationStore(db *sqlx.DB) store.ApplicationStore
- func ProvideAuthSettingStore(db *sqlx.DB) store.AuthSettingsStore
- func ProvideDatabase(ctx context.Context, config database.Config) (*sqlx.DB, error)
- func ProvideDeploymentStore(db *sqlx.DB) store.DeploymentStore
- func ProvideEnvironmentStore(db *sqlx.DB) store.EnvironmentStore
- func ProvideFavoriteStore(db *sqlx.DB) store.FavoriteStore
- func ProvideGithubAppStore(db *sqlx.DB) store.GithubAppStore
- func ProvideInstanceStore(db *sqlx.DB) store.InstanceStore
- func ProvideJobStore(db *sqlx.DB) job.Store
- func ProvideLogStore(db *sqlx.DB) store.LogStore
- func ProvidePrivateKeyStore(db *sqlx.DB) store.PrivateKeyStore
- func ProvideProjectMembershipStore(db *sqlx.DB) store.ProjectMembershipStore
- func ProvideProjectStore(db *sqlx.DB) store.ProjectStore
- func ProvideServerStore(db *sqlx.DB) store.ServerStore
- func ProvideTemplateStore(db *sqlx.DB) store.TemplateStore
- func ProvideTenantMembershipStore(db *sqlx.DB) store.TenantMembershipStore
- func ProvideTenantStore(db *sqlx.DB) store.TenantStore
- func ProvideTokenStore(db *sqlx.DB) store.TokenStore
- func ProvideUserStore(db *sqlx.DB) store.PrincipalStore
- func ProvideVariableStore(db *sqlx.DB) store.VariableStore
- func ProvideVolumeStore(db *sqlx.DB) store.VolumeStore
- type ApplicationStore
- func (s *ApplicationStore) Count(ctx context.Context, filter *types.ApplicationFilter) (int64, error)
- func (s *ApplicationStore) CountByName(ctx context.Context, name string) (int64, error)
- func (s *ApplicationStore) Create(ctx context.Context, application *types.Application) (*types.Application, error)
- func (s *ApplicationStore) Find(ctx context.Context, id int64) (*types.Application, error)
- func (s *ApplicationStore) FindByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64) (*types.Application, error)
- func (s *ApplicationStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Application, error)
- func (s *ApplicationStore) FindDeletedByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64, ...) (*types.Application, error)
- func (s *ApplicationStore) List(ctx context.Context, filter *types.ApplicationFilter) ([]*types.Application, error)
- func (s *ApplicationStore) Purge(ctx context.Context, id int64, deletedAt *int64) error
- func (s *ApplicationStore) SoftDelete(ctx context.Context, application *types.Application, deletedAt int64) error
- func (s *ApplicationStore) UpdateDeploymentStatus(ctx context.Context, application *types.Application) (*types.Application, error)
- func (s *ApplicationStore) UpdateDeploymentTriggerTime(ctx context.Context, application *types.Application) (*types.Application, error)
- func (s *ApplicationStore) UpdateNeedsDeployment(ctx context.Context, application *types.Application) (*types.Application, error)
- func (s *ApplicationStore) UpdateSpec(ctx context.Context, application *types.Application) (*types.Application, error)
- func (s *ApplicationStore) UpdateStatus(ctx context.Context, application *types.Application) (*types.Application, error)
- type AuthSettingsStore
- func (s *AuthSettingsStore) Create(ctx context.Context, auth *types.AuthSetting) (*types.AuthSetting, error)
- func (s *AuthSettingsStore) FindByProvider(ctx context.Context, provider enum.AuthProvider) (*types.AuthSetting, error)
- func (s *AuthSettingsStore) List(ctx context.Context) ([]*types.AuthSetting, error)
- func (s *AuthSettingsStore) Update(ctx context.Context, auth *types.AuthSetting) (*types.AuthSetting, error)
- type DeploymentStore
- func (s *DeploymentStore) Create(ctx context.Context, deployment *types.Deployment) (*types.Deployment, error)
- func (s *DeploymentStore) Find(ctx context.Context, id int64) (*types.Deployment, error)
- func (s *DeploymentStore) FindByUID(ctx context.Context, applicationID int64, uid int64) (*types.Deployment, error)
- func (s *DeploymentStore) List(ctx context.Context, applicationID int64) ([]*types.Deployment, error)
- func (s *DeploymentStore) ListIncomplete(ctx context.Context) ([]*types.Deployment, error)
- func (s *DeploymentStore) ListIncompleteByApplicationID(ctx context.Context, applicationID int64) ([]*types.Deployment, error)
- func (s *DeploymentStore) Update(ctx context.Context, deployment *types.Deployment) error
- type EnvironmentStore
- func (s *EnvironmentStore) Create(ctx context.Context, environment *types.Environment) (*types.Environment, error)
- func (s *EnvironmentStore) Find(ctx context.Context, id int64) (*types.Environment, error)
- func (s *EnvironmentStore) FindByUID(ctx context.Context, projectID int64, environmentUID int64) (*types.Environment, error)
- func (s *EnvironmentStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Environment, error)
- func (s *EnvironmentStore) FindDeletedByUID(ctx context.Context, projectID int64, environmentUID int64, deletedAt **int64) (*types.Environment, error)
- func (s *EnvironmentStore) List(ctx context.Context, filter *types.EnvironmentFilter) ([]*types.Environment, error)
- func (s *EnvironmentStore) Purge(ctx context.Context, id int64, deletedAt *int64) error
- func (s *EnvironmentStore) SoftDelete(ctx context.Context, environment *types.Environment, deletedAt int64) error
- func (s *EnvironmentStore) Update(ctx context.Context, environment *types.Environment) (*types.Environment, error)
- type FavoriteStore
- func (s *FavoriteStore) Add(ctx context.Context, userID, applicationID int64) error
- func (s *FavoriteStore) Delete(ctx context.Context, userID, applicationID int64) error
- func (s *FavoriteStore) Find(ctx context.Context, userID, applicationID int64) (*types.Favorite, error)
- func (s *FavoriteStore) List(ctx context.Context, userID, tenantID int64) ([]*types.FavoriteDTO, error)
- type GithubAppStore
- func (s *GithubAppStore) Create(ctx context.Context, githubapp *types.GithubApp) (*types.GithubApp, error)
- func (s *GithubAppStore) Delete(ctx context.Context, githubapp *types.GithubApp) error
- func (s *GithubAppStore) Find(ctx context.Context, tenantID, projectID, githubAppID int64) (*types.GithubApp, error)
- func (s *GithubAppStore) FindByUID(ctx context.Context, tenantID int64, projectID int64, githubAppUID int64) (*types.GithubApp, error)
- func (s *GithubAppStore) List(ctx context.Context, tenantID, projectID int64) ([]*types.GithubApp, error)
- func (s *GithubAppStore) Update(ctx context.Context, githubapp *types.GithubApp) (*types.GithubApp, error)
- type InstanceStore
- type JobStore
- func (s *JobStore) CountRunning(ctx context.Context) (int, error)
- func (s *JobStore) Create(ctx context.Context, job *job.Job) error
- func (s *JobStore) DeleteByGroupID(ctx context.Context, groupID string) (int64, error)
- func (s *JobStore) DeleteByUID(ctx context.Context, jobUID string) error
- func (s *JobStore) DeleteOld(ctx context.Context, olderThan time.Time) (int64, error)
- func (s *JobStore) Find(ctx context.Context, uid string) (*job.Job, error)
- func (s *JobStore) ListByGroupID(ctx context.Context, groupID string) ([]*job.Job, error)
- func (s *JobStore) ListDeadlineExceeded(ctx context.Context, now time.Time) ([]*job.Job, error)
- func (s *JobStore) ListReady(ctx context.Context, now time.Time, limit int) ([]*job.Job, error)
- func (s *JobStore) NextScheduledTime(ctx context.Context, now time.Time) (time.Time, error)
- func (s *JobStore) UpdateDefinition(ctx context.Context, job *job.Job) error
- func (s *JobStore) UpdateExecution(ctx context.Context, job *job.Job) error
- func (s *JobStore) UpdateProgress(ctx context.Context, job *job.Job) error
- func (s *JobStore) Upsert(ctx context.Context, job *job.Job) error
- type LogStore
- type PrincipalStore
- func (s *PrincipalStore) CountUsers(ctx context.Context) (int64, error)
- func (s *PrincipalStore) CreateUser(ctx context.Context, user *types.User) (*types.User, error)
- func (s *PrincipalStore) DeleteUser(ctx context.Context, id int64) error
- func (s *PrincipalStore) Find(ctx context.Context, id int64) (*types.Principal, error)
- func (s *PrincipalStore) FindUser(ctx context.Context, id int64) (*types.User, error)
- func (s *PrincipalStore) FindUserByEmail(ctx context.Context, email string) (*types.User, error)
- func (s *PrincipalStore) FindUserByUID(ctx context.Context, uid string) (*types.User, error)
- func (s *PrincipalStore) UpdateUser(ctx context.Context, user *types.User) error
- type PrivateKeyStore
- type ProjectMembershipStore
- func (s *ProjectMembershipStore) Create(ctx context.Context, projectMembership *types.ProjectMembership) error
- func (s *ProjectMembershipStore) Delete(ctx context.Context, tenantID, projectID, principalID int64) error
- func (s *ProjectMembershipStore) Find(ctx context.Context, tenantID, projectID, principalID int64) (*types.ProjectMembership, error)
- func (s *ProjectMembershipStore) List(ctx context.Context, tenantID int64, projectID int64) ([]*types.ProjectMembershipUser, error)
- func (s *ProjectMembershipStore) Update(ctx context.Context, tenantID, projectID, principalID int64, ...) error
- type ProjectStore
- func (s *ProjectStore) Count(ctx context.Context, filter *types.ProjectFilter) (int64, error)
- func (s *ProjectStore) Create(ctx context.Context, project *types.Project) (*types.Project, error)
- func (s *ProjectStore) Find(ctx context.Context, id int64) (*types.Project, error)
- func (s *ProjectStore) FindByUID(ctx context.Context, tenantID int64, projectUID int64) (*types.Project, error)
- func (s *ProjectStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Project, error)
- func (s *ProjectStore) FindDeletedByUID(ctx context.Context, tenantID int64, projectUID int64, deletedAt **int64) (*types.Project, error)
- func (s *ProjectStore) List(ctx context.Context, filter *types.ProjectFilter) ([]*types.Project, error)
- func (s *ProjectStore) Purge(ctx context.Context, id int64, deletedAt *int64) error
- func (s *ProjectStore) SoftDelete(ctx context.Context, project *types.Project, deletedAt int64) error
- func (s *ProjectStore) Update(ctx context.Context, project *types.Project) (*types.Project, error)
- type ServerStore
- func (s *ServerStore) Create(ctx context.Context, server *types.Server) (*types.Server, error)
- func (s *ServerStore) Find(ctx context.Context, id int64) (*types.Server, error)
- func (s *ServerStore) FindByUID(ctx context.Context, serverUID int64) (*types.Server, error)
- func (s *ServerStore) List(ctx context.Context) ([]*types.Server, error)
- func (s *ServerStore) Update(ctx context.Context, server *types.Server) (*types.Server, error)
- type TemplateStore
- func (s *TemplateStore) Find(ctx context.Context, id int64) (*types.Template, error)
- func (s *TemplateStore) List(ctx context.Context) ([]*types.Template, error)
- func (s *TemplateStore) ListBySlugs(ctx context.Context, slugs []string) ([]*types.Template, error)
- func (s *TemplateStore) UpsertMany(ctx context.Context, templates []*types.Template) error
- type TenantMembershipStore
- func (s *TenantMembershipStore) Create(ctx context.Context, tenantMembership *types.TenantMembership) error
- func (s *TenantMembershipStore) Delete(ctx context.Context, tenantID, principalID int64) error
- func (s *TenantMembershipStore) DeleteAll(ctx context.Context, tenantID int64) error
- func (s *TenantMembershipStore) Find(ctx context.Context, tenantID, principalID int64) (*types.TenantMembership, error)
- func (s *TenantMembershipStore) List(ctx context.Context, principalID int64) ([]*types.TenantMembershipUser, error)
- func (s *TenantMembershipStore) ListByTenant(ctx context.Context, principalID int64) ([]*types.TenantMembershipUser, error)
- func (s *TenantMembershipStore) Update(ctx context.Context, tenantID, principalID int64, role enum.TenantRole) error
- type TenantStore
- func (s *TenantStore) Create(ctx context.Context, tenant *types.Tenant) (*types.Tenant, error)
- func (s *TenantStore) Find(ctx context.Context, id int64) (*types.Tenant, error)
- func (s *TenantStore) FindByUID(ctx context.Context, tenantUID int64) (*types.Tenant, error)
- func (s *TenantStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Tenant, error)
- func (s *TenantStore) FindDeletedByUID(ctx context.Context, tenantUID int64, deletedAt **int64) (*types.Tenant, error)
- func (s *TenantStore) List(ctx context.Context, filter *types.TenantFilter) ([]*types.Tenant, error)
- func (s *TenantStore) Purge(ctx context.Context, id int64, deletedAt *int64) error
- func (s *TenantStore) SoftDelete(ctx context.Context, tenant *types.Tenant, deletedAt int64) error
- func (s *TenantStore) Update(ctx context.Context, tenant *types.Tenant) (*types.Tenant, error)
- type TokenStore
- func (s *TokenStore) Count(ctx context.Context, principalID int64, tokenType enum.TokenType) (int64, error)
- func (s *TokenStore) Create(ctx context.Context, token *types.Token) error
- func (s *TokenStore) Delete(ctx context.Context, id int64) error
- func (s *TokenStore) DeleteExpiredBefore(ctx context.Context, before time.Time, tknTypes []enum.TokenType) (int64, error)
- func (s *TokenStore) Find(ctx context.Context, id int64) (*types.Token, error)
- func (s *TokenStore) FindByIdentifier(ctx context.Context, principalID int64, identifier string) (*types.Token, error)
- func (s *TokenStore) List(ctx context.Context, principalID int64, tokenType enum.TokenType) ([]*types.Token, error)
- type VariableStore
- func (s *VariableStore) Delete(ctx context.Context, applicationID, varUID int64) error
- func (s *VariableStore) DeleteByKey(ctx context.Context, applicationID int64, key string) error
- func (s *VariableStore) DeleteByKeys(ctx context.Context, applicationID int64, keys []string) error
- func (s *VariableStore) Find(ctx context.Context, applicationID, varUID int64) (*types.Variable, error)
- func (s *VariableStore) List(ctx context.Context, environmentID, applicaitonID int64) ([]*types.Variable, error)
- func (s *VariableStore) ListInEnvironment(ctx context.Context, envID int64) ([]*types.Variable, error)
- func (s *VariableStore) Upsert(ctx context.Context, variable *types.Variable) error
- func (s *VariableStore) UpsertMany(ctx context.Context, variables []*types.Variable) error
- type VolumeStore
- func (s *VolumeStore) Create(ctx context.Context, volume *types.Volume) (*types.Volume, error)
- func (s *VolumeStore) Find(ctx context.Context, id int64) (*types.Volume, error)
- func (s *VolumeStore) FindByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64) (*types.Volume, error)
- func (s *VolumeStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Volume, error)
- func (s *VolumeStore) FindDeletedByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64, ...) (*types.Volume, error)
- func (s *VolumeStore) List(ctx context.Context, filter *types.VolumeFilter) ([]*types.Volume, error)
- func (s *VolumeStore) Purge(ctx context.Context, id int64, deletedAt *int64) error
- func (s *VolumeStore) SoftDelete(ctx context.Context, volume *types.Volume, deletedAt int64) error
- func (s *VolumeStore) Update(ctx context.Context, volume *types.Volume) (*types.Volume, error)
Constants ¶
const TokenSelectByID = tokenSelectBase + `
WHERE token_id = $1
`
const TokenSelectByPrincipalIDAndIdentifier = tokenSelectBase + `
WHERE token_principal_id = $1 AND LOWER(token_uid) = $2
`
Variables ¶
var WireSet = wire.NewSet( ProvideDatabase, ProvideInstanceStore, ProvideServerStore, ProvideAuthSettingStore, ProvideUserStore, ProvideTokenStore, ProvideApplicationStore, ProvideTenantStore, ProvideTenantMembershipStore, ProvideProjectStore, ProvideProjectMembershipStore, ProvideEnvironmentStore, ProvideDeploymentStore, ProvideLogStore, ProvideGithubAppStore, ProvidePrivateKeyStore, ProvideVolumeStore, ProvideVariableStore, ProvideJobStore, ProvideTemplateStore, ProvideFavoriteStore, )
WireSet provides a wire set for this package.
Functions ¶
func NewServerStore ¶
func NewServerStore(db *sqlx.DB) store.ServerStore
NewServerStore create a new server store.
func PartialMatch ¶
func ProvideApplicationStore ¶
func ProvideApplicationStore(db *sqlx.DB) store.ApplicationStore
ProvideApplicationStore provides a token store.
func ProvideAuthSettingStore ¶
func ProvideAuthSettingStore(db *sqlx.DB) store.AuthSettingsStore
ProvideAuthSettingStore provides a auth setting store.
func ProvideDatabase ¶
ProvideDatabase provides a database connection.
func ProvideDeploymentStore ¶
func ProvideDeploymentStore(db *sqlx.DB) store.DeploymentStore
ProvideDeploymentStore provides a deployment store.
func ProvideEnvironmentStore ¶
func ProvideEnvironmentStore(db *sqlx.DB) store.EnvironmentStore
ProvideEnvironmentStore provides a project store.
func ProvideFavoriteStore ¶
func ProvideFavoriteStore(db *sqlx.DB) store.FavoriteStore
ProvideFavoriteStore provides a favorite store.
func ProvideGithubAppStore ¶
func ProvideGithubAppStore(db *sqlx.DB) store.GithubAppStore
ProvideGithubAppStore provides a github app store.
func ProvideInstanceStore ¶
func ProvideInstanceStore(db *sqlx.DB) store.InstanceStore
ProvideInstanceStore provides a instance store.
func ProvideJobStore ¶
ProvideJobStore provides a volume store.
func ProvideLogStore ¶
ProvideLogStore provides a log store.
func ProvidePrivateKeyStore ¶
func ProvidePrivateKeyStore(db *sqlx.DB) store.PrivateKeyStore
ProvidePrivateKeyStore provides a private key store.
func ProvideProjectMembershipStore ¶
func ProvideProjectMembershipStore(db *sqlx.DB) store.ProjectMembershipStore
ProvideProjectMembership provides a tenant membership store.
func ProvideProjectStore ¶
func ProvideProjectStore(db *sqlx.DB) store.ProjectStore
ProvideProjectStore provides a project store.
func ProvideServerStore ¶
func ProvideServerStore(db *sqlx.DB) store.ServerStore
ProvideServerStore provides a server store.
func ProvideTemplateStore ¶
func ProvideTemplateStore(db *sqlx.DB) store.TemplateStore
ProvideTemplateStore provides a template store.
func ProvideTenantMembershipStore ¶
func ProvideTenantMembershipStore(db *sqlx.DB) store.TenantMembershipStore
ProvideTenantMembershipRow provides a tenant membership store.
func ProvideTenantStore ¶
func ProvideTenantStore(db *sqlx.DB) store.TenantStore
ProvideTenantStore provides a tenant store.
func ProvideTokenStore ¶
func ProvideTokenStore(db *sqlx.DB) store.TokenStore
ProvideTokenStore provides a token store.
func ProvideUserStore ¶
func ProvideUserStore(db *sqlx.DB) store.PrincipalStore
ProvideUserStore provides a user store.
func ProvideVariableStore ¶
func ProvideVariableStore(db *sqlx.DB) store.VariableStore
ProvideEnvironmentVariableStore provides a environment variable store.
func ProvideVolumeStore ¶
func ProvideVolumeStore(db *sqlx.DB) store.VolumeStore
ProvideVolumeStore provides a volume store.
Types ¶
type ApplicationStore ¶
type ApplicationStore struct {
// contains filtered or unexported fields
}
ApplicationStore implements a ApplicationStore backed by a relational database.
func NewApplicationStore ¶
func NewApplicationStore(db *sqlx.DB) *ApplicationStore
NewApplicationStore returns new ApplicationStore
func (*ApplicationStore) Count ¶
func (s *ApplicationStore) Count(ctx context.Context, filter *types.ApplicationFilter) (int64, error)
func (*ApplicationStore) CountByName ¶
Find is the app name available.
func (*ApplicationStore) Create ¶
func (s *ApplicationStore) Create(ctx context.Context, application *types.Application) (*types.Application, error)
func (*ApplicationStore) Find ¶
func (s *ApplicationStore) Find(ctx context.Context, id int64) (*types.Application, error)
Find the app by id.
func (*ApplicationStore) FindByUID ¶
func (s *ApplicationStore) FindByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64) (*types.Application, error)
func (*ApplicationStore) FindDeleted ¶
func (s *ApplicationStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Application, error)
func (*ApplicationStore) FindDeletedByUID ¶
func (s *ApplicationStore) FindDeletedByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64, deletedAt *int64) (*types.Application, error)
func (*ApplicationStore) List ¶
func (s *ApplicationStore) List(ctx context.Context, filter *types.ApplicationFilter) ([]*types.Application, error)
List returns a list of applications for the given filter
func (*ApplicationStore) SoftDelete ¶
func (s *ApplicationStore) SoftDelete(ctx context.Context, application *types.Application, deletedAt int64) error
func (*ApplicationStore) UpdateDeploymentStatus ¶
func (s *ApplicationStore) UpdateDeploymentStatus(ctx context.Context, application *types.Application) (*types.Application, error)
func (*ApplicationStore) UpdateDeploymentTriggerTime ¶
func (s *ApplicationStore) UpdateDeploymentTriggerTime(ctx context.Context, application *types.Application) (*types.Application, error)
func (*ApplicationStore) UpdateNeedsDeployment ¶
func (s *ApplicationStore) UpdateNeedsDeployment(ctx context.Context, application *types.Application) (*types.Application, error)
func (*ApplicationStore) UpdateSpec ¶
func (s *ApplicationStore) UpdateSpec(ctx context.Context, application *types.Application) (*types.Application, error)
func (*ApplicationStore) UpdateStatus ¶
func (s *ApplicationStore) UpdateStatus(ctx context.Context, application *types.Application) (*types.Application, error)
type AuthSettingsStore ¶
type AuthSettingsStore struct {
// contains filtered or unexported fields
}
func NewAuthSettingsStore ¶
func NewAuthSettingsStore(db *sqlx.DB) *AuthSettingsStore
func (*AuthSettingsStore) Create ¶
func (s *AuthSettingsStore) Create(ctx context.Context, auth *types.AuthSetting) (*types.AuthSetting, error)
Create saves the auth setting.
func (*AuthSettingsStore) FindByProvider ¶
func (s *AuthSettingsStore) FindByProvider(ctx context.Context, provider enum.AuthProvider) (*types.AuthSetting, error)
FindByProvider gets the auth settings by provider.
func (*AuthSettingsStore) List ¶
func (s *AuthSettingsStore) List(ctx context.Context) ([]*types.AuthSetting, error)
List lists the auth settings.
func (*AuthSettingsStore) Update ¶
func (s *AuthSettingsStore) Update(ctx context.Context, auth *types.AuthSetting) (*types.AuthSetting, error)
Update updates the auth settings
type DeploymentStore ¶
type DeploymentStore struct {
// contains filtered or unexported fields
}
DeploymentStore implements a DeploymentStore backed by a relational database.
func NewDeploymentStore ¶
func NewDeploymentStore(db *sqlx.DB) *DeploymentStore
NewDeploymentStore returns new DeploymentStore
func (*DeploymentStore) Create ¶
func (s *DeploymentStore) Create(ctx context.Context, deployment *types.Deployment) (*types.Deployment, error)
func (*DeploymentStore) Find ¶
func (s *DeploymentStore) Find(ctx context.Context, id int64) (*types.Deployment, error)
func (*DeploymentStore) FindByUID ¶
func (s *DeploymentStore) FindByUID(ctx context.Context, applicationID int64, uid int64) (*types.Deployment, error)
func (*DeploymentStore) List ¶
func (s *DeploymentStore) List(ctx context.Context, applicationID int64) ([]*types.Deployment, error)
func (*DeploymentStore) ListIncomplete ¶
func (s *DeploymentStore) ListIncomplete(ctx context.Context) ([]*types.Deployment, error)
func (*DeploymentStore) ListIncompleteByApplicationID ¶
func (s *DeploymentStore) ListIncompleteByApplicationID(ctx context.Context, applicationID int64) ([]*types.Deployment, error)
func (*DeploymentStore) Update ¶
func (s *DeploymentStore) Update(ctx context.Context, deployment *types.Deployment) error
type EnvironmentStore ¶
type EnvironmentStore struct {
// contains filtered or unexported fields
}
func NewEnvironmentSore ¶
func NewEnvironmentSore(db *sqlx.DB) *EnvironmentStore
func (*EnvironmentStore) Create ¶
func (s *EnvironmentStore) Create(ctx context.Context, environment *types.Environment) (*types.Environment, error)
Create save the environment details.
func (*EnvironmentStore) Find ¶
func (s *EnvironmentStore) Find(ctx context.Context, id int64) (*types.Environment, error)
Find the environment by id.
func (*EnvironmentStore) FindByUID ¶
func (s *EnvironmentStore) FindByUID(ctx context.Context, projectID int64, environmentUID int64) (*types.Environment, error)
FindByUID finds the environment by projectID and environmentUID.
func (*EnvironmentStore) FindDeleted ¶
func (s *EnvironmentStore) FindDeleted(ctx context.Context, id int64, deletedAt *int64) (*types.Environment, error)
func (*EnvironmentStore) FindDeletedByUID ¶
func (s *EnvironmentStore) FindDeletedByUID(ctx context.Context, projectID int64, environmentUID int64, deletedAt **int64) (*types.Environment, error)
func (*EnvironmentStore) List ¶
func (s *EnvironmentStore) List(ctx context.Context, filter *types.EnvironmentFilter) ([]*types.Environment, error)
List returns a list of environment for the given filter
func (*EnvironmentStore) SoftDelete ¶
func (s *EnvironmentStore) SoftDelete(ctx context.Context, environment *types.Environment, deletedAt int64) error
func (*EnvironmentStore) Update ¶
func (s *EnvironmentStore) Update(ctx context.Context, environment *types.Environment) (*types.Environment, error)
Update updates the environment details.
type FavoriteStore ¶
type FavoriteStore struct {
// contains filtered or unexported fields
}
func NewFavoriteStore ¶
func NewFavoriteStore(db *sqlx.DB) *FavoriteStore
func (*FavoriteStore) Add ¶
func (s *FavoriteStore) Add(ctx context.Context, userID, applicationID int64) error
Add adds a favorite
func (*FavoriteStore) Delete ¶
func (s *FavoriteStore) Delete(ctx context.Context, userID, applicationID int64) error
Delete delete a favorite
func (*FavoriteStore) Find ¶
func (s *FavoriteStore) Find(ctx context.Context, userID, applicationID int64) (*types.Favorite, error)
Find find the favorite by user id and application id
func (*FavoriteStore) List ¶
func (s *FavoriteStore) List(ctx context.Context, userID, tenantID int64) ([]*types.FavoriteDTO, error)
List lists the favorite by tenant id
type GithubAppStore ¶
type GithubAppStore struct {
// contains filtered or unexported fields
}
func NewGithubAppStore ¶
func NewGithubAppStore(db *sqlx.DB) *GithubAppStore
func (*GithubAppStore) Create ¶
func (s *GithubAppStore) Create(ctx context.Context, githubapp *types.GithubApp) (*types.GithubApp, error)
Create save the github app.
type InstanceStore ¶
type InstanceStore struct {
// contains filtered or unexported fields
}
InstanceStore implements a InstanceStore backed by a relational database.
func NewInstanceStore ¶
func NewInstanceStore(db *sqlx.DB) *InstanceStore
NewInstanceStore creates a new instance store.
func (*InstanceStore) Create ¶
func (s *InstanceStore) Create(ctx context.Context, instance *types.Instance) (*types.Instance, error)
Create saves the instance settings.
type JobStore ¶
type JobStore struct {
// contains filtered or unexported fields
}
func NewJobStore ¶
func (*JobStore) CountRunning ¶
CountRunning returns number of jobs that are currently being run.
func (*JobStore) DeleteByGroupID ¶
DeleteByGroupID deletes all jobs for a group id.
func (*JobStore) DeleteByUID ¶
DeleteByID deletes a job by its unique identifier.
func (*JobStore) DeleteOld ¶
DeleteOld removes non-recurring jobs that have finished execution or have failed.
func (*JobStore) ListByGroupID ¶
ListByGroupID fetches all jobs for a group id.
func (*JobStore) ListDeadlineExceeded ¶
ListDeadlineExceeded returns a list of jobs that have exceeded their execution deadline.
func (*JobStore) ListReady ¶
ListReady returns a list of jobs that are ready for execution: The jobs with state="scheduled" and scheduled time in the past.
func (*JobStore) NextScheduledTime ¶
NextScheduledTime returns a scheduled time of the next ready job or zero time if no such job exists.
func (*JobStore) UpdateDefinition ¶
UpdateDefinition is used to update a job definition.
func (*JobStore) UpdateExecution ¶
UpdateExecution is used to update a job before and after execution.
func (*JobStore) UpdateProgress ¶
type LogStore ¶
type LogStore struct {
// contains filtered or unexported fields
}
func NewLogStore ¶
type PrincipalStore ¶
type PrincipalStore struct {
// contains filtered or unexported fields
}
PrincipalStore implements a PrincipalStore backed by a relational database.
func NewPrincipalStore ¶
func NewPrincipalStore(db *sqlx.DB) *PrincipalStore
NewPrincipalStore returns a new PrincipalStore.
func (*PrincipalStore) CountUsers ¶
func (s *PrincipalStore) CountUsers(ctx context.Context) (int64, error)
CountUsers counts the number of users.
func (*PrincipalStore) CreateUser ¶
CreateUser saves the user details.
func (*PrincipalStore) DeleteUser ¶
func (s *PrincipalStore) DeleteUser(ctx context.Context, id int64) error
DeleteUser deletes the user.
func (*PrincipalStore) FindUserByEmail ¶
FindUserByEmail finds the user by email.
func (*PrincipalStore) FindUserByUID ¶
FindUserByUID finds the user by uid.
func (*PrincipalStore) UpdateUser ¶
UpdateUser updates an existing user.
type PrivateKeyStore ¶
type PrivateKeyStore struct {
// contains filtered or unexported fields
}
func NewPrivateKeyStore ¶
func NewPrivateKeyStore(db *sqlx.DB) *PrivateKeyStore
func (*PrivateKeyStore) Create ¶
func (s *PrivateKeyStore) Create(ctx context.Context, privatekey *types.PrivateKey) (*types.PrivateKey, error)
Create save the private key
func (*PrivateKeyStore) Delete ¶
func (s *PrivateKeyStore) Delete(ctx context.Context, tenantID, id int64) error
Delete delets the private key
func (*PrivateKeyStore) Find ¶
func (s *PrivateKeyStore) Find(ctx context.Context, tenantID, id int64) (*types.PrivateKey, error)
Find the private key by id.
type ProjectMembershipStore ¶
type ProjectMembershipStore struct {
// contains filtered or unexported fields
}
func NewProjectMembershipStore ¶
func NewProjectMembershipStore(db *sqlx.DB) *ProjectMembershipStore
func (*ProjectMembershipStore) Create ¶
func (s *ProjectMembershipStore) Create(ctx context.Context, projectMembership *types.ProjectMembership) error
func (*ProjectMembershipStore) Delete ¶
func (s *ProjectMembershipStore) Delete(ctx context.Context, tenantID, projectID, principalID int64) error
func (*ProjectMembershipStore) Find ¶
func (s *ProjectMembershipStore) Find(ctx context.Context, tenantID, projectID, principalID int64) (*types.ProjectMembership, error)
func (*ProjectMembershipStore) List ¶
func (s *ProjectMembershipStore) List(ctx context.Context, tenantID int64, projectID int64) ([]*types.ProjectMembershipUser, error)
func (*ProjectMembershipStore) Update ¶
func (s *ProjectMembershipStore) Update(ctx context.Context, tenantID, projectID, principalID int64, role enum.ProjectRole) error
type ProjectStore ¶
type ProjectStore struct {
// contains filtered or unexported fields
}
func NewProjectSore ¶
func NewProjectSore(db *sqlx.DB) *ProjectStore
func (*ProjectStore) Count ¶
func (s *ProjectStore) Count(ctx context.Context, filter *types.ProjectFilter) (int64, error)
func (*ProjectStore) FindDeleted ¶
func (*ProjectStore) FindDeletedByUID ¶
func (*ProjectStore) List ¶
func (s *ProjectStore) List(ctx context.Context, filter *types.ProjectFilter) ([]*types.Project, error)
func (*ProjectStore) SoftDelete ¶
type ServerStore ¶
type ServerStore struct {
// contains filtered or unexported fields
}
ServerStore implements a ServerStore backed by a relational database.
type TemplateStore ¶
type TemplateStore struct {
// contains filtered or unexported fields
}
TemplateStore implements a TemplateStore backed by a relational database.
func NewTemplateStore ¶
func NewTemplateStore(db *sqlx.DB) *TemplateStore
NewTemplateStore returns new TemplateStore
func (*TemplateStore) ListBySlugs ¶
func (*TemplateStore) UpsertMany ¶
UpsertMany updates or inserts the templates
type TenantMembershipStore ¶
type TenantMembershipStore struct {
// contains filtered or unexported fields
}
func NewTenantMembershipStore ¶
func NewTenantMembershipStore(db *sqlx.DB) *TenantMembershipStore
func (*TenantMembershipStore) Create ¶
func (s *TenantMembershipStore) Create(ctx context.Context, tenantMembership *types.TenantMembership) error
func (*TenantMembershipStore) Delete ¶
func (s *TenantMembershipStore) Delete(ctx context.Context, tenantID, principalID int64) error
func (*TenantMembershipStore) DeleteAll ¶
func (s *TenantMembershipStore) DeleteAll(ctx context.Context, tenantID int64) error
func (*TenantMembershipStore) Find ¶
func (s *TenantMembershipStore) Find(ctx context.Context, tenantID, principalID int64) (*types.TenantMembership, error)
func (*TenantMembershipStore) List ¶
func (s *TenantMembershipStore) List(ctx context.Context, principalID int64) ([]*types.TenantMembershipUser, error)
func (*TenantMembershipStore) ListByTenant ¶
func (s *TenantMembershipStore) ListByTenant(ctx context.Context, principalID int64) ([]*types.TenantMembershipUser, error)
func (*TenantMembershipStore) Update ¶
func (s *TenantMembershipStore) Update(ctx context.Context, tenantID, principalID int64, role enum.TenantRole) error
type TenantStore ¶
type TenantStore struct {
// contains filtered or unexported fields
}
func NewTenantStore ¶
func NewTenantStore(db *sqlx.DB) *TenantStore
func (*TenantStore) FindDeleted ¶
func (*TenantStore) FindDeletedByUID ¶
func (*TenantStore) List ¶
func (s *TenantStore) List(ctx context.Context, filter *types.TenantFilter) ([]*types.Tenant, error)
func (*TenantStore) SoftDelete ¶
SoftDelete deletes the tenant softly by setting the deleted timestamp
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
TokenStore implements a TokenStore backed by a relational database.
func NewTokenStore ¶
func NewTokenStore(db *sqlx.DB) *TokenStore
NewTokenStore returns a new TokenStore.
func (*TokenStore) Count ¶
func (s *TokenStore) Count(ctx context.Context, principalID int64, tokenType enum.TokenType) (int64, error)
Count returns a count of tokens of a specifc type for a specific principal.
func (*TokenStore) Delete ¶
func (s *TokenStore) Delete(ctx context.Context, id int64) error
Delete deletes the token with the given id.
func (*TokenStore) DeleteExpiredBefore ¶
func (s *TokenStore) DeleteExpiredBefore( ctx context.Context, before time.Time, tknTypes []enum.TokenType, ) (int64, error)
DeleteExpiredBefore deletes all tokens that expired before the provided time. If tokenTypes are provided, then only tokens of that type are deleted.
func (*TokenStore) FindByIdentifier ¶
func (s *TokenStore) FindByIdentifier(ctx context.Context, principalID int64, identifier string) (*types.Token, error)
FindByIdentifier finds the token by principalId and token identifier.
type VariableStore ¶
type VariableStore struct {
// contains filtered or unexported fields
}
VariableStore implements a VariableStore backed by a relational database.
func NewVariableStore ¶
func NewVariableStore(db *sqlx.DB) *VariableStore
NewVariableStore creates a new VariableStore
func (*VariableStore) Delete ¶
func (s *VariableStore) Delete(ctx context.Context, applicationID, varUID int64) error
func (*VariableStore) DeleteByKey ¶
func (*VariableStore) DeleteByKeys ¶
func (*VariableStore) Find ¶
func (s *VariableStore) Find(ctx context.Context, applicationID, varUID int64) (*types.Variable, error)
Find the variable by application id and variable uid
func (*VariableStore) List ¶
func (s *VariableStore) List(ctx context.Context, environmentID, applicaitonID int64) ([]*types.Variable, error)
List lists the variables by environment id and application id
func (*VariableStore) ListInEnvironment ¶
func (*VariableStore) UpsertMany ¶
UpsertMany updates or inserts the variables
type VolumeStore ¶
type VolumeStore struct {
// contains filtered or unexported fields
}
VolumeStore implements a VolumeStore backed by a relational database.
func NewVolumeStore ¶
func NewVolumeStore(db *sqlx.DB) *VolumeStore
NewVolumeStore returns new VolumeStore
func (*VolumeStore) FindByUID ¶
func (s *VolumeStore) FindByUID(ctx context.Context, tenantID, projectID, environmentID, uid int64) (*types.Volume, error)
FindByUID finds the volume by tenant id, project id ,environment id, volume id and volume u_id
func (*VolumeStore) FindDeleted ¶
func (*VolumeStore) FindDeletedByUID ¶
func (*VolumeStore) List ¶
func (s *VolumeStore) List(ctx context.Context, filter *types.VolumeFilter) ([]*types.Volume, error)
List lists the volumes by filter