gorm

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubAppInstallationRepository

func NewGithubAppInstallationRepository(db *gorm.DB) repository.GithubAppInstallationRepository

NewGithubAppInstallationRepository returns a DefaultGithubAppInstallationRepository which uses gorm.DB for querying the database

func NewGithubAppOAuthRepository

func NewGithubAppOAuthRepository(db *gorm.DB, key *[32]byte) repository.GithubAppOAuthRepository

NewGithubAppOAuthRepository returns a DefaultGithubAppOAuthRepository which uses gorm.DB for querying the database

func NewGithubPullRequestRepository

func NewGithubPullRequestRepository(db *gorm.DB) repository.GithubPullRequestRepository

NewGithubPullRequestRepository returns a DefaultGithubPullRequestRepository which uses gorm.DB for querying the database

func NewGithubWebhookRepository

func NewGithubWebhookRepository(db *gorm.DB, key *[32]byte) repository.GithubWebhookRepository

NewGithubWebhookRepository returns a DefaultGithubWebhookRepository which uses gorm.DB for querying the database

func NewModuleEnvVarsRepository

func NewModuleEnvVarsRepository(db *gorm.DB, key *[32]byte) repository.ModuleEnvVarsRepository

func NewModuleMonitorRepository

func NewModuleMonitorRepository(db *gorm.DB) repository.ModuleMonitorRepository

func NewModuleRepository

func NewModuleRepository(db *gorm.DB) repository.ModuleRepository

NewModuleRepository returns a DefaultModuleRepository which uses gorm.DB for querying the database

func NewModuleRunQueueRepository

func NewModuleRunQueueRepository(db *gorm.DB) repository.ModuleRunQueueRepository

NewModuleRunQueueRepository returns a DefaultModuleRunQueueRepository which uses gorm.DB for querying the database

func NewModuleValuesRepository

func NewModuleValuesRepository(db *gorm.DB, key *[32]byte) repository.ModuleValuesRepository

func NewNotificationRepository

func NewNotificationRepository(db *gorm.DB) repository.NotificationRepository

NewNotificationRepository returns a DefaultNotificationRepository which uses gorm.DB for querying the database

func NewOrgRepository

func NewOrgRepository(db *gorm.DB) repository.OrgRepository

NewOrgRepository returns a DefaultOrgRepository which uses gorm.DB for querying the database

func NewPasswordResetTokenRepository

func NewPasswordResetTokenRepository(db *gorm.DB) repository.PasswordResetTokenRepository

NewPasswordResetTokenRepository returns a PasswordResetTokenRepository which uses gorm.DB for querying the database

func NewPersonalAccessTokenRepository

func NewPersonalAccessTokenRepository(db *gorm.DB, key *[32]byte) repository.PersonalAccessTokenRepository

NewPersonalAccessTokenRepository returns a DefaultPersonalAccessTokenRepository 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 persists users in memory and accepts a parameter that can trigger read/write errors

func NewTeamRepository

func NewTeamRepository(db *gorm.DB) repository.TeamRepository

NewTeamRepository returns a TeamRepository which uses gorm.DB for querying the database

func NewUserRepository

func NewUserRepository(db *gorm.DB) repository.UserRepository

NewUserRepository returns a DefaultUserRepository which uses gorm.DB for querying the database

func NewUserSessionRepository

func NewUserSessionRepository(db *gorm.DB) repository.UserSessionRepository

func NewVerifyEmailTokenRepository

func NewVerifyEmailTokenRepository(db *gorm.DB) repository.VerifyEmailTokenRepository

NewVerifyEmailTokenRepository returns a VerifyEmailTokenRepository which uses gorm.DB for querying the database

func NewWorkerTokenRepository

func NewWorkerTokenRepository(db *gorm.DB) repository.WorkerTokenRepository

NewWorkerTokenRepository returns a DefaultWorkerTokenRepository which uses gorm.DB for querying the database

Types

type GithubAppInstallationRepository

