chore: refactor workspace count to single route (#4809)

Co-authored-by: Presley Pizzo <presley@coder.com>
This commit is contained in:
Garrett Delfosse
2022-11-10 13:25:46 -05:00
committed by GitHub
parent 5fb9c33ecd
commit 766a2ad590
23 changed files with 160 additions and 761 deletions

View File

@ -112,8 +112,6 @@ type sqlcQuerier interface {
GetWorkspaceBuildsCreatedAfter(ctx context.Context, createdAt time.Time) ([]WorkspaceBuild, error)
GetWorkspaceByID(ctx context.Context, id uuid.UUID) (Workspace, error)
GetWorkspaceByOwnerIDAndName(ctx context.Context, arg GetWorkspaceByOwnerIDAndNameParams) (Workspace, error)
// this duplicates the filtering in GetWorkspaces
GetWorkspaceCount(ctx context.Context, arg GetWorkspaceCountParams) (int64, error)
GetWorkspaceCountByUserID(ctx context.Context, ownerID uuid.UUID) (int64, error)
GetWorkspaceOwnerCountsByTemplateIDs(ctx context.Context, ids []uuid.UUID) ([]GetWorkspaceOwnerCountsByTemplateIDsRow, error)
GetWorkspaceResourceByID(ctx context.Context, id uuid.UUID) (WorkspaceResource, error)