Versions in this module Expand all Collapse all v0 v0.1.0 Jun 16, 2022 Changes in this version + var ErrInvalidID = errors.New("ID is not in its proper form") + var ErrNotFound = errors.New("user not found") + type Core struct + func NewCore(log *zap.SugaredLogger, sqlxDB *sqlx.DB) Core + func (c Core) Create(ctx context.Context, userID string, np NewProject, now time.Time) (Project, error) + func (c Core) Delete(ctx context.Context, projectID string) error + func (c Core) QueryByID(ctx context.Context, projectID string) (Project, error) + func (c Core) QueryClientProjects(ctx context.Context, clientID string, pageNumber, rowsPerPage int) ([]Project, error) + func (c Core) QueryUserProjects(ctx context.Context, userID string, pageNumber, rowsPerPage int) ([]Project, error) + func (c Core) QueryWorkspaceProjects(ctx context.Context, workspaceID string, pageNumber, rowsPerPage int) ([]Project, error) + func (c Core) Update(ctx context.Context, projectID string, up UpdateProject, now time.Time) error + type NewProject struct + Active bool + AutoEstimates bool + Billable bool + Cid string + EstimatedHours time.Duration + HexColor string + IsPrivate bool + Name string + Rate float32 + Wid string + type Project struct + Active bool + AutoEstimates bool + Billable bool + Cid string + DateCreated time.Time + DateUpdated time.Time + EstimatedHours time.Duration + HexColor string + ID string + IsPrivate bool + Name string + Rate float32 + Uid string + Wid string + type UpdateProject struct + Active *bool + AutoEstimates *bool + Billable *bool + EstimatedHours *time.Duration + HexColor *string + IsPrivate *bool + Name *string + Rate *float32