type GithubAppInstallationRepository struct {
	// contains filtered or unexported fields
}

GithubAppInstallationRepository uses gorm.DB for querying the database

func (*GithubAppInstallationRepository) CreateGithubAppInstallation

func (*GithubAppInstallationRepository) DeleteGithubAppInstallation

func (*GithubAppInstallationRepository) ListGithubAppInstallationsByUserID

func (*GithubAppInstallationRepository) ReadGithubAppInstallationByID

func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByID(gaiID string) (*models.GithubAppInstallation, repository.RepositoryError)

func (*GithubAppInstallationRepository) ReadGithubAppInstallationByInstallationAndAccountID

func (repo *GithubAppInstallationRepository) ReadGithubAppInstallationByInstallationAndAccountID(installationID, accountID int64) (*models.GithubAppInstallation, repository.RepositoryError)

func (*GithubAppInstallationRepository) UpdateGithubAppInstallation

type GithubAppOAuthRepository

type GithubAppOAuthRepository struct {
	// contains filtered or unexported fields
}

GithubAppOAuthRepository uses gorm.DB for querying the database

func (*GithubAppOAuthRepository) CreateGithubAppOAuth

func (*GithubAppOAuthRepository) ReadGithubAppOAuthByGithubUserID

func (repo *GithubAppOAuthRepository) ReadGithubAppOAuthByGithubUserID(githubUserID int64) (*models.GithubAppOAuth, repository.RepositoryError)

func (*GithubAppOAuthRepository) ReadGithubAppOAuthByUserID

func (repo *GithubAppOAuthRepository) ReadGithubAppOAuthByUserID(userID string) (*models.GithubAppOAuth, repository.RepositoryError)

func (*GithubAppOAuthRepository) UpdateGithubAppOAuth

type GithubPullRequestRepository

type GithubPullRequestRepository struct {
	// contains filtered or unexported fields
}

GithubPullRequestRepository uses gorm.DB for querying the database

func (*GithubPullRequestRepository) CreateGithubPullRequest

func (*GithubPullRequestRepository) CreateGithubPullRequestComment

func (*GithubPullRequestRepository) DeleteGithubPullRequest

func (*GithubPullRequestRepository) DeleteGithubPullRequestComment

func (*GithubPullRequestRepository) ListGithubPullRequestsByHeadBranch

func (repo *GithubPullRequestRepository) ListGithubPullRequestsByHeadBranch(teamID, repoOwner, repoName, branchName string) ([]*models.GithubPullRequest, repository.RepositoryError)

func (*GithubPullRequestRepository) ReadGithubPullRequestByGithubID

func (repo *GithubPullRequestRepository) ReadGithubPullRequestByGithubID(teamID string, ghID int64) (*models.GithubPullRequest, repository.RepositoryError)

func (*GithubPullRequestRepository) ReadGithubPullRequestByID

func (repo *GithubPullRequestRepository) ReadGithubPullRequestByID(teamID, id string) (*models.GithubPullRequest, repository.RepositoryError)

func (*GithubPullRequestRepository) ReadGithubPullRequestCommentByGithubID

func (repo *GithubPullRequestRepository) ReadGithubPullRequestCommentByGithubID(moduleID string, ghID int64) (*models.GithubPullRequestComment, repository.RepositoryError)

func (*GithubPullRequestRepository) ReadGithubPullRequestCommentByID

func (repo *GithubPullRequestRepository) ReadGithubPullRequestCommentByID(moduleID, id string) (*models.GithubPullRequestComment, repository.RepositoryError)

func (*GithubPullRequestRepository) UpdateGithubPullRequest

func (*GithubPullRequestRepository) UpdateGithubPullRequestComment

type GithubWebhookRepository

type GithubWebhookRepository struct {
	// contains filtered or unexported fields
}

GithubWebhookRepository uses gorm.DB for querying the database

func (*GithubWebhookRepository) AppendGithubAppInstallation

func (*GithubWebhookRepository) CreateGithubWebhook

