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, nw NewWorkspace, now time.Time) (Workspace, error) + func (c Core) Query(ctx context.Context, userID string, pageNumber int, rowsPerPage int) ([]Workspace, error) + func (c Core) QueryByID(ctx context.Context, workspaceID string) (Workspace, error) + func (c Core) Update(ctx context.Context, workspaceID string, uw UpdateWorkspace, now time.Time) error + func (c Core) UpdateLogo(ctx context.Context, workspaceID string, uw UpdateWorkspace, now time.Time) error + type NewWorkspace struct + Name string + Uid string + type UpdateWorkspace struct + DefaultCurrency *string + DefaultHourlyRate *float32 + LogoURL string + Name *string + OnlyAdminMayCreateProjects *bool + OnlyAdminSeeBillableRates *bool + OnlyAdminSeeTeamDashboard *bool + Rounding *int + RoundingMinutes *int + type Workspace struct + DateCreated time.Time + DateUpdated time.Time + DefaultCurrency string + DefaultHourlyRate float32 + ID string + LogoURL string + Name string + OnlyAdminMayCreateProjects bool + OnlyAdminSeeBillableRates bool + OnlyAdminSeeTeamDashboard bool + Rounding int + RoundingMinutes int + Uid string