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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TeamRepository

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

TeamRepository handles GitHub-related database operations

func NewTeamRepository

func NewTeamRepository(db *ent.Client) *TeamRepository

NewTeamRepository creates a new GitHub repository

func (*TeamRepository) GetAll

func (self *TeamRepository) GetAll(ctx context.Context, authPredicate predicate.Team) ([]*ent.Team, error)

func (*TeamRepository) GetByID

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

func (*TeamRepository) GetNamespace

func (self *TeamRepository) GetNamespace(ctx context.Context, id uuid.UUID) (string, error)

func (*TeamRepository) HasUserWithID

func (self *TeamRepository) HasUserWithID(ctx context.Context, teamID uuid.UUID, userID uuid.UUID) (bool, error)

func (*TeamRepository) Update

func (self *TeamRepository) Update(ctx context.Context, teamID uuid.UUID, name string, description *string) (*ent.Team, error)

type TeamRepositoryInterface

type TeamRepositoryInterface interface {
	Update(ctx context.Context, teamID uuid.UUID, name string, description *string) (*ent.Team, error)
	GetAll(ctx context.Context, authPredicate predicate.Team) ([]*ent.Team, error)
	GetByID(ctx context.Context, id uuid.UUID) (*ent.Team, error)
	GetNamespace(ctx context.Context, id uuid.UUID) (string, error)
	HasUserWithID(ctx context.Context, teamID uuid.UUID, userID uuid.UUID) (bool, error)
}

TeamRepositoryInterface ...

Jump to

Keyboard shortcuts

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