func (*GithubWebhookRepository) DeleteGithubWebhook

func (*GithubWebhookRepository) ReadGithubWebhookByID

func (repo *GithubWebhookRepository) ReadGithubWebhookByID(teamID, id string) (*models.GithubWebhook, repository.RepositoryError)

func (*GithubWebhookRepository) ReadGithubWebhookByTeamID

func (repo *GithubWebhookRepository) ReadGithubWebhookByTeamID(teamID, repoOwner, repoName string) (*models.GithubWebhook, repository.RepositoryError)

func (*GithubWebhookRepository) RemoveGithubAppInstallation

func (*GithubWebhookRepository) UpdateGithubWebhook

type GormRepository

type GormRepository struct {
	// contains filtered or unexported fields
}

func (*GormRepository) GithubAppInstallation

func (t *GormRepository) GithubAppInstallation() repository.GithubAppInstallationRepository

func (*GormRepository) GithubAppOAuth

func (*GormRepository) GithubPullRequest

func (t *GormRepository) GithubPullRequest() repository.GithubPullRequestRepository

func (*GormRepository) GithubWebhook

func (*GormRepository) Module

func (*GormRepository) ModuleEnvVars

func (*GormRepository) ModuleMonitor

func (*GormRepository) ModuleRunQueue

func (*GormRepository) ModuleValues

func (*GormRepository) Notification

func (*GormRepository) Org

func (*GormRepository) PasswordResetToken

func (t *GormRepository) PasswordResetToken() repository.PasswordResetTokenRepository

func (*GormRepository) PersonalAccessToken

func (t *GormRepository) PersonalAccessToken() repository.PersonalAccessTokenRepository

func (*GormRepository) Team

func (*GormRepository) User

func (*GormRepository) UserSession

func (*GormRepository) VerifyEmailToken

func (*GormRepository) WorkerToken

type ModuleEnvVarsRepository

type ModuleEnvVarsRepository struct {
	// contains filtered or unexported fields
}

ModuleEnvVarsRepository uses gorm.DB for querying the database

func (*ModuleEnvVarsRepository) CreateModuleEnvVarsVersion

func (*ModuleEnvVarsRepository) DeleteModuleEnvVarsVersion

func (*ModuleEnvVarsRepository) ListModuleValueVersionsByModuleID

func (repo *ModuleEnvVarsRepository) ListModuleValueVersionsByModuleID(
	moduleID string,
	opts ...repository.QueryOption,
) ([]*models.ModuleEnvVarsVersion, *repository.PaginatedResult, repository.RepositoryError)

func (*ModuleEnvVarsRepository) ReadModuleEnvVarsVersionByID

func (repo *ModuleEnvVarsRepository) ReadModuleEnvVarsVersionByID(moduleID, moduleEnvVarsVersionID string) (*models.ModuleEnvVarsVersion, repository.RepositoryError)

type ModuleMonitorRepository

type ModuleMonitorRepository struct {
	// contains filtered or unexported fields
}

func (*ModuleMonitorRepository) CreateModuleMonitor

func (*ModuleMonitorRepository) CreateModuleMonitorResult

func (*ModuleMonitorRepository) DeleteModuleMonitor

func (*ModuleMonitorRepository) DeleteModuleMonitorResult

func (*ModuleMonitorRepository) ListModuleMonitorResults

func (*ModuleMonitorRepository) ListModuleMonitorsByTeamID

func (*ModuleMonitorRepository) ReadModuleMonitorByID

func (repo *ModuleMonitorRepository) ReadModuleMonitorByID(teamID, moduleMonitorID string) (*models.ModuleMonitor, repository.RepositoryError)

func (*ModuleMonitorRepository) ReadModuleMonitorResultByID

func (repo *ModuleMonitorRepository) ReadModuleMonitorResultByID(moduleID, monitorID, resultID string) (*models.ModuleMonitorResult, repository.RepositoryError)

func (*ModuleMonitorRepository) ReplaceModuleMonitorModules

