projects

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectNotFound    = errors.New("project not found")
	ErrUnauthorized       = errors.New("unauthorized access")
	ErrDuplicateProjectID = errors.New("project with this ID already exists")
	ErrMemberNotFound     = errors.New("project member not found")
	ErrCannotRemoveOwner  = errors.New("cannot remove project owner")
	ErrCannotChangeOwner  = errors.New("cannot change owner role")
	ErrInvalidRole        = errors.New("invalid role specified")
)

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(db *gorm.DB, authProvider auth.AuthProvider) *Service

func (*Service) AddMember

func (s *Service) AddMember(ctx context.Context, userID string, projectID uint, req *models.AddProjectMemberRequest) (*models.ProjectMember, error)

func (*Service) CreateProject

func (s *Service) CreateProject(ctx context.Context, userID string, req *models.ProjectCreateRequest) (*models.Project, error)

func (*Service) DeleteProject

func (s *Service) DeleteProject(ctx context.Context, userID string, projectID uint) error

func (*Service) GetProject

func (s *Service) GetProject(ctx context.Context, userID string, projectID uint) (*models.Project, error)

func (*Service) ListProjects

func (s *Service) ListProjects(ctx context.Context, userID, organizationID string) ([]models.Project, error)

func (*Service) RemoveMember

func (s *Service) RemoveMember(ctx context.Context, userID string, projectID uint, targetUserID string) error

func (*Service) UpdateMemberRole

func (s *Service) UpdateMemberRole(ctx context.Context, userID string, projectID uint, targetUserID, role string) (*models.ProjectMember, error)

func (*Service) UpdateProject

func (s *Service) UpdateProject(ctx context.Context, userID string, projectID uint, req *models.ProjectUpdateRequest) (*models.Project, error)

Jump to

Keyboard shortcuts

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