environment_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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentRepository

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

EnvironmentRepository handles Environment-related database operations

func NewEnvironmentRepository

func NewEnvironmentRepository(db *ent.Client) *EnvironmentRepository

NewEnvironmentRepository creates a new GitHub repository

func (*EnvironmentRepository) Create

func (self *EnvironmentRepository) Create(ctx context.Context, tx repository.TxInterface, kubernetesName, name, kuberneteSecret string, description *string, projectID uuid.UUID) (*ent.Environment, error)

func (*EnvironmentRepository) Delete

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

func (*EnvironmentRepository) GetByID

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

func (*EnvironmentRepository) GetForProject

func (self *EnvironmentRepository) GetForProject(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID, authPredicate predicate.Environment) ([]*ent.Environment, error)

Return all environments for a project with service edge populated

func (*EnvironmentRepository) Update

func (self *EnvironmentRepository) Update(ctx context.Context, environmentID uuid.UUID, name *string, description *string) (*ent.Environment, error)

type EnvironmentRepositoryInterface

type EnvironmentRepositoryInterface interface {
	Create(ctx context.Context, tx repository.TxInterface, kubernetesName, name, kuberneteSecret string, description *string, projectID uuid.UUID) (*ent.Environment, error)
	Delete(ctx context.Context, tx repository.TxInterface, environmentID uuid.UUID) error
	Update(ctx context.Context, environmentID uuid.UUID, name *string, description *string) (*ent.Environment, error)
	GetByID(ctx context.Context, id uuid.UUID) (*ent.Environment, error)
	// Return all environments for a project with service edge populated
	GetForProject(ctx context.Context, tx repository.TxInterface, projectID uuid.UUID, authPredicate predicate.Environment) ([]*ent.Environment, error)
}

EnvironmentRepositoryInterface ...

Jump to

Keyboard shortcuts

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