func (repo *ModuleMonitorRepository) ReplaceModuleMonitorModules(monitor *models.ModuleMonitor, modules []*models.Module) (*models.ModuleMonitor, repository.RepositoryError)

func (*ModuleMonitorRepository) UpdateModuleMonitor

type ModuleRepository

type ModuleRepository struct {
	// contains filtered or unexported fields
}

ModuleRepository uses gorm.DB for querying the database

func (*ModuleRepository) AppendModuleRunMonitorResult

func (repo *ModuleRepository) AppendModuleRunMonitorResult(run *models.ModuleRun, result *models.ModuleMonitorResult) (*models.ModuleRun, repository.RepositoryError)

func (*ModuleRepository) AppendModuleRunMonitors

func (repo *ModuleRepository) AppendModuleRunMonitors(run *models.ModuleRun, monitors []*models.ModuleMonitor) (*models.ModuleRun, repository.RepositoryError)

func (*ModuleRepository) CreateModule

func (repo *ModuleRepository) CreateModule(mod *models.Module) (*models.Module, repository.RepositoryError)

CreateModule adds a new Module row to the Modules table in the database

func (*ModuleRepository) CreateModuleRun

func (*ModuleRepository) CreateModuleRunToken

func (*ModuleRepository) DeleteModule

func (repo *ModuleRepository) DeleteModule(mod *models.Module) (*models.Module, repository.RepositoryError)

DeleteModule deletes a single mod by its unique id

func (*ModuleRepository) DeleteModuleRun

func (*ModuleRepository) DeleteModuleRunToken

func (*ModuleRepository) ListCompletedModuleRunsByLogLocation

func (repo *ModuleRepository) ListCompletedModuleRunsByLogLocation(location string, opts ...repository.QueryOption) ([]*models.ModuleRun, *repository.PaginatedResult, repository.RepositoryError)

func (*ModuleRepository) ListModuleRunsByVCSSHA

func (repo *ModuleRepository) ListModuleRunsByVCSSHA(moduleID, githubSHA string, kind *models.ModuleRunKind) ([]*models.ModuleRun, repository.RepositoryError)

func (*ModuleRepository) ListModulesByIDs

func (repo *ModuleRepository) ListModulesByIDs(teamID string, ids []string, opts ...repository.QueryOption) ([]*models.Module, *repository.PaginatedResult, repository.RepositoryError)

func (*ModuleRepository) ListModulesByTeamID

func (*ModuleRepository) ListRunsByModuleID

func (*ModuleRepository) ListVCSRepositoryModules

func (repo *ModuleRepository) ListVCSRepositoryModules(teamID, repoOwner, repoName string) ([]*models.Module, repository.RepositoryError)

func (*ModuleRepository) ReadModuleByID

func (repo *ModuleRepository) ReadModuleByID(teamID, moduleID string) (*models.Module, repository.RepositoryError)

ReadModuleByID finds a single mod by its unique id

func (*ModuleRepository) ReadModuleRunByID

func (repo *ModuleRepository) ReadModuleRunByID(moduleID, moduleRunID string) (*models.ModuleRun, repository.RepositoryError)

func (*ModuleRepository) ReadModuleRunToken

func (repo *ModuleRepository) ReadModuleRunToken(userID, runID, tokenID string) (*models.ModuleRunToken, repository.RepositoryError)

func (*ModuleRepository) ReadModuleRunWithStateLock

func (repo *ModuleRepository) ReadModuleRunWithStateLock(moduleID string) (*models.ModuleRun, repository.RepositoryError)

func (*ModuleRepository) UpdateModule

func (repo *ModuleRepository) UpdateModule(mod *models.Module) (*models.Module, repository.RepositoryError)

UpdateModule updates an module in the database

func (*ModuleRepository) UpdateModuleDeploymentConfig

UpdateModuleDeploymentConfig updates a module's deployment config in the database

func (*ModuleRepository) UpdateModuleRun

func (*ModuleRepository) UpdateModuleRunToken

type ModuleRunQueueRepository

