group_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 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 GroupRepository

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

GroupRepository handles GitHub-related database operations

func NewGroupRepository

func NewGroupRepository(db *ent.Client, permissionsRepo permissions_repo.PermissionsRepositoryInterface) *GroupRepository

NewGroupRepository creates a new GitHub repository

func (*GroupRepository) AddUser

func (self *GroupRepository) AddUser(ctx context.Context, groupID uuid.UUID, userID uuid.UUID) error

func (*GroupRepository) ClearK8sRoleName

func (self *GroupRepository) ClearK8sRoleName(ctx context.Context, g *ent.Group) error

func (*GroupRepository) GetAllWithK8sRole

func (self *GroupRepository) GetAllWithK8sRole(ctx context.Context) ([]*ent.Group, error)

func (*GroupRepository) GetAllWithPermissions

func (self *GroupRepository) GetAllWithPermissions(ctx context.Context) ([]*ent.Group, error)

func (*GroupRepository) GetByID

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

func (*GroupRepository) GetMembers

func (self *GroupRepository) GetMembers(ctx context.Context, groupID uuid.UUID) ([]*ent.User, error)

func (*GroupRepository) GetPermissions

func (self *GroupRepository) GetPermissions(ctx context.Context, groupID uuid.UUID) ([]*ent.Permission, error)

func (*GroupRepository) HasUserWithID

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

func (*GroupRepository) RemoveUser

func (self *GroupRepository) RemoveUser(ctx context.Context, groupID uuid.UUID, userID uuid.UUID) error

func (*GroupRepository) UpdateK8sRoleName

func (self *GroupRepository) UpdateK8sRoleName(ctx context.Context, g *ent.Group, k8sGroupName string) error

type GroupRepositoryInterface

type GroupRepositoryInterface interface {
	UpdateK8sRoleName(ctx context.Context, g *ent.Group, k8sGroupName string) error
	ClearK8sRoleName(ctx context.Context, g *ent.Group) error
	AddUser(ctx context.Context, groupID uuid.UUID, userID uuid.UUID) error
	RemoveUser(ctx context.Context, groupID uuid.UUID, userID uuid.UUID) error
	GetByID(ctx context.Context, id uuid.UUID) (*ent.Group, error)
	GetAllWithK8sRole(ctx context.Context) ([]*ent.Group, error)
	GetAllWithPermissions(ctx context.Context) ([]*ent.Group, error)
	HasUserWithID(ctx context.Context, groupID uuid.UUID, userID uuid.UUID) (bool, error)
	GetMembers(ctx context.Context, groupID uuid.UUID) ([]*ent.User, error)
	GetPermissions(ctx context.Context, groupID uuid.UUID) ([]*ent.Permission, error)
}

GroupRepositoryInterface ...

Jump to

Keyboard shortcuts

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