chore: Force codersdk to not import anything from database (#1576)

* chore: Force codersdk to not import anything from database (linter rule)
* chore: Move all database types in codersdk out
This commit is contained in:
Steven Masley
2022-05-19 13:04:44 -05:00
committed by GitHub
parent a0834404f7
commit 6c1117094d
41 changed files with 384 additions and 299 deletions
+4 -6
View File
@@ -11,8 +11,6 @@ import (
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"nhooyr.io/websocket/wsjson"
"github.com/coder/coder/coderd/database"
)
// Workspace is a deployment of a template. It references a specific
@@ -34,10 +32,10 @@ type Workspace struct {
// CreateWorkspaceBuildRequest provides options to update the latest workspace build.
type CreateWorkspaceBuildRequest struct {
TemplateVersionID uuid.UUID `json:"template_version_id,omitempty"`
Transition database.WorkspaceTransition `json:"transition" validate:"oneof=create start stop delete,required"`
DryRun bool `json:"dry_run,omitempty"`
ProvisionerState []byte `json:"state,omitempty"`
TemplateVersionID uuid.UUID `json:"template_version_id,omitempty"`
Transition WorkspaceTransition `json:"transition" validate:"oneof=create start stop delete,required"`
DryRun bool `json:"dry_run,omitempty"`
ProvisionerState []byte `json:"state,omitempty"`
}
// Workspace returns a single workspace.