type ModuleRunQueueRepository struct {
	// contains filtered or unexported fields
}

ModuleRunQueueRepository uses gorm.DB for querying the database

func (*ModuleRunQueueRepository) CreateModuleRunQueue

func (*ModuleRunQueueRepository) CreateModuleRunQueueItem

func (*ModuleRunQueueRepository) DeleteModuleRunQueueItem

func (*ModuleRunQueueRepository) ListModulesWithQueueItems

func (*ModuleRunQueueRepository) ReadModuleRunQueueByID

func (repo *ModuleRunQueueRepository) ReadModuleRunQueueByID(moduleID, moduleRunQueueID, lockID string) (*models.ModuleRunQueue, repository.RepositoryError)

func (*ModuleRunQueueRepository) ReadModuleRunQueueItemByModuleRunID

func (repo *ModuleRunQueueRepository) ReadModuleRunQueueItemByModuleRunID(moduleRunID string) (*models.ModuleRunQueueItem, repository.RepositoryError)

type ModuleValuesRepository

type ModuleValuesRepository struct {
	// contains filtered or unexported fields
}

ModuleValuesRepository uses gorm.DB for querying the database

func (*ModuleValuesRepository) CreateModuleValues

func (*ModuleValuesRepository) CreateModuleValuesVersion

func (*ModuleValuesRepository) DeleteModuleValues

func (*ModuleValuesRepository) DeleteModuleValuesVersion

func (*ModuleValuesRepository) ListModuleValueVersionsByModuleID

func (repo *ModuleValuesRepository) ListModuleValueVersionsByModuleID(
	moduleID string,
	opts ...repository.QueryOption,
) ([]*models.ModuleValuesVersion, *repository.PaginatedResult, repository.RepositoryError)

func (*ModuleValuesRepository) ReadModuleValuesByID

func (repo *ModuleValuesRepository) ReadModuleValuesByID(moduleValuesID string) (*models.ModuleValues, repository.RepositoryError)

func (*ModuleValuesRepository) ReadModuleValuesByVersionID

func (repo *ModuleValuesRepository) ReadModuleValuesByVersionID(moduleValuesVersionID string) (*models.ModuleValues, repository.RepositoryError)

func (*ModuleValuesRepository) ReadModuleValuesVersionByID

func (repo *ModuleValuesRepository) ReadModuleValuesVersionByID(moduleID, moduleValuesVersionID string) (*models.ModuleValuesVersion, repository.RepositoryError)

ReadPersonalAccessToken reads a PAT by both the user ID and the token ID

type NotificationRepository

type NotificationRepository struct {
	// contains filtered or unexported fields
}

NotificationRepository uses gorm.DB for querying the database

func (*NotificationRepository) AppendModuleRun

func (*NotificationRepository) AppendModuleRunMonitorResult

func (repo *NotificationRepository) AppendModuleRunMonitorResult(notif *models.Notification, result *models.ModuleMonitorResult) (*models.Notification, repository.RepositoryError)

func (*NotificationRepository) CreateNotification

func (*NotificationRepository) CreateNotificationInbox

func (*NotificationRepository) DeleteNotification

func (*NotificationRepository) ListNotifications

func (*NotificationRepository) ListNotificationsByTeamIDs

func (*NotificationRepository) ReadNotificationByID

func (repo *NotificationRepository) ReadNotificationByID(teamID, id string) (*models.Notification, repository.RepositoryError)

func (*NotificationRepository) ReadNotificationByNotificationID

func (repo *NotificationRepository) ReadNotificationByNotificationID(teamID, notificationID string, opts *repository.ReadNotificationOpts) (*models.Notification, repository.RepositoryError)

func (*NotificationRepository) ReadNotificationInboxByTeamID

func (repo *NotificationRepository) ReadNotificationInboxByTeamID(teamID string) (*models.NotificationInbox, repository.RepositoryError)

func (*NotificationRepository) UpdateNotification

func (*NotificationRepository) UpdateNotificationInbox

