Documentation ¶
Index ¶
- type Store
- func (s *Store) Activate(ctx context.Context, r *ent.Repo) (*ent.Repo, error)
- func (s *Store) CheckNotificationRecordOfEvent(ctx context.Context, e *ent.Event) bool
- func (s *Store) CountActiveRepos(ctx context.Context) (int, error)
- func (s *Store) CountDeployments(ctx context.Context) (int, error)
- func (s *Store) CountRepos(ctx context.Context) (int, error)
- func (s *Store) CountUsers(ctx context.Context) (int, error)
- func (s *Store) CreateChatUser(ctx context.Context, cu *ent.ChatUser) (*ent.ChatUser, error)
- func (s *Store) CreateDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
- func (s *Store) CreateDeploymentStatistics(ctx context.Context, ds *ent.DeploymentStatistics) (*ent.DeploymentStatistics, error)
- func (s *Store) CreateEntDeploymentStatus(ctx context.Context, ds *ent.DeploymentStatus) (*ent.DeploymentStatus, error)
- func (s *Store) CreateEvent(ctx context.Context, e *ent.Event) (*ent.Event, error)
- func (s *Store) CreateLock(ctx context.Context, l *ent.Lock) (*ent.Lock, error)
- func (s *Store) CreatePerm(ctx context.Context, p *ent.Perm) (*ent.Perm, error)
- func (s *Store) CreateReview(ctx context.Context, rv *ent.Review) (*ent.Review, error)
- func (s *Store) CreateUser(ctx context.Context, u *ent.User) (*ent.User, error)
- func (s *Store) Deactivate(ctx context.Context, r *ent.Repo) (*ent.Repo, error)
- func (s *Store) DeleteChatUser(ctx context.Context, cu *ent.ChatUser) error
- func (s *Store) DeleteLock(ctx context.Context, l *ent.Lock) error
- func (s *Store) DeletePerm(ctx context.Context, p *ent.Perm) error
- func (s *Store) DeletePermsOfUserLessThanSyncedAt(ctx context.Context, u *ent.User, t time.Time) (int, error)
- func (s *Store) DeleteUser(ctx context.Context, u *ent.User) error
- func (s *Store) FindChatUserByID(ctx context.Context, id string) (*ent.ChatUser, error)
- func (s *Store) FindDeploymentByID(ctx context.Context, id int) (*ent.Deployment, error)
- func (s *Store) FindDeploymentByUID(ctx context.Context, uid int64) (*ent.Deployment, error)
- func (s *Store) FindDeploymentOfRepoByNumber(ctx context.Context, r *ent.Repo, number int) (*ent.Deployment, error)
- func (s *Store) FindDeploymentStatisticsOfRepoByEnv(ctx context.Context, r *ent.Repo, env string) (*ent.DeploymentStatistics, error)
- func (s *Store) FindDeploymentStatusByID(ctx context.Context, id int) (*ent.DeploymentStatus, error)
- func (s *Store) FindLockByID(ctx context.Context, id int) (*ent.Lock, error)
- func (s *Store) FindLockOfRepoByEnv(ctx context.Context, r *ent.Repo, env string) (*ent.Lock, error)
- func (s *Store) FindPermOfRepo(ctx context.Context, r *ent.Repo, u *ent.User) (*ent.Perm, error)
- func (s *Store) FindPrevRunningDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
- func (s *Store) FindPrevSuccessDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
- func (s *Store) FindRepoByID(ctx context.Context, id int64) (*ent.Repo, error)
- func (s *Store) FindRepoOfUserByID(ctx context.Context, u *ent.User, id int64) (*ent.Repo, error)
- func (s *Store) FindRepoOfUserByNamespaceName(ctx context.Context, u *ent.User, opt *i.FindRepoOfUserByNamespaceNameOptions) (*ent.Repo, error)
- func (s *Store) FindReviewByID(ctx context.Context, id int) (*ent.Review, error)
- func (s *Store) FindReviewOfUser(ctx context.Context, u *ent.User, d *ent.Deployment) (*ent.Review, error)
- func (s *Store) FindUserByHash(ctx context.Context, hash string) (*ent.User, error)
- func (s *Store) FindUserByID(ctx context.Context, id int64) (*ent.User, error)
- func (s *Store) FindUserByLogin(ctx context.Context, login string) (*ent.User, error)
- func (s *Store) GetNextDeploymentNumberOfRepo(ctx context.Context, r *ent.Repo) (int, error)
- func (s *Store) HasLockOfRepoForEnv(ctx context.Context, r *ent.Repo, env string) (bool, error)
- func (s *Store) ListAllDeploymentStatistics(ctx context.Context) ([]*ent.DeploymentStatistics, error)
- func (s *Store) ListDeploymentStatisticsGreaterThanTime(ctx context.Context, updated time.Time) ([]*ent.DeploymentStatistics, error)
- func (s *Store) ListDeploymentStatuses(ctx context.Context, d *ent.Deployment) ([]*ent.DeploymentStatus, error)
- func (s *Store) ListDeploymentsOfRepo(ctx context.Context, r *ent.Repo, opt *i.ListDeploymentsOfRepoOptions) ([]*ent.Deployment, error)
- func (s *Store) ListEventsGreaterThanTime(ctx context.Context, t time.Time) ([]*ent.Event, error)
- func (s *Store) ListExpiredLocksLessThanTime(ctx context.Context, t time.Time) ([]*ent.Lock, error)
- func (s *Store) ListInactiveDeploymentsLessThanTime(ctx context.Context, opt *i.ListInactiveDeploymentsLessThanTimeOptions) ([]*ent.Deployment, error)
- func (s *Store) ListLocksOfRepo(ctx context.Context, r *ent.Repo) ([]*ent.Lock, error)
- func (s *Store) ListPerms(ctx context.Context, opt *i.ListOptions) ([]*ent.Perm, error)
- func (s *Store) ListPermsOfRepo(ctx context.Context, r *ent.Repo, opt *i.ListPermsOfRepoOptions) ([]*ent.Perm, error)
- func (s *Store) ListReposOfUser(ctx context.Context, u *ent.User, opt *i.ListReposOfUserOptions) ([]*ent.Repo, error)
- func (s *Store) ListReviews(ctx context.Context, d *ent.Deployment) ([]*ent.Review, error)
- func (s *Store) SearchDeploymentsOfUser(ctx context.Context, u *ent.User, opt *i.SearchDeploymentsOfUserOptions) ([]*ent.Deployment, error)
- func (s *Store) SearchReviews(ctx context.Context, u *ent.User) ([]*ent.Review, error)
- func (s *Store) SearchUsers(ctx context.Context, opts *i.SearchUsersOptions) ([]*ent.User, error)
- func (s *Store) SyncRepo(ctx context.Context, r *extent.RemoteRepo) (*ent.Repo, error)
- func (s *Store) UpdateChatUser(ctx context.Context, cu *ent.ChatUser) (*ent.ChatUser, error)
- func (s *Store) UpdateDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
- func (s *Store) UpdateDeploymentStatistics(ctx context.Context, ds *ent.DeploymentStatistics) (*ent.DeploymentStatistics, error)
- func (s *Store) UpdateLock(ctx context.Context, l *ent.Lock) (*ent.Lock, error)
- func (s *Store) UpdatePerm(ctx context.Context, p *ent.Perm) (*ent.Perm, error)
- func (s *Store) UpdateRepo(ctx context.Context, r *ent.Repo) (*ent.Repo, error)
- func (s *Store) UpdateReview(ctx context.Context, rv *ent.Review) (*ent.Review, error)
- func (s *Store) UpdateUser(ctx context.Context, u *ent.User) (*ent.User, error)
- func (s *Store) WithTx(ctx context.Context, fn func(tx *ent.Tx) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CheckNotificationRecordOfEvent ¶
func (*Store) CreateChatUser ¶
func (*Store) CreateDeployment ¶
func (s *Store) CreateDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
CreateDeployment create a new deployment, and it updates the 'latest_deployed_at' field of the repository.
func (*Store) CreateDeploymentStatistics ¶
func (s *Store) CreateDeploymentStatistics(ctx context.Context, ds *ent.DeploymentStatistics) (*ent.DeploymentStatistics, error)
func (*Store) CreateEntDeploymentStatus ¶
func (s *Store) CreateEntDeploymentStatus(ctx context.Context, ds *ent.DeploymentStatus) (*ent.DeploymentStatus, error)
func (*Store) CreateEvent ¶
func (*Store) CreateLock ¶
func (*Store) CreatePerm ¶
func (*Store) CreateReview ¶
func (*Store) CreateUser ¶
func (*Store) Deactivate ¶
func (*Store) DeleteChatUser ¶
func (*Store) DeletePermsOfUserLessThanSyncedAt ¶
func (*Store) FindChatUserByID ¶
func (*Store) FindDeploymentByID ¶
func (*Store) FindDeploymentByUID ¶
func (*Store) FindDeploymentOfRepoByNumber ¶
func (*Store) FindDeploymentStatisticsOfRepoByEnv ¶
func (*Store) FindDeploymentStatusByID ¶
func (*Store) FindLockByID ¶
func (*Store) FindLockOfRepoByEnv ¶
func (*Store) FindPermOfRepo ¶
func (*Store) FindPrevRunningDeployment ¶
func (s *Store) FindPrevRunningDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
FindPrevRunningDeployment find a deployment of which the status is created, queued, or running.
func (*Store) FindPrevSuccessDeployment ¶
func (s *Store) FindPrevSuccessDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
func (*Store) FindRepoByID ¶
func (*Store) FindRepoOfUserByID ¶
func (*Store) FindRepoOfUserByNamespaceName ¶
func (*Store) FindReviewByID ¶
func (*Store) FindReviewOfUser ¶
func (*Store) FindUserByHash ¶
func (*Store) FindUserByID ¶
FindUserByID return the user with chat_user, but it returns nil if chat_user is not found.
Note that add new indexes if you need to more edges.
func (*Store) FindUserByLogin ¶
func (*Store) GetNextDeploymentNumberOfRepo ¶
func (*Store) HasLockOfRepoForEnv ¶
func (*Store) ListAllDeploymentStatistics ¶
func (*Store) ListDeploymentStatisticsGreaterThanTime ¶
func (*Store) ListDeploymentStatuses ¶
func (s *Store) ListDeploymentStatuses(ctx context.Context, d *ent.Deployment) ([]*ent.DeploymentStatus, error)
func (*Store) ListDeploymentsOfRepo ¶
func (s *Store) ListDeploymentsOfRepo(ctx context.Context, r *ent.Repo, opt *i.ListDeploymentsOfRepoOptions) ([]*ent.Deployment, error)
func (*Store) ListEventsGreaterThanTime ¶
ListEventsGreaterThanTime returns all events for deployment and review that are greater than the time.
It processes eager loading, especially, review loads a repository of deployment.
func (*Store) ListExpiredLocksLessThanTime ¶
func (*Store) ListInactiveDeploymentsLessThanTime ¶
func (s *Store) ListInactiveDeploymentsLessThanTime(ctx context.Context, opt *i.ListInactiveDeploymentsLessThanTimeOptions) ([]*ent.Deployment, error)
func (*Store) ListLocksOfRepo ¶
func (*Store) ListPermsOfRepo ¶
func (*Store) ListReposOfUser ¶
func (*Store) ListReviews ¶
func (*Store) SearchDeploymentsOfUser ¶
func (s *Store) SearchDeploymentsOfUser(ctx context.Context, u *ent.User, opt *i.SearchDeploymentsOfUserOptions) ([]*ent.Deployment, error)
func (*Store) SearchReviews ¶
func (*Store) SearchUsers ¶
func (*Store) UpdateChatUser ¶
func (*Store) UpdateDeployment ¶
func (s *Store) UpdateDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error)
func (*Store) UpdateDeploymentStatistics ¶
func (s *Store) UpdateDeploymentStatistics(ctx context.Context, ds *ent.DeploymentStatistics) (*ent.DeploymentStatistics, error)
func (*Store) UpdateLock ¶
func (*Store) UpdatePerm ¶
func (*Store) UpdateRepo ¶
func (*Store) UpdateReview ¶
func (*Store) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.