project_repo

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectRepository

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

ProjectRepository handles GitHub-related database operations

func NewProjectRepository

func NewProjectRepository(db *ent.Client) *ProjectRepository

NewProjectRepository creates a new GitHub repository

func (*ProjectRepository) ClearDefaultEnvironment

func (self *ProjectRepository) ClearDefaultEnvironment(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID) error

ClearDefaultEnvironment is intended for cases where we delete the last environment in a project

func (*ProjectRepository) Create

func (self *ProjectRepository) Create(ctx context.Context, tx repository.TxInterface, teamID uuid.UUID, kubernetesName, name string, description *string, kubernetesSecret string) (*ent.Project, error)

func (*ProjectRepository) Delete

func (self *ProjectRepository) Delete(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID) error

func (*ProjectRepository) GetByID

func (self *ProjectRepository) GetByID(ctx context.Context, id uuid.UUID) (*ent.Project, error)

func (*ProjectRepository) GetByTeam

func (self *ProjectRepository) GetByTeam(ctx context.Context, teamID uuid.UUID, authPredicate predicate.Project, sortField models.SortByField, sortOrder models.SortOrder) ([]*ent.Project, error)

func (*ProjectRepository) GetTeamID

func (self *ProjectRepository) GetTeamID(ctx context.Context, id uuid.UUID) (uuid.UUID, error)

func (*ProjectRepository) Update

func (self *ProjectRepository) Update(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID, defaultEnvironmentID *uuid.UUID, name string, description *string) (*ent.Project, error)

type ProjectRepositoryInterface

type ProjectRepositoryInterface interface {
	Create(ctx context.Context, tx repository.TxInterface, teamID uuid.UUID, kubernetesName, name string, description *string, kubernetesSecret string) (*ent.Project, error)
	// ClearDefaultEnvironment is intended for cases where we delete the last environment in a project
	ClearDefaultEnvironment(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID) error
	Update(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID, defaultEnvironmentID *uuid.UUID, name string, description *string) (*ent.Project, error)
	Delete(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID) error
	GetByID(ctx context.Context, id uuid.UUID) (*ent.Project, error)
	GetTeamID(ctx context.Context, id uuid.UUID) (uuid.UUID, error)
	GetByTeam(ctx context.Context, teamID uuid.UUID, authPredicate predicate.Project, sortField models.SortByField, sortOrder models.SortOrder) ([]*ent.Project, error)
}

ProjectRepositoryInterface ...

Jump to

Keyboard shortcuts

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