type OrgRepository

type OrgRepository struct {
	// contains filtered or unexported fields
}

OrgRepository uses gorm.DB for querying the database

func (*OrgRepository) AppendOrgPolicyToOrgMember

func (repo *OrgRepository) AppendOrgPolicyToOrgMember(orgMember *models.OrganizationMember, orgPolicy *models.OrganizationPolicy) (*models.OrganizationMember, repository.RepositoryError)

func (*OrgRepository) CreateOrg

CreateOrg adds a new Org row to the Orgs table in the database

func (*OrgRepository) CreateOrgMember

func (*OrgRepository) CreateOrgPolicy

func (*OrgRepository) DeleteOrg

DeleteOrg deletes a single org by its unique id

func (*OrgRepository) DeleteOrgMember

func (*OrgRepository) ListOrgMembersByOrgID

func (repo *OrgRepository) ListOrgMembersByOrgID(orgID string, isSARunner bool, opts ...repository.QueryOption) ([]*models.OrganizationMember, *repository.PaginatedResult, repository.RepositoryError)

func (*OrgRepository) ListOrgPoliciesByOrgID

func (*OrgRepository) ListOrgsByUserID

func (*OrgRepository) ReadOrgByID

ReadOrgByID finds a single org by its unique id

func (*OrgRepository) ReadOrgInviteByID

func (repo *OrgRepository) ReadOrgInviteByID(inviteID string) (*models.OrganizationInviteLink, repository.RepositoryError)

func (*OrgRepository) ReadOrgMemberByID

func (repo *OrgRepository) ReadOrgMemberByID(orgID, memberID string, isSARunner bool) (*models.OrganizationMember, repository.RepositoryError)

func (*OrgRepository) ReadOrgMemberByUserID

func (repo *OrgRepository) ReadOrgMemberByUserID(orgID, userID string, isSARunner bool) (*models.OrganizationMember, repository.RepositoryError)

func (*OrgRepository) ReadOrgMemberByUserOrInviteeEmail

func (repo *OrgRepository) ReadOrgMemberByUserOrInviteeEmail(orgID, email string, isSARunner bool) (*models.OrganizationMember, repository.RepositoryError)

func (*OrgRepository) ReadPolicyByID

func (repo *OrgRepository) ReadPolicyByID(orgID, policyID string) (*models.OrganizationPolicy, repository.RepositoryError)

func (*OrgRepository) ReadPresetPolicyByName

func (repo *OrgRepository) ReadPresetPolicyByName(orgID string, presetName models.PresetPolicyName) (*models.OrganizationPolicy, repository.RepositoryError)

func (*OrgRepository) RemoveOrgPolicyFromOrgMember

func (repo *OrgRepository) RemoveOrgPolicyFromOrgMember(orgMember *models.OrganizationMember, orgPolicy *models.OrganizationPolicy) (*models.OrganizationMember, repository.RepositoryError)

func (*OrgRepository) ReplaceOrgPoliciesForOrgMember

func (repo *OrgRepository) ReplaceOrgPoliciesForOrgMember(orgMember *models.OrganizationMember, policies []*models.OrganizationPolicy) (*models.OrganizationMember, repository.RepositoryError)

func (*OrgRepository) UpdateOrg

UpdateOrg updates an organization in the database

func (*OrgRepository) UpdateOrgInvite

func (*OrgRepository) UpdateOrgMember

type PasswordResetTokenRepository

type PasswordResetTokenRepository struct {
	// contains filtered or unexported fields
}

PasswordResetTokenRepository uses gorm.DB for querying the database

func (*PasswordResetTokenRepository) CreatePasswordResetToken

CreatePasswordResetToken creates a new PRT in the database

func (*PasswordResetTokenRepository) ReadPasswordResetTokenByEmailAndTokenID

func (repo *PasswordResetTokenRepository) ReadPasswordResetTokenByEmailAndTokenID(email, tokID string) (*models.PasswordResetToken, repository.RepositoryError)

