Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) AddMember(ctx context.Context, userID string, projectID uint, ...) (*models.ProjectMember, error)
- func (s *Service) CreateProject(ctx context.Context, userID string, req *models.ProjectCreateRequest) (*models.Project, error)
- func (s *Service) DeleteProject(ctx context.Context, userID string, projectID uint) error
- func (s *Service) GetProject(ctx context.Context, userID string, projectID uint) (*models.Project, error)
- func (s *Service) ListProjects(ctx context.Context, userID, organizationID string) ([]models.Project, error)
- func (s *Service) RemoveMember(ctx context.Context, userID string, projectID uint, targetUserID string) error
- func (s *Service) UpdateMemberRole(ctx context.Context, userID string, projectID uint, targetUserID, role string) (*models.ProjectMember, error)
- func (s *Service) UpdateProject(ctx context.Context, userID string, projectID uint, ...) (*models.Project, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectNotFound = errors.New("project not found") 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 (*Service) DeleteProject ¶
func (*Service) GetProject ¶
func (*Service) ListProjects ¶
func (*Service) RemoveMember ¶
func (*Service) UpdateMemberRole ¶
Click to show internal directories.
Click to hide internal directories.