Documentation ¶
Index ¶
- func NewAWSIntegrationRepository(canQuery bool) repository.AWSIntegrationRepository
- func NewAuthCodeRepository(canQuery bool) repository.AuthCodeRepository
- func NewBasicIntegrationRepository(canQuery bool) repository.BasicIntegrationRepository
- func NewClusterRepository(canQuery bool) repository.ClusterRepository
- func NewDNSRecordRepository(canQuery bool) repository.DNSRecordRepository
- func NewGCPIntegrationRepository(canQuery bool) repository.GCPIntegrationRepository
- func NewGitRepoRepository(canQuery bool) repository.GitRepoRepository
- func NewGithubAppInstallationRepository(canQuery bool) repository.GithubAppInstallationRepository
- func NewGithubAppOAuthIntegrationRepository(canQuery bool) repository.GithubAppOAuthIntegrationRepository
- func NewHelmRepoRepository(canQuery bool) repository.HelmRepoRepository
- func NewInfraRepository(canQuery bool) repository.InfraRepository
- func NewInviteRepository(canQuery bool) repository.InviteRepository
- func NewKubeIntegrationRepository(canQuery bool) repository.KubeIntegrationRepository
- func NewOAuthIntegrationRepository(canQuery bool) repository.OAuthIntegrationRepository
- func NewOIDCIntegrationRepository(canQuery bool) repository.OIDCIntegrationRepository
- func NewPWResetTokenRepository(canQuery bool) repository.PWResetTokenRepository
- func NewProjectRepository(canQuery bool) repository.ProjectRepository
- func NewRegistryRepository(canQuery bool) repository.RegistryRepository
- func NewRepository(canQuery bool) *repository.Repository
- func NewSessionRepository(canQuery bool) repository.SessionRepository
- func NewUserRepository(canQuery bool) repository.UserRepository
- type AWSIntegrationRepository
- func (repo *AWSIntegrationRepository) CreateAWSIntegration(am *ints.AWSIntegration) (*ints.AWSIntegration, 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) 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) DeleteCluster(cluster *models.Cluster) 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) ListGCPIntegrationsByProjectID(projectID uint) ([]*ints.GCPIntegration, error)
- func (repo *GCPIntegrationRepository) ReadGCPIntegration(id uint) (*ints.GCPIntegration, error)
- 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) DeleteHelmRepo(hr *models.HelmRepo) 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) 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) 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) 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) 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) DeleteRegistry(reg *models.Registry) 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 SessionRepository
- func (repo *SessionRepository) CreateSession(session *models.Session) (*models.Session, error)
- func (repo *SessionRepository) DeleteSession(session *models.Session) (*models.Session, error)
- func (repo *SessionRepository) SelectSession(session *models.Session) (*models.Session, error)
- func (repo *SessionRepository) UpdateSession(session *models.Session) (*models.Session, 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 NewAWSIntegrationRepository ¶
func NewAWSIntegrationRepository(canQuery bool) repository.AWSIntegrationRepository
NewAWSIntegrationRepository will return errors if canQuery is false
func NewAuthCodeRepository ¶
func NewAuthCodeRepository(canQuery bool) repository.AuthCodeRepository
NewAuthCodeRepository returns a AuthCodeRepository which uses gorm.DB for querying the database
func NewBasicIntegrationRepository ¶
func NewBasicIntegrationRepository(canQuery bool) repository.BasicIntegrationRepository
NewBasicIntegrationRepository will return errors if canQuery is false
func NewClusterRepository ¶
func NewClusterRepository(canQuery bool) repository.ClusterRepository
NewClusterRepository will return errors if canQuery is false
func NewDNSRecordRepository ¶
func NewDNSRecordRepository(canQuery bool) repository.DNSRecordRepository
NewDNSRecordRepository will return errors if canQuery is false
func NewGCPIntegrationRepository ¶
func NewGCPIntegrationRepository(canQuery bool) repository.GCPIntegrationRepository
NewGCPIntegrationRepository will return errors if canQuery is false
func NewGitRepoRepository ¶
func NewGitRepoRepository(canQuery bool) repository.GitRepoRepository
NewGitRepoRepository will return errors if canQuery is false
func NewGithubAppInstallationRepository ¶ added in v0.5.0
func NewGithubAppInstallationRepository(canQuery bool) repository.GithubAppInstallationRepository
func NewGithubAppOAuthIntegrationRepository ¶ added in v0.5.0
func NewGithubAppOAuthIntegrationRepository(canQuery bool) repository.GithubAppOAuthIntegrationRepository
func NewHelmRepoRepository ¶
func NewHelmRepoRepository(canQuery bool) repository.HelmRepoRepository
NewHelmRepoRepository will return errors if canQuery is false
func NewInfraRepository ¶
func NewInfraRepository(canQuery bool) repository.InfraRepository
NewInfraRepository will return errors if canQuery is false
func NewInviteRepository ¶
func NewInviteRepository(canQuery bool) repository.InviteRepository
NewInviteRepository returns a InviteRepository which uses gorm.DB for querying the database
func NewKubeIntegrationRepository ¶
func NewKubeIntegrationRepository(canQuery bool) repository.KubeIntegrationRepository
NewKubeIntegrationRepository will return errors if canQuery is false
func NewOAuthIntegrationRepository ¶
func NewOAuthIntegrationRepository(canQuery bool) repository.OAuthIntegrationRepository
NewOAuthIntegrationRepository will return errors if canQuery is false
func NewOIDCIntegrationRepository ¶
func NewOIDCIntegrationRepository(canQuery bool) repository.OIDCIntegrationRepository
NewOIDCIntegrationRepository will return errors if canQuery is false
func NewPWResetTokenRepository ¶
func NewPWResetTokenRepository(canQuery bool) repository.PWResetTokenRepository
NewPWResetTokenRepository returns a PWResetTokenRepository which uses gorm.DB for querying the database
func NewProjectRepository ¶
func NewProjectRepository(canQuery bool) repository.ProjectRepository
NewProjectRepository will return errors if canQuery is false
func NewRegistryRepository ¶
func NewRegistryRepository(canQuery bool) repository.RegistryRepository
NewRegistryRepository will return errors if canQuery is false
func NewRepository ¶
func NewRepository(canQuery bool) *repository.Repository
NewRepository returns a Repository which persists users in memory and accepts a parameter that can trigger read/write errors
func NewSessionRepository ¶
func NewSessionRepository(canQuery bool) repository.SessionRepository
NewSessionRepository returns pointer to repo along with the db
func NewUserRepository ¶
func NewUserRepository(canQuery bool) repository.UserRepository
NewUserRepository will return errors if canQuery is false
Types ¶
type AWSIntegrationRepository ¶
type AWSIntegrationRepository struct {
// contains filtered or unexported fields
}
AWSIntegrationRepository implements repository.AWSIntegrationRepository
func (*AWSIntegrationRepository) CreateAWSIntegration ¶
func (repo *AWSIntegrationRepository) CreateAWSIntegration( am *ints.AWSIntegration, ) (*ints.AWSIntegration, error)
CreateAWSIntegration creates a new aws auth mechanism
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)
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 invite
func (*AuthCodeRepository) ReadAuthCode ¶
func (repo *AuthCodeRepository) ReadAuthCode(code string) (*models.AuthCode, error)
ReadAuthCode gets an auth code object specified by the unique code
type BasicIntegrationRepository ¶
type BasicIntegrationRepository struct {
// contains filtered or unexported fields
}
BasicIntegrationRepository implements repository.BasicIntegrationRepository
func (*BasicIntegrationRepository) CreateBasicIntegration ¶
func (repo *BasicIntegrationRepository) CreateBasicIntegration( am *ints.BasicIntegration, ) (*ints.BasicIntegration, error)
CreateBasicIntegration creates a new basic auth mechanism
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 implements repository.ClusterRepository
func (*ClusterRepository) CreateCluster ¶
CreateCluster creates a new servicea account
func (*ClusterRepository) CreateClusterCandidate ¶
func (repo *ClusterRepository) CreateClusterCandidate( cc *models.ClusterCandidate, ) (*models.ClusterCandidate, error)
CreateClusterCandidate creates a new cluster candidate
func (*ClusterRepository) DeleteCluster ¶
func (repo *ClusterRepository) DeleteCluster( cluster *models.Cluster, ) error
DeleteCluster removes a cluster from the array by setting it to nil
func (*ClusterRepository) ListClusterCandidatesByProjectID ¶
func (repo *ClusterRepository) ListClusterCandidatesByProjectID( projectID uint, ) ([]*models.ClusterCandidate, error)
ListClusterCandidatesByProjectID finds all service account candidates for a given project id
func (*ClusterRepository) ListClustersByProjectID ¶
func (repo *ClusterRepository) ListClustersByProjectID( projectID uint, ) ([]*models.Cluster, error)
ListClustersByProjectID finds all service accounts for a given project id
func (*ClusterRepository) ReadCluster ¶
func (repo *ClusterRepository) ReadCluster( id uint, ) (*models.Cluster, error)
ReadCluster finds a service account by id
func (*ClusterRepository) ReadClusterCandidate ¶
func (repo *ClusterRepository) ReadClusterCandidate(id uint) (*models.ClusterCandidate, error)
ReadClusterCandidate finds a service account 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 implements repository.DNSRecordRepository
func (*DNSRecordRepository) CreateDNSRecord ¶
func (repo *DNSRecordRepository) CreateDNSRecord( record *models.DNSRecord, ) (*models.DNSRecord, error)
CreateDNSRecord creates a new repoistry
type GCPIntegrationRepository ¶
type GCPIntegrationRepository struct {
// contains filtered or unexported fields
}
GCPIntegrationRepository implements repository.GCPIntegrationRepository
func (*GCPIntegrationRepository) CreateGCPIntegration ¶
func (repo *GCPIntegrationRepository) CreateGCPIntegration( am *ints.GCPIntegration, ) (*ints.GCPIntegration, error)
CreateGCPIntegration creates a new gcp auth mechanism
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 GitRepoRepository ¶
type GitRepoRepository struct {
// contains filtered or unexported fields
}
GitRepoRepository implements repository.GitRepoRepository
func (*GitRepoRepository) CreateGitRepo ¶
CreateGitRepo creates a new repo client and appends it to the in-memory list
func (*GitRepoRepository) DeleteGitRepo ¶
func (repo *GitRepoRepository) DeleteGitRepo( gr *models.GitRepo, ) error
DeleteGitRepo removes a repoistry from the array by setting it to nil
func (*GitRepoRepository) ListGitReposByProjectID ¶
func (repo *GitRepoRepository) ListGitReposByProjectID(projectID uint) ([]*models.GitRepo, error)
ListGitReposByProjectID returns a list of repo clients that match a project id
func (*GitRepoRepository) ReadGitRepo ¶
func (repo *GitRepoRepository) ReadGitRepo(id uint) (*models.GitRepo, error)
ReadGitRepo returns a repo client by 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)
func (*GithubAppInstallationRepository) DeleteGithubAppInstallationByAccountID ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) DeleteGithubAppInstallationByAccountID(accountID int64) error
func (*GithubAppInstallationRepository) ReadGithubAppInstallation ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) ReadGithubAppInstallation(id uint) (*ints.GithubAppInstallation, error)
func (*GithubAppInstallationRepository) ReadGithubAppInstallationByAccountID ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByAccountID(accountID int64) (*ints.GithubAppInstallation, error)
func (*GithubAppInstallationRepository) ReadGithubAppInstallationByAccountIDs ¶ added in v0.5.0
func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByAccountIDs(accountIDs []int64) ([]*ints.GithubAppInstallation, error)
type GithubAppOAuthIntegrationRepository ¶ added in v0.5.0
type GithubAppOAuthIntegrationRepository struct {
// contains filtered or unexported fields
}
func (*GithubAppOAuthIntegrationRepository) CreateGithubAppOAuthIntegration ¶ added in v0.5.0
func (repo *GithubAppOAuthIntegrationRepository) CreateGithubAppOAuthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
func (*GithubAppOAuthIntegrationRepository) ReadGithubAppOauthIntegration ¶ added in v0.5.0
func (repo *GithubAppOAuthIntegrationRepository) ReadGithubAppOauthIntegration(id uint) (*ints.GithubAppOAuthIntegration, error)
func (*GithubAppOAuthIntegrationRepository) UpdateGithubAppOauthIntegration ¶ added in v0.6.0
func (repo *GithubAppOAuthIntegrationRepository) UpdateGithubAppOauthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
type HelmRepoRepository ¶
type HelmRepoRepository struct {
// contains filtered or unexported fields
}
HelmRepoRepository implements repository.HelmRepoRepository
func (*HelmRepoRepository) CreateHelmRepo ¶
CreateHelmRepo creates a new repoistry
func (*HelmRepoRepository) DeleteHelmRepo ¶
func (repo *HelmRepoRepository) DeleteHelmRepo( hr *models.HelmRepo, ) error
DeleteHelmRepo removes a repoistry from the array by setting it to nil
func (*HelmRepoRepository) ListHelmReposByProjectID ¶
func (repo *HelmRepoRepository) ListHelmReposByProjectID( projectID uint, ) ([]*models.HelmRepo, error)
ListHelmReposByProjectID finds all repoistries for a given project id
func (*HelmRepoRepository) ReadHelmRepo ¶
func (repo *HelmRepoRepository) ReadHelmRepo( id uint, ) (*models.HelmRepo, error)
ReadHelmRepo finds a repoistry by 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 token cache for a repoistry
type InfraRepository ¶
type InfraRepository struct {
// contains filtered or unexported fields
}
InfraRepository implements repository.InfraRepository
func (*InfraRepository) CreateInfra ¶
CreateInfra creates a new aws infra
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 finds a aws infra by 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 implements repository.KubeIntegrationRepository
func (*KubeIntegrationRepository) CreateKubeIntegration ¶
func (repo *KubeIntegrationRepository) CreateKubeIntegration( am *ints.KubeIntegration, ) (*ints.KubeIntegration, error)
CreateKubeIntegration creates a new kube auth mechanism
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 implements repository.OAuthIntegrationRepository
func (*OAuthIntegrationRepository) CreateOAuthIntegration ¶
func (repo *OAuthIntegrationRepository) CreateOAuthIntegration( am *ints.OAuthIntegration, ) (*ints.OAuthIntegration, error)
CreateOAuthIntegration creates a new o auth mechanism
func (*OAuthIntegrationRepository) ListOAuthIntegrationsByProjectID ¶
func (repo *OAuthIntegrationRepository) ListOAuthIntegrationsByProjectID( projectID uint, ) ([]*ints.OAuthIntegration, error)
ListOAuthIntegrationsByProjectID finds all o auth mechanisms for a given project id
func (*OAuthIntegrationRepository) ReadOAuthIntegration ¶
func (repo *OAuthIntegrationRepository) ReadOAuthIntegration( id uint, ) (*ints.OAuthIntegration, error)
ReadOAuthIntegration finds a o auth mechanism by id
func (*OAuthIntegrationRepository) UpdateOAuthIntegration ¶
func (repo *OAuthIntegrationRepository) UpdateOAuthIntegration( am *ints.OAuthIntegration, ) (*ints.OAuthIntegration, error)
UpdateOAuthIntegration updates an oauth integration in the DB
type OIDCIntegrationRepository ¶
type OIDCIntegrationRepository struct {
// contains filtered or unexported fields
}
OIDCIntegrationRepository implements repository.OIDCIntegrationRepository
func (*OIDCIntegrationRepository) CreateOIDCIntegration ¶
func (repo *OIDCIntegrationRepository) CreateOIDCIntegration( am *ints.OIDCIntegration, ) (*ints.OIDCIntegration, error)
CreateOIDCIntegration creates a new oidc auth mechanism
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 invite
func (*PWResetTokenRepository) ReadPWResetToken ¶
func (repo *PWResetTokenRepository) ReadPWResetToken(id uint) (*models.PWResetToken, error)
ReadPWResetToken gets an auth code object specified by the unique code
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 will return errors on queries if canQuery is false and only stores a small set of projects in-memory that are indexed by their array index + 1
func (*ProjectRepository) CreateProject ¶
CreateProject appends a new project to the in-memory projects array
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 removes a project
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)
ListProjectRoles returns a list of roles for the project
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)
ReadProjectRole gets a role specified by a project ID and user ID
func (*ProjectRepository) UpdateProjectRole ¶ added in v0.5.0
func (repo *ProjectRepository) UpdateProjectRole(projID uint, role *models.Role) (*models.Role, error)
CreateProjectRole appends a role to the existing array of roles
type RegistryRepository ¶
type RegistryRepository struct {
// contains filtered or unexported fields
}
RegistryRepository implements repository.RegistryRepository
func (*RegistryRepository) CreateRegistry ¶
CreateRegistry creates a new registry
func (*RegistryRepository) DeleteRegistry ¶
func (repo *RegistryRepository) DeleteRegistry( reg *models.Registry, ) error
DeleteRegistry removes a registry from the array by setting it to nil
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 finds a registry by 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 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 UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository will return errors on queries if canQuery is false and only stores a small set of users in-memory that are indexed by their array index + 1
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 array memory
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)
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 id field
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 github id field
func (*UserRepository) UpdateUser ¶
UpdateUser modifies an existing User in the database