func (*PasswordResetTokenRepository) UpdatePasswordResetToken

type PersonalAccessTokenRepository

type PersonalAccessTokenRepository struct {
	// contains filtered or unexported fields
}

PersonalAccessTokenRepository uses gorm.DB for querying the database

func (*PersonalAccessTokenRepository) CreatePersonalAccessToken

CreateUser adds a new User row to the Users table in the database

func (*PersonalAccessTokenRepository) DeletePersonalAccessToken

func (*PersonalAccessTokenRepository) ListPersonalAccessTokensByUserID

func (*PersonalAccessTokenRepository) ReadPersonalAccessToken

func (repo *PersonalAccessTokenRepository) ReadPersonalAccessToken(userID, tokenID string) (*models.PersonalAccessToken, repository.RepositoryError)

ReadPersonalAccessToken reads a PAT by both the user ID and the token ID

func (*PersonalAccessTokenRepository) ReadPersonalAccessTokenByDisplayName

func (repo *PersonalAccessTokenRepository) ReadPersonalAccessTokenByDisplayName(userID, displayName string) (
	*models.PersonalAccessToken,
	repository.RepositoryError,
)

func (*PersonalAccessTokenRepository) UpdatePersonalAccessToken

type TeamRepository

type TeamRepository struct {
	// contains filtered or unexported fields
}

TeamRepository uses gorm.DB for querying the database

func (*TeamRepository) AppendTeamPolicyToTeamMember

func (repo *TeamRepository) AppendTeamPolicyToTeamMember(teamMember *models.TeamMember, teamPolicy *models.TeamPolicy) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) CreateTeam

func (repo *TeamRepository) CreateTeam(team *models.Team) (*models.Team, repository.RepositoryError)

CreateOrg adds a new Org row to the Orgs table in the database

func (*TeamRepository) CreateTeamMember

func (repo *TeamRepository) CreateTeamMember(team *models.Team, teamMember *models.TeamMember) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) CreateTeamPolicy

func (repo *TeamRepository) CreateTeamPolicy(team *models.Team, teamPolicy *models.TeamPolicy) (*models.TeamPolicy, repository.RepositoryError)

func (*TeamRepository) DeleteTeam

func (repo *TeamRepository) DeleteTeam(team *models.Team) (*models.Team, repository.RepositoryError)

DeleteTeam soft-deletes a single team by its unique id

func (*TeamRepository) DeleteTeamMember

func (repo *TeamRepository) DeleteTeamMember(teamMember *models.TeamMember) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) ListTeamMembersByTeamID

func (repo *TeamRepository) ListTeamMembersByTeamID(teamID string, isSARunner bool, opts ...repository.QueryOption) ([]*models.TeamMember, *repository.PaginatedResult, repository.RepositoryError)

func (*TeamRepository) ListTeamPoliciesByTeamID

func (repo *TeamRepository) ListTeamPoliciesByTeamID(orgID string, opts ...repository.QueryOption) ([]*models.TeamPolicy, *repository.PaginatedResult, repository.RepositoryError)

func (*TeamRepository) ListTeamsByOrgID

func (*TeamRepository) ListTeamsByUserID

func (repo *TeamRepository) ListTeamsByUserID(userID string, orgID string, opts ...repository.QueryOption) ([]*models.Team, *repository.PaginatedResult, repository.RepositoryError)

func (*TeamRepository) ReadPolicyByID

func (repo *TeamRepository) ReadPolicyByID(orgID, policyID string) (*models.TeamPolicy, repository.RepositoryError)

func (*TeamRepository) ReadPresetTeamPolicyByName

func (repo *TeamRepository) ReadPresetTeamPolicyByName(orgID string, presetName models.PresetTeamPolicyName) (*models.TeamPolicy, repository.RepositoryError)

func (*TeamRepository) ReadTeamByID

func (repo *TeamRepository) ReadTeamByID(id string) (*models.Team, repository.RepositoryError)

ReadTeamByID finds a single team by its unique id

