Documentation ¶
Index ¶
- func AutoMigrate(db *gorm.DB) error
- func NewAWSIntegrationRepository(db *gorm.DB, key *[32]byte) repository.AWSIntegrationRepository
- func NewAuthCodeRepository(db *gorm.DB) repository.AuthCodeRepository
- func NewBasicIntegrationRepository(db *gorm.DB, key *[32]byte) repository.BasicIntegrationRepository
- func NewClusterRepository(db *gorm.DB, key *[32]byte) repository.ClusterRepository
- func NewDNSRecordRepository(db *gorm.DB) repository.DNSRecordRepository
- func NewGCPIntegrationRepository(db *gorm.DB, key *[32]byte) repository.GCPIntegrationRepository
- func NewGitActionConfigRepository(db *gorm.DB) repository.GitActionConfigRepository
- func NewGitRepoRepository(db *gorm.DB, key *[32]byte) repository.GitRepoRepository
- func NewGithubAppInstallationRepository(db *gorm.DB) repository.GithubAppInstallationRepository
- func NewGithubAppOAuthIntegrationRepository(db *gorm.DB) repository.GithubAppOAuthIntegrationRepository
- func NewHelmRepoRepository(db *gorm.DB, key *[32]byte) repository.HelmRepoRepository
- func NewInfraRepository(db *gorm.DB, key *[32]byte) repository.InfraRepository
- func NewInviteRepository(db *gorm.DB) repository.InviteRepository
- func NewKubeIntegrationRepository(db *gorm.DB, key *[32]byte) repository.KubeIntegrationRepository
- func NewOAuthIntegrationRepository(db *gorm.DB, key *[32]byte) repository.OAuthIntegrationRepository
- func NewOIDCIntegrationRepository(db *gorm.DB, key *[32]byte) repository.OIDCIntegrationRepository
- func NewPWResetTokenRepository(db *gorm.DB) repository.PWResetTokenRepository
- func NewProjectRepository(db *gorm.DB) repository.ProjectRepository
- func NewRegistryRepository(db *gorm.DB, key *[32]byte) repository.RegistryRepository
- func NewReleaseRepository(db *gorm.DB) repository.ReleaseRepository
- func NewRepository(db *gorm.DB, key *[32]byte) *repository.Repository
- func NewSessionRepository(db *gorm.DB) repository.SessionRepository
- func NewSlackIntegrationRepository(db *gorm.DB, key *[32]byte) repository.SlackIntegrationRepository
- func NewUserRepository(db *gorm.DB) repository.UserRepository
- type AWSIntegrationRepository
- func (repo *AWSIntegrationRepository) CreateAWSIntegration(am *ints.AWSIntegration) (*ints.AWSIntegration, error)
- func (repo *AWSIntegrationRepository) DecryptAWSIntegrationData(aws *ints.AWSIntegration, key *[32]byte) error
- func (repo *AWSIntegrationRepository) EncryptAWSIntegrationData(aws *ints.AWSIntegration, key *[32]byte) error
- func (repo *AWSIntegrationRepository) ListAWSIntegrationsByProjectID(projectID uint) ([]*ints.AWSIntegration, error)
- func (repo *AWSIntegrationRepository) OverwriteAWSIntegration(am *ints.AWSIntegration) (*ints.AWSIntegration, error)
- func (repo *AWSIntegrationRepository) ReadAWSIntegration(id uint) (*ints.AWSIntegration, error)
- type AuthCodeRepository
- type BasicIntegrationRepository
- func (repo *BasicIntegrationRepository) CreateBasicIntegration(am *ints.BasicIntegration) (*ints.BasicIntegration, error)
- func (repo *BasicIntegrationRepository) DecryptBasicIntegrationData(basic *ints.BasicIntegration, key *[32]byte) error
- func (repo *BasicIntegrationRepository) EncryptBasicIntegrationData(basic *ints.BasicIntegration, key *[32]byte) error
- func (repo *BasicIntegrationRepository) ListBasicIntegrationsByProjectID(projectID uint) ([]*ints.BasicIntegration, error)
- func (repo *BasicIntegrationRepository) ReadBasicIntegration(id uint) (*ints.BasicIntegration, error)
- type ClusterRepository
- func (repo *ClusterRepository) CreateCluster(cluster *models.Cluster) (*models.Cluster, error)
- func (repo *ClusterRepository) CreateClusterCandidate(cc *models.ClusterCandidate) (*models.ClusterCandidate, error)
- func (repo *ClusterRepository) DecryptClusterCandidateData(cc *models.ClusterCandidate, key *[32]byte) error
- func (repo *ClusterRepository) DecryptClusterData(cluster *models.Cluster, key *[32]byte) error
- func (repo *ClusterRepository) DeleteCluster(cluster *models.Cluster) error
- func (repo *ClusterRepository) EncryptClusterCandidateData(cc *models.ClusterCandidate, key *[32]byte) error
- func (repo *ClusterRepository) EncryptClusterData(cluster *models.Cluster, key *[32]byte) error
- func (repo *ClusterRepository) ListClusterCandidatesByProjectID(projectID uint) ([]*models.ClusterCandidate, error)
- func (repo *ClusterRepository) ListClustersByProjectID(projectID uint) ([]*models.Cluster, error)
- func (repo *ClusterRepository) ReadCluster(id uint) (*models.Cluster, error)
- func (repo *ClusterRepository) ReadClusterCandidate(id uint) (*models.ClusterCandidate, error)
- func (repo *ClusterRepository) UpdateCluster(cluster *models.Cluster) (*models.Cluster, error)
- func (repo *ClusterRepository) UpdateClusterCandidateCreatedClusterID(id uint, createdClusterID uint) (*models.ClusterCandidate, error)
- func (repo *ClusterRepository) UpdateClusterTokenCache(tokenCache *ints.ClusterTokenCache) (*models.Cluster, error)
- type DNSRecordRepository
- type GCPIntegrationRepository
- func (repo *GCPIntegrationRepository) CreateGCPIntegration(am *ints.GCPIntegration) (*ints.GCPIntegration, error)
- func (repo *GCPIntegrationRepository) DecryptGCPIntegrationData(gcp *ints.GCPIntegration, key *[32]byte) error
- func (repo *GCPIntegrationRepository) EncryptGCPIntegrationData(gcp *ints.GCPIntegration, key *[32]byte) error
- func (repo *GCPIntegrationRepository) ListGCPIntegrationsByProjectID(projectID uint) ([]*ints.GCPIntegration, error)
- func (repo *GCPIntegrationRepository) ReadGCPIntegration(id uint) (*ints.GCPIntegration, error)
- type GitActionConfigRepository
- type GitRepoRepository
- func (repo *GitRepoRepository) CreateGitRepo(gr *models.GitRepo) (*models.GitRepo, error)
- func (repo *GitRepoRepository) DeleteGitRepo(gr *models.GitRepo) error
- func (repo *GitRepoRepository) ListGitReposByProjectID(projectID uint) ([]*models.GitRepo, error)
- func (repo *GitRepoRepository) ReadGitRepo(id uint) (*models.GitRepo, error)
- func (repo *GitRepoRepository) UpdateGitRepo(gr *models.GitRepo) (*models.GitRepo, error)
- type GithubAppInstallationRepository
- func (repo *GithubAppInstallationRepository) CreateGithubAppInstallation(am *ints.GithubAppInstallation) (*ints.GithubAppInstallation, error)
- func (repo *GithubAppInstallationRepository) DeleteGithubAppInstallationByAccountID(accountID int64) error
- func (repo *GithubAppInstallationRepository) ReadGithubAppInstallation(id uint) (*ints.GithubAppInstallation, error)
- func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByAccountID(accountID int64) (*ints.GithubAppInstallation, error)
- func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByAccountIDs(accountIDs []int64) ([]*ints.GithubAppInstallation, error)
- type GithubAppOAuthIntegrationRepository
- func (repo *GithubAppOAuthIntegrationRepository) CreateGithubAppOAuthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
- func (repo *GithubAppOAuthIntegrationRepository) ReadGithubAppOauthIntegration(id uint) (*ints.GithubAppOAuthIntegration, error)
- func (repo *GithubAppOAuthIntegrationRepository) UpdateGithubAppOauthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
- type HelmRepoRepository
- func (repo *HelmRepoRepository) CreateHelmRepo(hr *models.HelmRepo) (*models.HelmRepo, error)
- func (repo *HelmRepoRepository) DecryptHelmRepoData(hr *models.HelmRepo, key *[32]byte) error
- func (repo *HelmRepoRepository) DeleteHelmRepo(hr *models.HelmRepo) error
- func (repo *HelmRepoRepository) EncryptHelmRepoData(hr *models.HelmRepo, key *[32]byte) error
- func (repo *HelmRepoRepository) ListHelmReposByProjectID(projectID uint) ([]*models.HelmRepo, error)
- func (repo *HelmRepoRepository) ReadHelmRepo(id uint) (*models.HelmRepo, error)
- func (repo *HelmRepoRepository) UpdateHelmRepo(hr *models.HelmRepo) (*models.HelmRepo, error)
- func (repo *HelmRepoRepository) UpdateHelmRepoTokenCache(tokenCache *ints.HelmRepoTokenCache) (*models.HelmRepo, error)
- type InfraRepository
- func (repo *InfraRepository) CreateInfra(infra *models.Infra) (*models.Infra, error)
- func (repo *InfraRepository) DecryptInfraData(infra *models.Infra, key *[32]byte) error
- func (repo *InfraRepository) EncryptInfraData(infra *models.Infra, key *[32]byte) error
- func (repo *InfraRepository) ListInfrasByProjectID(projectID uint) ([]*models.Infra, error)
- func (repo *InfraRepository) ReadInfra(id uint) (*models.Infra, error)
- func (repo *InfraRepository) UpdateInfra(ai *models.Infra) (*models.Infra, error)
- type InviteRepository
- func (repo *InviteRepository) CreateInvite(invite *models.Invite) (*models.Invite, error)
- func (repo *InviteRepository) DeleteInvite(invite *models.Invite) error
- func (repo *InviteRepository) ListInvitesByProjectID(projectID uint) ([]*models.Invite, error)
- func (repo *InviteRepository) ReadInvite(id uint) (*models.Invite, error)
- func (repo *InviteRepository) ReadInviteByToken(token string) (*models.Invite, error)
- func (repo *InviteRepository) UpdateInvite(invite *models.Invite) (*models.Invite, error)
- type KubeIntegrationRepository
- func (repo *KubeIntegrationRepository) CreateKubeIntegration(am *ints.KubeIntegration) (*ints.KubeIntegration, error)
- func (repo *KubeIntegrationRepository) DecryptKubeIntegrationData(ki *ints.KubeIntegration, key *[32]byte) error
- func (repo *KubeIntegrationRepository) EncryptKubeIntegrationData(ki *ints.KubeIntegration, key *[32]byte) error
- func (repo *KubeIntegrationRepository) ListKubeIntegrationsByProjectID(projectID uint) ([]*ints.KubeIntegration, error)
- func (repo *KubeIntegrationRepository) ReadKubeIntegration(id uint) (*ints.KubeIntegration, error)
- type OAuthIntegrationRepository
- func (repo *OAuthIntegrationRepository) CreateOAuthIntegration(am *ints.OAuthIntegration) (*ints.OAuthIntegration, error)
- func (repo *OAuthIntegrationRepository) DecryptOAuthIntegrationData(oauth *ints.OAuthIntegration, key *[32]byte) error
- func (repo *OAuthIntegrationRepository) EncryptOAuthIntegrationData(oauth *ints.OAuthIntegration, key *[32]byte) error
- func (repo *OAuthIntegrationRepository) ListOAuthIntegrationsByProjectID(projectID uint) ([]*ints.OAuthIntegration, error)
- func (repo *OAuthIntegrationRepository) ReadOAuthIntegration(id uint) (*ints.OAuthIntegration, error)
- func (repo *OAuthIntegrationRepository) UpdateOAuthIntegration(am *ints.OAuthIntegration) (*ints.OAuthIntegration, error)
- type OIDCIntegrationRepository
- func (repo *OIDCIntegrationRepository) CreateOIDCIntegration(am *ints.OIDCIntegration) (*ints.OIDCIntegration, error)
- func (repo *OIDCIntegrationRepository) DecryptOIDCIntegrationData(oidc *ints.OIDCIntegration, key *[32]byte) error
- func (repo *OIDCIntegrationRepository) EncryptOIDCIntegrationData(oidc *ints.OIDCIntegration, key *[32]byte) error
- func (repo *OIDCIntegrationRepository) ListOIDCIntegrationsByProjectID(projectID uint) ([]*ints.OIDCIntegration, error)
- func (repo *OIDCIntegrationRepository) ReadOIDCIntegration(id uint) (*ints.OIDCIntegration, error)
- type PWResetTokenRepository
- func (repo *PWResetTokenRepository) CreatePWResetToken(a *models.PWResetToken) (*models.PWResetToken, error)
- func (repo *PWResetTokenRepository) ReadPWResetToken(id uint) (*models.PWResetToken, error)
- func (repo *PWResetTokenRepository) UpdatePWResetToken(pwToken *models.PWResetToken) (*models.PWResetToken, error)
- type ProjectRepository
- func (repo *ProjectRepository) CreateProject(project *models.Project) (*models.Project, error)
- func (repo *ProjectRepository) CreateProjectRole(project *models.Project, role *models.Role) (*models.Role, error)
- func (repo *ProjectRepository) DeleteProject(project *models.Project) (*models.Project, error)
- func (repo *ProjectRepository) DeleteProjectRole(projID, userID uint) (*models.Role, error)
- func (repo *ProjectRepository) ListProjectRoles(projID uint) ([]models.Role, error)
- func (repo *ProjectRepository) ListProjectsByUserID(userID uint) ([]*models.Project, error)
- func (repo *ProjectRepository) ReadProject(id uint) (*models.Project, error)
- func (repo *ProjectRepository) ReadProjectRole(projID, userID uint) (*models.Role, error)
- func (repo *ProjectRepository) UpdateProjectRole(projID uint, role *models.Role) (*models.Role, error)
- type RegistryRepository
- func (repo *RegistryRepository) CreateRegistry(reg *models.Registry) (*models.Registry, error)
- func (repo *RegistryRepository) DecryptRegistryData(registry *models.Registry, key *[32]byte) error
- func (repo *RegistryRepository) DeleteRegistry(reg *models.Registry) error
- func (repo *RegistryRepository) EncryptRegistryData(registry *models.Registry, key *[32]byte) error
- func (repo *RegistryRepository) ListRegistriesByProjectID(projectID uint) ([]*models.Registry, error)
- func (repo *RegistryRepository) ReadRegistry(id uint) (*models.Registry, error)
- func (repo *RegistryRepository) UpdateRegistry(reg *models.Registry) (*models.Registry, error)
- func (repo *RegistryRepository) UpdateRegistryTokenCache(tokenCache *ints.RegTokenCache) (*models.Registry, error)
- type ReleaseRepository
- func (repo *ReleaseRepository) CreateRelease(release *models.Release) (*models.Release, error)
- func (repo *ReleaseRepository) DeleteRelease(release *models.Release) (*models.Release, error)
- func (repo *ReleaseRepository) ListReleasesByImageRepoURI(clusterID uint, imageRepoURI string) ([]*models.Release, error)
- func (repo *ReleaseRepository) ReadRelease(clusterID uint, name, namespace string) (*models.Release, error)
- func (repo *ReleaseRepository) ReadReleaseByWebhookToken(token string) (*models.Release, error)
- func (repo *ReleaseRepository) UpdateRelease(release *models.Release) (*models.Release, error)
- type SessionRepository
- func (s *SessionRepository) CreateSession(session *models.Session) (*models.Session, error)
- func (s *SessionRepository) DeleteSession(session *models.Session) (*models.Session, error)
- func (s *SessionRepository) SelectSession(session *models.Session) (*models.Session, error)
- func (s *SessionRepository) UpdateSession(session *models.Session) (*models.Session, error)
- type SlackIntegrationRepository
- func (repo *SlackIntegrationRepository) CreateSlackIntegration(slackInt *ints.SlackIntegration) (*ints.SlackIntegration, error)
- func (repo *SlackIntegrationRepository) DecryptSlackIntegrationData(slackInt *ints.SlackIntegration, key *[32]byte) error
- func (repo *SlackIntegrationRepository) DeleteSlackIntegration(integrationID uint) error
- func (repo *SlackIntegrationRepository) EncryptSlackIntegrationData(slackInt *ints.SlackIntegration, key *[32]byte) error
- func (repo *SlackIntegrationRepository) ListSlackIntegrationsByProjectID(projectID uint) ([]*ints.SlackIntegration, error)
- type UserRepository
- func (repo *UserRepository) CheckPassword(id int, pwd string) (bool, error)
- func (repo *UserRepository) CreateUser(user *models.User) (*models.User, error)
- func (repo *UserRepository) DeleteUser(user *models.User) (*models.User, error)
- func (repo *UserRepository) ListUsersByIDs(ids []uint) ([]*models.User, error)
- func (repo *UserRepository) ReadUser(id uint) (*models.User, error)
- func (repo *UserRepository) ReadUserByEmail(email string) (*models.User, error)
- func (repo *UserRepository) ReadUserByGithubUserID(id int64) (*models.User, error)
- func (repo *UserRepository) ReadUserByGoogleUserID(id string) (*models.User, error)
- func (repo *UserRepository) UpdateUser(user *models.User) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶ added in v0.7.2
func NewAWSIntegrationRepository ¶
func NewAWSIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.AWSIntegrationRepository
NewAWSIntegrationRepository returns a AWSIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewAuthCodeRepository ¶
func NewAuthCodeRepository(db *gorm.DB) repository.AuthCodeRepository
NewAuthCodeRepository returns a AuthCodeRepository which uses gorm.DB for querying the database
func NewBasicIntegrationRepository ¶
func NewBasicIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.BasicIntegrationRepository
NewBasicIntegrationRepository returns a BasicIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewClusterRepository ¶
func NewClusterRepository(db *gorm.DB, key *[32]byte) repository.ClusterRepository
NewClusterRepository returns a ClusterRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewDNSRecordRepository ¶
func NewDNSRecordRepository(db *gorm.DB) repository.DNSRecordRepository
NewDNSRecordRepository returns a DNSRecordRepository which uses gorm.DB for querying the database
func NewGCPIntegrationRepository ¶
func NewGCPIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.GCPIntegrationRepository
NewGCPIntegrationRepository returns a GCPIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewGitActionConfigRepository ¶
func NewGitActionConfigRepository(db *gorm.DB) repository.GitActionConfigRepository
NewGitActionConfigRepository returns a GitActionConfigRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewGitRepoRepository ¶
func NewGitRepoRepository(db *gorm.DB, key *[32]byte) repository.GitRepoRepository
NewGitRepoRepository returns a GitRepoRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewGithubAppInstallationRepository ¶ added in v0.5.0
func NewGithubAppInstallationRepository(db *gorm.DB) repository.GithubAppInstallationRepository
NewGithubAppInstallationRepository creates a new GithubAppInstallationRepository
func NewGithubAppOAuthIntegrationRepository ¶ added in v0.5.0
func NewGithubAppOAuthIntegrationRepository(db *gorm.DB) repository.GithubAppOAuthIntegrationRepository
NewGithubAppOAuthIntegrationRepository creates a GithubAppOAuthIntegrationRepository
func NewHelmRepoRepository ¶
func NewHelmRepoRepository(db *gorm.DB, key *[32]byte) repository.HelmRepoRepository
NewHelmRepoRepository returns a HelmRepoRepository which uses gorm.DB for querying the database
func NewInfraRepository ¶
func NewInfraRepository(db *gorm.DB, key *[32]byte) repository.InfraRepository
NewInfraRepository returns a InfraRepository which uses gorm.DB for querying the database
func NewInviteRepository ¶
func NewInviteRepository(db *gorm.DB) repository.InviteRepository
NewInviteRepository returns a InviteRepository which uses gorm.DB for querying the database
func NewKubeIntegrationRepository ¶
func NewKubeIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.KubeIntegrationRepository
NewKubeIntegrationRepository returns a KubeIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewOAuthIntegrationRepository ¶
func NewOAuthIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.OAuthIntegrationRepository
NewOAuthIntegrationRepository returns a OAuthIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewOIDCIntegrationRepository ¶
func NewOIDCIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.OIDCIntegrationRepository
NewOIDCIntegrationRepository returns a OIDCIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewPWResetTokenRepository ¶
func NewPWResetTokenRepository(db *gorm.DB) repository.PWResetTokenRepository
NewPWResetTokenRepository returns a PWResetTokenRepository which uses gorm.DB for querying the database
func NewProjectRepository ¶
func NewProjectRepository(db *gorm.DB) repository.ProjectRepository
NewProjectRepository returns a ProjectRepository which uses gorm.DB for querying the database
func NewRegistryRepository ¶
func NewRegistryRepository(db *gorm.DB, key *[32]byte) repository.RegistryRepository
NewRegistryRepository returns a RegistryRepository which uses gorm.DB for querying the database
func NewReleaseRepository ¶
func NewReleaseRepository(db *gorm.DB) repository.ReleaseRepository
NewReleaseRepository returns a DefaultReleaseRepository which uses gorm.DB for querying the database
func NewRepository ¶
func NewRepository(db *gorm.DB, key *[32]byte) *repository.Repository
NewRepository returns a Repository which uses gorm.DB for querying the database
func NewSessionRepository ¶
func NewSessionRepository(db *gorm.DB) repository.SessionRepository
NewSessionRepository returns pointer to repo along with the db
func NewSlackIntegrationRepository ¶ added in v0.7.2
func NewSlackIntegrationRepository( db *gorm.DB, key *[32]byte, ) repository.SlackIntegrationRepository
NewSlackIntegrationRepository returns a SlackIntegrationRepository which uses gorm.DB for querying the database. It accepts an encryption key to encrypt sensitive data
func NewUserRepository ¶
func NewUserRepository(db *gorm.DB) repository.UserRepository
NewUserRepository returns a DefaultUserRepository which uses gorm.DB for querying the database
Types ¶
type AWSIntegrationRepository ¶
type AWSIntegrationRepository struct {
// contains filtered or unexported fields
}
AWSIntegrationRepository uses gorm.DB for querying the database
func (*AWSIntegrationRepository) CreateAWSIntegration ¶
func (repo *AWSIntegrationRepository) CreateAWSIntegration( am *ints.AWSIntegration, ) (*ints.AWSIntegration, error)
CreateAWSIntegration creates a new aws auth mechanism
func (*AWSIntegrationRepository) DecryptAWSIntegrationData ¶
func (repo *AWSIntegrationRepository) DecryptAWSIntegrationData( aws *ints.AWSIntegration, key *[32]byte, ) error
DecryptAWSIntegrationData will decrypt the aws integration data before returning it from the DB
func (*AWSIntegrationRepository) EncryptAWSIntegrationData ¶
func (repo *AWSIntegrationRepository) EncryptAWSIntegrationData( aws *ints.AWSIntegration, key *[32]byte, ) error
EncryptAWSIntegrationData will encrypt the aws integration data before writing to the DB
func (*AWSIntegrationRepository) ListAWSIntegrationsByProjectID ¶
func (repo *AWSIntegrationRepository) ListAWSIntegrationsByProjectID( projectID uint, ) ([]*ints.AWSIntegration, error)
ListAWSIntegrationsByProjectID finds all aws auth mechanisms for a given project id
func (*AWSIntegrationRepository) OverwriteAWSIntegration ¶ added in v0.4.0
func (repo *AWSIntegrationRepository) OverwriteAWSIntegration( am *ints.AWSIntegration, ) (*ints.AWSIntegration, error)
UpdateCluster modifies an existing Cluster in the database
func (*AWSIntegrationRepository) ReadAWSIntegration ¶
func (repo *AWSIntegrationRepository) ReadAWSIntegration( id uint, ) (*ints.AWSIntegration, error)
ReadAWSIntegration finds a aws auth mechanism by id
type AuthCodeRepository ¶
type AuthCodeRepository struct {
// contains filtered or unexported fields
}
AuthCodeRepository uses gorm.DB for querying the database
func (*AuthCodeRepository) CreateAuthCode ¶
CreateAuthCode creates a new auth code
func (*AuthCodeRepository) ReadAuthCode ¶
func (repo *AuthCodeRepository) ReadAuthCode(code string) (*models.AuthCode, error)
ReadAuthCode gets an invite specified by a unique token
type BasicIntegrationRepository ¶
type BasicIntegrationRepository struct {
// contains filtered or unexported fields
}
BasicIntegrationRepository uses gorm.DB for querying the database
func (*BasicIntegrationRepository) CreateBasicIntegration ¶
func (repo *BasicIntegrationRepository) CreateBasicIntegration( am *ints.BasicIntegration, ) (*ints.BasicIntegration, error)
CreateBasicIntegration creates a new basic auth mechanism
func (*BasicIntegrationRepository) DecryptBasicIntegrationData ¶
func (repo *BasicIntegrationRepository) DecryptBasicIntegrationData( basic *ints.BasicIntegration, key *[32]byte, ) error
DecryptBasicIntegrationData will decrypt the basic integration data before returning it from the DB
func (*BasicIntegrationRepository) EncryptBasicIntegrationData ¶
func (repo *BasicIntegrationRepository) EncryptBasicIntegrationData( basic *ints.BasicIntegration, key *[32]byte, ) error
EncryptBasicIntegrationData will encrypt the basic integration data before writing to the DB
func (*BasicIntegrationRepository) ListBasicIntegrationsByProjectID ¶
func (repo *BasicIntegrationRepository) ListBasicIntegrationsByProjectID( projectID uint, ) ([]*ints.BasicIntegration, error)
ListBasicIntegrationsByProjectID finds all basic auth mechanisms for a given project id
func (*BasicIntegrationRepository) ReadBasicIntegration ¶
func (repo *BasicIntegrationRepository) ReadBasicIntegration( id uint, ) (*ints.BasicIntegration, error)
ReadBasicIntegration finds a basic auth mechanism by id
type ClusterRepository ¶
type ClusterRepository struct {
// contains filtered or unexported fields
}
ClusterRepository uses gorm.DB for querying the database
func (*ClusterRepository) CreateCluster ¶
CreateCluster creates a new cluster
func (*ClusterRepository) CreateClusterCandidate ¶
func (repo *ClusterRepository) CreateClusterCandidate( cc *models.ClusterCandidate, ) (*models.ClusterCandidate, error)
CreateClusterCandidate creates a new cluster candidate
func (*ClusterRepository) DecryptClusterCandidateData ¶
func (repo *ClusterRepository) DecryptClusterCandidateData( cc *models.ClusterCandidate, key *[32]byte, ) error
DecryptClusterCandidateData will decrypt the service account candidate data before returning it from the DB
func (*ClusterRepository) DecryptClusterData ¶
func (repo *ClusterRepository) DecryptClusterData( cluster *models.Cluster, key *[32]byte, ) error
DecryptClusterData will decrypt the user's service account data before returning it from the DB
func (*ClusterRepository) DeleteCluster ¶
func (repo *ClusterRepository) DeleteCluster( cluster *models.Cluster, ) error
DeleteCluster removes a cluster from the db
func (*ClusterRepository) EncryptClusterCandidateData ¶
func (repo *ClusterRepository) EncryptClusterCandidateData( cc *models.ClusterCandidate, key *[32]byte, ) error
EncryptClusterCandidateData will encrypt the service account candidate data before writing to the DB
func (*ClusterRepository) EncryptClusterData ¶
func (repo *ClusterRepository) EncryptClusterData( cluster *models.Cluster, key *[32]byte, ) error
EncryptClusterData will encrypt the user's service account data before writing to the DB
func (*ClusterRepository) ListClusterCandidatesByProjectID ¶
func (repo *ClusterRepository) ListClusterCandidatesByProjectID( projectID uint, ) ([]*models.ClusterCandidate, error)
ListClusterCandidatesByProjectID finds all cluster candidates for a given project id
func (*ClusterRepository) ListClustersByProjectID ¶
func (repo *ClusterRepository) ListClustersByProjectID( projectID uint, ) ([]*models.Cluster, error)
ListClustersByProjectID finds all clusters for a given project id
func (*ClusterRepository) ReadCluster ¶
func (repo *ClusterRepository) ReadCluster( id uint, ) (*models.Cluster, error)
ReadCluster finds a cluster by id
func (*ClusterRepository) ReadClusterCandidate ¶
func (repo *ClusterRepository) ReadClusterCandidate( id uint, ) (*models.ClusterCandidate, error)
ReadClusterCandidate finds a cluster candidate by id
func (*ClusterRepository) UpdateCluster ¶
UpdateCluster modifies an existing Cluster in the database
func (*ClusterRepository) UpdateClusterCandidateCreatedClusterID ¶
func (repo *ClusterRepository) UpdateClusterCandidateCreatedClusterID( id uint, createdClusterID uint, ) (*models.ClusterCandidate, error)
UpdateClusterCandidateCreatedClusterID updates the CreatedClusterID for a candidate, after the candidate has been resolved.
func (*ClusterRepository) UpdateClusterTokenCache ¶
func (repo *ClusterRepository) UpdateClusterTokenCache( tokenCache *ints.ClusterTokenCache, ) (*models.Cluster, error)
UpdateClusterTokenCache updates the token cache for a cluster
type DNSRecordRepository ¶
type DNSRecordRepository struct {
// contains filtered or unexported fields
}
DNSRecordRepository uses gorm.DB for querying the database
func (*DNSRecordRepository) CreateDNSRecord ¶
func (repo *DNSRecordRepository) CreateDNSRecord(record *models.DNSRecord) (*models.DNSRecord, error)
CreateDNSRecord creates a new helm repo
type GCPIntegrationRepository ¶
type GCPIntegrationRepository struct {
// contains filtered or unexported fields
}
GCPIntegrationRepository uses gorm.DB for querying the database
func (*GCPIntegrationRepository) CreateGCPIntegration ¶
func (repo *GCPIntegrationRepository) CreateGCPIntegration( am *ints.GCPIntegration, ) (*ints.GCPIntegration, error)
CreateGCPIntegration creates a new gcp auth mechanism
func (*GCPIntegrationRepository) DecryptGCPIntegrationData ¶
func (repo *GCPIntegrationRepository) DecryptGCPIntegrationData( gcp *ints.GCPIntegration, key *[32]byte, ) error
DecryptGCPIntegrationData will decrypt the gcp integration data before returning it from the DB
func (*GCPIntegrationRepository) EncryptGCPIntegrationData ¶
func (repo *GCPIntegrationRepository) EncryptGCPIntegrationData( gcp *ints.GCPIntegration, key *[32]byte, ) error
EncryptGCPIntegrationData will encrypt the gcp integration data before writing to the DB
func (*GCPIntegrationRepository) ListGCPIntegrationsByProjectID ¶
func (repo *GCPIntegrationRepository) ListGCPIntegrationsByProjectID( projectID uint, ) ([]*ints.GCPIntegration, error)
ListGCPIntegrationsByProjectID finds all gcp auth mechanisms for a given project id
func (*GCPIntegrationRepository) ReadGCPIntegration ¶
func (repo *GCPIntegrationRepository) ReadGCPIntegration( id uint, ) (*ints.GCPIntegration, error)
ReadGCPIntegration finds a gcp auth mechanism by id
type GitActionConfigRepository ¶
type GitActionConfigRepository struct {
// contains filtered or unexported fields
}
GitActionConfigRepository uses gorm.DB for querying the database
func (*GitActionConfigRepository) CreateGitActionConfig ¶
func (repo *GitActionConfigRepository) CreateGitActionConfig(ga *models.GitActionConfig) (*models.GitActionConfig, error)
CreateGitActionConfig creates a new git repo
func (*GitActionConfigRepository) ReadGitActionConfig ¶
func (repo *GitActionConfigRepository) ReadGitActionConfig(id uint) (*models.GitActionConfig, error)
ReadGitActionConfig gets a git repo specified by a unique id
type GitRepoRepository ¶
type GitRepoRepository struct {
// contains filtered or unexported fields
}
GitRepoRepository uses gorm.DB for querying the database
func (*GitRepoRepository) CreateGitRepo ¶
CreateGitRepo creates a new git repo
func (*GitRepoRepository) DeleteGitRepo ¶
func (repo *GitRepoRepository) DeleteGitRepo( gr *models.GitRepo, ) error
DeleteGitRepo removes a git repo from the db
func (*GitRepoRepository) ListGitReposByProjectID ¶
func (repo *GitRepoRepository) ListGitReposByProjectID( projectID uint, ) ([]*models.GitRepo, error)
ListGitReposByProjectID finds all git repos for a given project id
func (*GitRepoRepository) ReadGitRepo ¶
func (repo *GitRepoRepository) ReadGitRepo(id uint) (*models.GitRepo, error)
ReadGitRepo gets a git repo specified by a unique id
func (*GitRepoRepository) UpdateGitRepo ¶
UpdateGitRepo modifies an existing GitRepo in the database
type GithubAppInstallationRepository ¶ added in v0.5.0
type GithubAppInstallationRepository struct {
// contains filtered or unexported fields
}
GithubAppInstallationRepository implements repository.GithubAppInstallationRepository
func (*GithubAppInstallationRepository) CreateGithubAppInstallation ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) CreateGithubAppInstallation(am *ints.GithubAppInstallation) (*ints.GithubAppInstallation, error)
CreateGithubAppInstallation creates a new GithubAppInstallation instance
func (*GithubAppInstallationRepository) DeleteGithubAppInstallationByAccountID ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) DeleteGithubAppInstallationByAccountID(accountID int64) error
DeleteGithubAppInstallationByAccountID deletes a GithubAppInstallation given an account ID note that this deletion is done with db.Unscoped(), so the record is actually deleted
func (*GithubAppInstallationRepository) ReadGithubAppInstallation ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) ReadGithubAppInstallation(id uint) (*ints.GithubAppInstallation, error)
ReadGithubAppInstallation finds a GithubAppInstallation by id
func (*GithubAppInstallationRepository) ReadGithubAppInstallationByAccountID ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByAccountID(accountID int64) (*ints.GithubAppInstallation, error)
ReadGithubAppInstallationByAccountID finds a GithubAppInstallation by an account ID
func (*GithubAppInstallationRepository) ReadGithubAppInstallationByAccountIDs ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByAccountIDs(accountIDs []int64) ([]*ints.GithubAppInstallation, error)
ReadGithubAppInstallationByAccountIDs finds all instances of GithubInstallations given a list of account IDs note that if there is not Installation for a given ID, no error will be generated
type GithubAppOAuthIntegrationRepository ¶ added in v0.5.0
type GithubAppOAuthIntegrationRepository struct {
// contains filtered or unexported fields
}
GithubAppOAuthIntegrationRepository implements repository.GithubAppOAuthIntegrationRepository
func (*GithubAppOAuthIntegrationRepository) CreateGithubAppOAuthIntegration ¶ added in v0.5.0
func (repo *GithubAppOAuthIntegrationRepository) CreateGithubAppOAuthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
CreateGithubAppOAuthIntegration creates a new GithubAppOAuthIntegration
func (*GithubAppOAuthIntegrationRepository) ReadGithubAppOauthIntegration ¶ added in v0.5.0
func (repo *GithubAppOAuthIntegrationRepository) ReadGithubAppOauthIntegration(id uint) (*ints.GithubAppOAuthIntegration, error)
ReadGithubAppOauthIntegration finds a GithubAppOauthIntegration by id
func (*GithubAppOAuthIntegrationRepository) UpdateGithubAppOauthIntegration ¶ added in v0.6.0
func (repo *GithubAppOAuthIntegrationRepository) UpdateGithubAppOauthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
UpdateGithubAppOauthIntegration updates a GithubAppOauthIntegration
type HelmRepoRepository ¶
type HelmRepoRepository struct {
// contains filtered or unexported fields
}
HelmRepoRepository uses gorm.DB for querying the database
func (*HelmRepoRepository) CreateHelmRepo ¶
CreateHelmRepo creates a new helm repo
func (*HelmRepoRepository) DecryptHelmRepoData ¶
func (repo *HelmRepoRepository) DecryptHelmRepoData( hr *models.HelmRepo, key *[32]byte, ) error
DecryptHelmRepoData will decrypt the user's helm repo data before returning it from the DB
func (*HelmRepoRepository) DeleteHelmRepo ¶
func (repo *HelmRepoRepository) DeleteHelmRepo( hr *models.HelmRepo, ) error
DeleteHelmRepo removes a registry from the db
func (*HelmRepoRepository) EncryptHelmRepoData ¶
func (repo *HelmRepoRepository) EncryptHelmRepoData( hr *models.HelmRepo, key *[32]byte, ) error
EncryptHelmRepoData will encrypt the user's helm repo data before writing to the DB
func (*HelmRepoRepository) ListHelmReposByProjectID ¶
func (repo *HelmRepoRepository) ListHelmReposByProjectID( projectID uint, ) ([]*models.HelmRepo, error)
ListHelmReposByProjectID finds all helm repos for a given project id
func (*HelmRepoRepository) ReadHelmRepo ¶
func (repo *HelmRepoRepository) ReadHelmRepo(id uint) (*models.HelmRepo, error)
ReadHelmRepo gets a helm repo specified by a unique id
func (*HelmRepoRepository) UpdateHelmRepo ¶
UpdateHelmRepo modifies an existing HelmRepo in the database
func (*HelmRepoRepository) UpdateHelmRepoTokenCache ¶
func (repo *HelmRepoRepository) UpdateHelmRepoTokenCache( tokenCache *ints.HelmRepoTokenCache, ) (*models.HelmRepo, error)
UpdateHelmRepoTokenCache updates the helm repo for a registry
type InfraRepository ¶
type InfraRepository struct {
// contains filtered or unexported fields
}
InfraRepository uses gorm.DB for querying the database
func (*InfraRepository) CreateInfra ¶
CreateInfra creates a new aws infra
func (*InfraRepository) DecryptInfraData ¶
func (repo *InfraRepository) DecryptInfraData( infra *models.Infra, key *[32]byte, ) error
DecryptInfraData will decrypt the user's infra data before returning it from the DB
func (*InfraRepository) EncryptInfraData ¶
func (repo *InfraRepository) EncryptInfraData( infra *models.Infra, key *[32]byte, ) error
EncryptInfraData will encrypt the infra data before writing to the DB
func (*InfraRepository) ListInfrasByProjectID ¶
func (repo *InfraRepository) ListInfrasByProjectID( projectID uint, ) ([]*models.Infra, error)
ListInfrasByProjectID finds all aws infras for a given project id
func (*InfraRepository) ReadInfra ¶
func (repo *InfraRepository) ReadInfra(id uint) (*models.Infra, error)
ReadInfra gets a aws infra specified by a unique id
func (*InfraRepository) UpdateInfra ¶
UpdateInfra modifies an existing Infra in the database
type InviteRepository ¶
type InviteRepository struct {
// contains filtered or unexported fields
}
InviteRepository uses gorm.DB for querying the database
func (*InviteRepository) CreateInvite ¶
CreateInvite creates a new invite
func (*InviteRepository) DeleteInvite ¶
func (repo *InviteRepository) DeleteInvite( invite *models.Invite, ) error
DeleteInvite removes a registry from the db
func (*InviteRepository) ListInvitesByProjectID ¶
func (repo *InviteRepository) ListInvitesByProjectID( projectID uint, ) ([]*models.Invite, error)
ListInvitesByProjectID finds all invites for a given project id
func (*InviteRepository) ReadInvite ¶
func (repo *InviteRepository) ReadInvite(id uint) (*models.Invite, error)
ReadInvite gets an invite specified by a unique id
func (*InviteRepository) ReadInviteByToken ¶
func (repo *InviteRepository) ReadInviteByToken(token string) (*models.Invite, error)
ReadInviteByToken gets an invite specified by a unique token
func (*InviteRepository) UpdateInvite ¶
UpdateInvite updates an invitation in the DB
type KubeIntegrationRepository ¶
type KubeIntegrationRepository struct {
// contains filtered or unexported fields
}
KubeIntegrationRepository uses gorm.DB for querying the database
func (*KubeIntegrationRepository) CreateKubeIntegration ¶
func (repo *KubeIntegrationRepository) CreateKubeIntegration( am *ints.KubeIntegration, ) (*ints.KubeIntegration, error)
CreateKubeIntegration creates a new kube auth mechanism
func (*KubeIntegrationRepository) DecryptKubeIntegrationData ¶
func (repo *KubeIntegrationRepository) DecryptKubeIntegrationData( ki *ints.KubeIntegration, key *[32]byte, ) error
DecryptKubeIntegrationData will decrypt the kube integration data before returning it from the DB
func (*KubeIntegrationRepository) EncryptKubeIntegrationData ¶
func (repo *KubeIntegrationRepository) EncryptKubeIntegrationData( ki *ints.KubeIntegration, key *[32]byte, ) error
EncryptKubeIntegrationData will encrypt the kube integration data before writing to the DB
func (*KubeIntegrationRepository) ListKubeIntegrationsByProjectID ¶
func (repo *KubeIntegrationRepository) ListKubeIntegrationsByProjectID( projectID uint, ) ([]*ints.KubeIntegration, error)
ListKubeIntegrationsByProjectID finds all kube auth mechanisms for a given project id
func (*KubeIntegrationRepository) ReadKubeIntegration ¶
func (repo *KubeIntegrationRepository) ReadKubeIntegration( id uint, ) (*ints.KubeIntegration, error)
ReadKubeIntegration finds a kube auth mechanism by id
type OAuthIntegrationRepository ¶
type OAuthIntegrationRepository struct {
// contains filtered or unexported fields
}
OAuthIntegrationRepository uses gorm.DB for querying the database
func (*OAuthIntegrationRepository) CreateOAuthIntegration ¶
func (repo *OAuthIntegrationRepository) CreateOAuthIntegration( am *ints.OAuthIntegration, ) (*ints.OAuthIntegration, error)
CreateOAuthIntegration creates a new oauth auth mechanism
func (*OAuthIntegrationRepository) DecryptOAuthIntegrationData ¶
func (repo *OAuthIntegrationRepository) DecryptOAuthIntegrationData( oauth *ints.OAuthIntegration, key *[32]byte, ) error
DecryptOAuthIntegrationData will decrypt the oauth integration data before returning it from the DB
func (*OAuthIntegrationRepository) EncryptOAuthIntegrationData ¶
func (repo *OAuthIntegrationRepository) EncryptOAuthIntegrationData( oauth *ints.OAuthIntegration, key *[32]byte, ) error
EncryptOAuthIntegrationData will encrypt the oauth integration data before writing to the DB
func (*OAuthIntegrationRepository) ListOAuthIntegrationsByProjectID ¶
func (repo *OAuthIntegrationRepository) ListOAuthIntegrationsByProjectID( projectID uint, ) ([]*ints.OAuthIntegration, error)
ListOAuthIntegrationsByProjectID finds all oauth auth mechanisms for a given project id
func (*OAuthIntegrationRepository) ReadOAuthIntegration ¶
func (repo *OAuthIntegrationRepository) ReadOAuthIntegration( id uint, ) (*ints.OAuthIntegration, error)
ReadOAuthIntegration finds a oauth auth mechanism by id
func (*OAuthIntegrationRepository) UpdateOAuthIntegration ¶
func (repo *OAuthIntegrationRepository) UpdateOAuthIntegration( am *ints.OAuthIntegration, ) (*ints.OAuthIntegration, error)
UpdateOAuthIntegration modifies an existing oauth integration in the database
type OIDCIntegrationRepository ¶
type OIDCIntegrationRepository struct {
// contains filtered or unexported fields
}
OIDCIntegrationRepository uses gorm.DB for querying the database
func (*OIDCIntegrationRepository) CreateOIDCIntegration ¶
func (repo *OIDCIntegrationRepository) CreateOIDCIntegration( am *ints.OIDCIntegration, ) (*ints.OIDCIntegration, error)
CreateOIDCIntegration creates a new oidc auth mechanism
func (*OIDCIntegrationRepository) DecryptOIDCIntegrationData ¶
func (repo *OIDCIntegrationRepository) DecryptOIDCIntegrationData( oidc *ints.OIDCIntegration, key *[32]byte, ) error
DecryptOIDCIntegrationData will decrypt the kube integration data before returning it from the DB
func (*OIDCIntegrationRepository) EncryptOIDCIntegrationData ¶
func (repo *OIDCIntegrationRepository) EncryptOIDCIntegrationData( oidc *ints.OIDCIntegration, key *[32]byte, ) error
EncryptOIDCIntegrationData will encrypt the oidc integration data before writing to the DB
func (*OIDCIntegrationRepository) ListOIDCIntegrationsByProjectID ¶
func (repo *OIDCIntegrationRepository) ListOIDCIntegrationsByProjectID( projectID uint, ) ([]*ints.OIDCIntegration, error)
ListOIDCIntegrationsByProjectID finds all oidc auth mechanisms for a given project id
func (*OIDCIntegrationRepository) ReadOIDCIntegration ¶
func (repo *OIDCIntegrationRepository) ReadOIDCIntegration( id uint, ) (*ints.OIDCIntegration, error)
ReadOIDCIntegration finds a oidc auth mechanism by id
type PWResetTokenRepository ¶
type PWResetTokenRepository struct {
// contains filtered or unexported fields
}
PWResetTokenRepository uses gorm.DB for querying the database
func (*PWResetTokenRepository) CreatePWResetToken ¶
func (repo *PWResetTokenRepository) CreatePWResetToken(a *models.PWResetToken) (*models.PWResetToken, error)
CreatePWResetToken creates a new auth code
func (*PWResetTokenRepository) ReadPWResetToken ¶
func (repo *PWResetTokenRepository) ReadPWResetToken(id uint) (*models.PWResetToken, error)
ReadPWResetToken gets an invite specified by a unique token
func (*PWResetTokenRepository) UpdatePWResetToken ¶
func (repo *PWResetTokenRepository) UpdatePWResetToken( pwToken *models.PWResetToken, ) (*models.PWResetToken, error)
UpdatePWResetToken modifies an existing PWResetToken in the database
type ProjectRepository ¶
type ProjectRepository struct {
// contains filtered or unexported fields
}
ProjectRepository uses gorm.DB for querying the database
func (*ProjectRepository) CreateProject ¶
CreateProject creates a new project
func (*ProjectRepository) CreateProjectRole ¶
func (repo *ProjectRepository) CreateProjectRole(project *models.Project, role *models.Role) (*models.Role, error)
CreateProjectRole appends a role to the existing array of roles
func (*ProjectRepository) DeleteProject ¶
DeleteProject deletes a project (marking deleted in the db)
func (*ProjectRepository) DeleteProjectRole ¶ added in v0.5.0
func (repo *ProjectRepository) DeleteProjectRole(projID, userID uint) (*models.Role, error)
func (*ProjectRepository) ListProjectRoles ¶ added in v0.5.0
func (repo *ProjectRepository) ListProjectRoles(projID uint) ([]models.Role, error)
ReadProject gets a projects specified by a unique id
func (*ProjectRepository) ListProjectsByUserID ¶
func (repo *ProjectRepository) ListProjectsByUserID(userID uint) ([]*models.Project, error)
ListProjectsByUserID lists projects where a user has an associated role
func (*ProjectRepository) ReadProject ¶
func (repo *ProjectRepository) ReadProject(id uint) (*models.Project, error)
ReadProject gets a projects specified by a unique id
func (*ProjectRepository) ReadProjectRole ¶ added in v0.5.0
func (repo *ProjectRepository) ReadProjectRole(projID, userID uint) (*models.Role, error)
ReadProject gets a projects specified by a unique id
func (*ProjectRepository) UpdateProjectRole ¶ added in v0.5.0
type RegistryRepository ¶
type RegistryRepository struct {
// contains filtered or unexported fields
}
RegistryRepository uses gorm.DB for querying the database
func (*RegistryRepository) CreateRegistry ¶
CreateRegistry creates a new registry
func (*RegistryRepository) DecryptRegistryData ¶
func (repo *RegistryRepository) DecryptRegistryData( registry *models.Registry, key *[32]byte, ) error
DecryptRegistryData will decrypt the user's registry data before returning it from the DB
func (*RegistryRepository) DeleteRegistry ¶
func (repo *RegistryRepository) DeleteRegistry( reg *models.Registry, ) error
DeleteRegistry removes a registry from the db
func (*RegistryRepository) EncryptRegistryData ¶
func (repo *RegistryRepository) EncryptRegistryData( registry *models.Registry, key *[32]byte, ) error
EncryptRegistryData will encrypt the user's registry data before writing to the DB
func (*RegistryRepository) ListRegistriesByProjectID ¶
func (repo *RegistryRepository) ListRegistriesByProjectID( projectID uint, ) ([]*models.Registry, error)
ListRegistriesByProjectID finds all registries for a given project id
func (*RegistryRepository) ReadRegistry ¶
func (repo *RegistryRepository) ReadRegistry(id uint) (*models.Registry, error)
ReadRegistry gets a registry specified by a unique id
func (*RegistryRepository) UpdateRegistry ¶
UpdateRegistry modifies an existing Registry in the database
func (*RegistryRepository) UpdateRegistryTokenCache ¶
func (repo *RegistryRepository) UpdateRegistryTokenCache( tokenCache *ints.RegTokenCache, ) (*models.Registry, error)
UpdateRegistryTokenCache updates the token cache for a registry
type ReleaseRepository ¶
type ReleaseRepository struct {
// contains filtered or unexported fields
}
ReleaseRepository uses gorm.DB for querying the database
func (*ReleaseRepository) CreateRelease ¶
CreateRelease adds a new Release row to the Releases table in the database
func (*ReleaseRepository) DeleteRelease ¶
DeleteRelease deletes a single user using their unique name and namespace pair
func (*ReleaseRepository) ListReleasesByImageRepoURI ¶ added in v0.4.0
func (repo *ReleaseRepository) ListReleasesByImageRepoURI(clusterID uint, imageRepoURI string) ([]*models.Release, error)
ReadRelease finds a single release based on their unique name and namespace pair.
func (*ReleaseRepository) ReadRelease ¶
func (repo *ReleaseRepository) ReadRelease(clusterID uint, name, namespace string) (*models.Release, error)
ReadRelease finds a single release based on their unique name and namespace pair.
func (*ReleaseRepository) ReadReleaseByWebhookToken ¶
func (repo *ReleaseRepository) ReadReleaseByWebhookToken(token string) (*models.Release, error)
ReadReleaseByWebhookToken finds a single release based on their unique webhook token.
func (*ReleaseRepository) UpdateRelease ¶
UpdateRelease modifies an existing Release in the database
type SessionRepository ¶
type SessionRepository struct {
// contains filtered or unexported fields
}
SessionRepository uses gorm.DB for querying the database
func (*SessionRepository) CreateSession ¶
CreateSession must take in Key, Data, and ExpiresAt as arguments.
func (*SessionRepository) DeleteSession ¶
DeleteSession deletes a session by Key
func (*SessionRepository) SelectSession ¶
SelectSession returns a session with matching key
func (*SessionRepository) UpdateSession ¶
UpdateSession updates only the Data field using Key as selector.
type SlackIntegrationRepository ¶ added in v0.7.2
type SlackIntegrationRepository struct {
// contains filtered or unexported fields
}
SlackIntegrationRepository uses gorm.DB for querying the database
func (*SlackIntegrationRepository) CreateSlackIntegration ¶ added in v0.7.2
func (repo *SlackIntegrationRepository) CreateSlackIntegration( slackInt *ints.SlackIntegration, ) (*ints.SlackIntegration, error)
CreateSlackIntegration creates a new kube auth mechanism
func (*SlackIntegrationRepository) DecryptSlackIntegrationData ¶ added in v0.7.2
func (repo *SlackIntegrationRepository) DecryptSlackIntegrationData( slackInt *ints.SlackIntegration, key *[32]byte, ) error
DecryptSlackIntegrationData will decrypt the slack integration data before returning it from the DB
func (*SlackIntegrationRepository) DeleteSlackIntegration ¶ added in v0.7.2
func (repo *SlackIntegrationRepository) DeleteSlackIntegration( integrationID uint, ) error
DeleteSlackIntegration deletes a slack integration by ID
func (*SlackIntegrationRepository) EncryptSlackIntegrationData ¶ added in v0.7.2
func (repo *SlackIntegrationRepository) EncryptSlackIntegrationData( slackInt *ints.SlackIntegration, key *[32]byte, ) error
EncryptSlackIntegrationData will encrypt the slack integration data before writing to the DB
func (*SlackIntegrationRepository) ListSlackIntegrationsByProjectID ¶ added in v0.7.2
func (repo *SlackIntegrationRepository) ListSlackIntegrationsByProjectID( projectID uint, ) ([]*ints.SlackIntegration, error)
ListSlackIntegrationsByProjectID finds all kube auth mechanisms for a given project id
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository uses gorm.DB for querying the database
func (*UserRepository) CheckPassword ¶
func (repo *UserRepository) CheckPassword(id int, pwd string) (bool, error)
CheckPassword checks the input password is correct for the provided user id.
func (*UserRepository) CreateUser ¶
CreateUser adds a new User row to the Users table in the database
func (*UserRepository) DeleteUser ¶
DeleteUser deletes a single user using their unique id
func (*UserRepository) ListUsersByIDs ¶ added in v0.5.0
func (repo *UserRepository) ListUsersByIDs(ids []uint) ([]*models.User, error)
ListUsersByIDs finds all users matching ids
func (*UserRepository) ReadUser ¶
func (repo *UserRepository) ReadUser(id uint) (*models.User, error)
ReadUser finds a single user based on their unique id
func (*UserRepository) ReadUserByEmail ¶
func (repo *UserRepository) ReadUserByEmail(email string) (*models.User, error)
ReadUserByEmail finds a single user based on their unique email
func (*UserRepository) ReadUserByGithubUserID ¶
func (repo *UserRepository) ReadUserByGithubUserID(id int64) (*models.User, error)
ReadUserByGithubUserID finds a single user based on their github user id
func (*UserRepository) ReadUserByGoogleUserID ¶ added in v0.3.1
func (repo *UserRepository) ReadUserByGoogleUserID(id string) (*models.User, error)
ReadUserByGoogleUserID finds a single user based on their google user id
func (*UserRepository) UpdateUser ¶
UpdateUser modifies an existing User in the database