func (*TeamRepository) ReadTeamMemberByID

func (repo *TeamRepository) ReadTeamMemberByID(teamID, memberID string, isSARunner bool) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) ReadTeamMemberByOrgMemberID

func (repo *TeamRepository) ReadTeamMemberByOrgMemberID(teamID, orgMemberID string, isSARunner bool) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) RemoveTeamPolicyFromTeamMember

func (repo *TeamRepository) RemoveTeamPolicyFromTeamMember(teamMember *models.TeamMember, teamPolicy *models.TeamPolicy) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) ReplaceTeamPoliciesForTeamMember

func (repo *TeamRepository) ReplaceTeamPoliciesForTeamMember(teamMember *models.TeamMember, policies []*models.TeamPolicy) (*models.TeamMember, repository.RepositoryError)

func (*TeamRepository) UpdateTeam

func (repo *TeamRepository) UpdateTeam(team *models.Team) (*models.Team, repository.RepositoryError)

UpdateTeam updates a team in the database

func (*TeamRepository) UpdateTeamMember

func (repo *TeamRepository) UpdateTeamMember(teamMember *models.TeamMember) (*models.TeamMember, repository.RepositoryError)

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

UserRepository uses gorm.DB for querying the database

func (*UserRepository) CreateUser

func (repo *UserRepository) CreateUser(user *models.User) (*models.User, repository.RepositoryError)

CreateUser adds a new User row to the Users table in the database

func (*UserRepository) DeleteUser

func (repo *UserRepository) DeleteUser(user *models.User) (*models.User, repository.RepositoryError)

DeleteUser deletes a single user using their unique id

func (*UserRepository) ReadUserByEmail

func (repo *UserRepository) ReadUserByEmail(email string) (*models.User, repository.RepositoryError)

ReadUserByEmail finds a single user based on their unique email

func (*UserRepository) ReadUserByID

func (repo *UserRepository) ReadUserByID(id string) (*models.User, repository.RepositoryError)

ReadUserByID finds a single user based on their unique id

func (*UserRepository) UpdateUser

func (repo *UserRepository) UpdateUser(user *models.User) (*models.User, repository.RepositoryError)

UpdateUser updates a user in the database

type UserSessionRepository

type UserSessionRepository struct {
	// contains filtered or unexported fields
}

func (*UserSessionRepository) CreateUserSession

func (*UserSessionRepository) DeleteUserSession

func (*UserSessionRepository) ReadUserSessionByKey

func (s *UserSessionRepository) ReadUserSessionByKey(sessionKey string) (*models.UserSession, repository.RepositoryError)

func (*UserSessionRepository) UpdateUserSession

type VerifyEmailTokenRepository

type VerifyEmailTokenRepository struct {
	// contains filtered or unexported fields
}

VerifyEmailTokenRepository uses gorm.DB for querying the database

func (*VerifyEmailTokenRepository) CreateVerifyEmailToken

CreateVerifyEmailToken creates a new PRT in the database

func (*VerifyEmailTokenRepository) ReadVerifyEmailTokenByEmailAndTokenID

func (repo *VerifyEmailTokenRepository) ReadVerifyEmailTokenByEmailAndTokenID(email, tokID string) (*models.VerifyEmailToken, repository.RepositoryError)

func (*VerifyEmailTokenRepository) UpdateVerifyEmailToken

type WorkerTokenRepository

type WorkerTokenRepository struct {
	// contains filtered or unexported fields
}

WorkerTokenRepository uses gorm.DB for querying the database

func (*WorkerTokenRepository) CreateWorkerToken

func (*WorkerTokenRepository) DeleteWorkerToken

func (*WorkerTokenRepository) ReadWorkerToken

func (repo *WorkerTokenRepository) ReadWorkerToken(teamID, tokenID string) (*models.WorkerToken, repository.RepositoryError)

func (*WorkerTokenRepository) UpdateWorkerToken

Directories

Path Synopsis
go:build test
go:build test

Jump to

Keyboard shortcuts

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