Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8147977

Browse files
committed
chore(cdr): Move httpapi to /coderd directory
httpapi is specific to coderd and should be scoped under coderd
1 parent ba7c7fe commit 8147977

27 files changed

+26
-26
lines changed

coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"cdr.dev/slog"
1313
"github.com/coder/coder/database"
14-
"github.com/coder/coder/httpapi"
14+
"github.com/coder/coder/coderd/httpapi"
1515
"github.com/coder/coder/coderd/httpmw"
1616
"github.com/coder/coder/site"
1717
)

coderd/files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"github.com/coder/coder/codersdk"
1616
"github.com/coder/coder/database"
17-
"github.com/coder/coder/httpapi"
17+
"github.com/coder/coder/coderd/httpapi"
1818
"github.com/coder/coder/coderd/httpmw"
1919
)
2020

File renamed without changes.

httpapi/httpapi_test.go renamed to coderd/httpapi/httpapi_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/stretchr/testify/require"
1111

12-
"github.com/coder/coder/httpapi"
12+
"github.com/coder/coder/coderd/httpapi"
1313
)
1414

1515
func TestWrite(t *testing.T) {

coderd/httpmw/apikey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"golang.org/x/oauth2"
1515

1616
"github.com/coder/coder/database"
17-
"github.com/coder/coder/httpapi"
17+
"github.com/coder/coder/coderd/httpapi"
1818
)
1919

2020
// AuthCookie represents the name of the cookie the API key is stored in.

coderd/httpmw/apikey_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/coder/coder/cryptorand"
1616
"github.com/coder/coder/database"
1717
"github.com/coder/coder/database/databasefake"
18-
"github.com/coder/coder/httpapi"
18+
"github.com/coder/coder/coderd/httpapi"
1919
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

coderd/httpmw/httpmw.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/go-chi/chi/v5"
88
"github.com/google/uuid"
99

10-
"github.com/coder/coder/httpapi"
10+
"github.com/coder/coder/coderd/httpapi"
1111
)
1212

1313
// parseUUID consumes a url parameter and parses it as a UUID.

coderd/httpmw/organizationparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/go-chi/chi/v5"
1111

1212
"github.com/coder/coder/database"
13-
"github.com/coder/coder/httpapi"
13+
"github.com/coder/coder/coderd/httpapi"
1414
)
1515

1616
type organizationParamContextKey struct{}

coderd/httpmw/projectparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"github.com/go-chi/chi/v5"
1111

12+
"github.com/coder/coder/coderd/httpapi"
1213
"github.com/coder/coder/database"
13-
"github.com/coder/coder/httpapi"
1414
)
1515

1616
type projectParamContextKey struct{}

coderd/httpmw/projectversionparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/go-chi/chi/v5"
1111

1212
"github.com/coder/coder/database"
13-
"github.com/coder/coder/httpapi"
13+
"github.com/coder/coder/coderd/httpapi"
1414
)
1515

1616
type projectVersionParamContextKey struct{}

coderd/httpmw/userparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/go-chi/chi/v5"
99

1010
"github.com/coder/coder/database"
11-
"github.com/coder/coder/httpapi"
11+
"github.com/coder/coder/coderd/httpapi"
1212
)
1313

1414
type userParamContextKey struct{}

coderd/httpmw/workspaceagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/google/uuid"
1111

1212
"github.com/coder/coder/database"
13-
"github.com/coder/coder/httpapi"
13+
"github.com/coder/coder/coderd/httpapi"
1414
)
1515

1616
type workspaceAgentContextKey struct{}

coderd/httpmw/workspacebuildparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/go-chi/chi/v5"
1111

1212
"github.com/coder/coder/database"
13-
"github.com/coder/coder/httpapi"
13+
"github.com/coder/coder/coderd/httpapi"
1414
)
1515

1616
type workspaceBuildParamContextKey struct{}

coderd/httpmw/workspaceparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/http"
99

1010
"github.com/coder/coder/database"
11-
"github.com/coder/coder/httpapi"
11+
"github.com/coder/coder/coderd/httpapi"
1212
)
1313

1414
type workspaceParamContextKey struct{}

coderd/httpmw/workspaceresourceparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/go-chi/chi/v5"
1111

1212
"github.com/coder/coder/database"
13-
"github.com/coder/coder/httpapi"
13+
"github.com/coder/coder/coderd/httpapi"
1414
)
1515

1616
type workspaceResourceParamContextKey struct{}

coderd/organizations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"github.com/coder/coder/codersdk"
1616
"github.com/coder/coder/database"
17-
"github.com/coder/coder/httpapi"
17+
"github.com/coder/coder/coderd/httpapi"
1818
"github.com/coder/coder/coderd/httpmw"
1919
)
2020

coderd/parameters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
"github.com/coder/coder/codersdk"
1414
"github.com/coder/coder/database"
15-
"github.com/coder/coder/httpapi"
15+
"github.com/coder/coder/coderd/httpapi"
1616
)
1717

1818
func (api *api) postParameter(rw http.ResponseWriter, r *http.Request) {

coderd/projects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
"github.com/coder/coder/codersdk"
1414
"github.com/coder/coder/database"
15-
"github.com/coder/coder/httpapi"
15+
"github.com/coder/coder/coderd/httpapi"
1616
"github.com/coder/coder/coderd/httpmw"
1717
)
1818

coderd/projectversions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/coder/coder/coderd/parameter"
1212
"github.com/coder/coder/codersdk"
1313
"github.com/coder/coder/database"
14-
"github.com/coder/coder/httpapi"
14+
"github.com/coder/coder/coderd/httpapi"
1515
"github.com/coder/coder/coderd/httpmw"
1616
)
1717

coderd/provisionerdaemons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
"github.com/coder/coder/coderd/parameter"
2727
"github.com/coder/coder/database"
28-
"github.com/coder/coder/httpapi"
28+
"github.com/coder/coder/coderd/httpapi"
2929
"github.com/coder/coder/provisionerd/proto"
3030
"github.com/coder/coder/provisionersdk"
3131
sdkproto "github.com/coder/coder/provisionersdk/proto"

coderd/provisionerjobs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
"github.com/coder/coder/codersdk"
1919
"github.com/coder/coder/database"
20-
"github.com/coder/coder/httpapi"
20+
"github.com/coder/coder/coderd/httpapi"
2121
)
2222

2323
// Returns provisioner logs based on query parameters.

coderd/users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/coder/coder/codersdk"
2020
"github.com/coder/coder/cryptorand"
2121
"github.com/coder/coder/database"
22-
"github.com/coder/coder/httpapi"
22+
"github.com/coder/coder/coderd/httpapi"
2323
"github.com/coder/coder/coderd/httpmw"
2424
)
2525

coderd/workspacebuilds.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/coder/coder/codersdk"
1111
"github.com/coder/coder/database"
12-
"github.com/coder/coder/httpapi"
12+
"github.com/coder/coder/coderd/httpapi"
1313
"github.com/coder/coder/coderd/httpmw"
1414
)
1515

coderd/workspaceresourceauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/coder/coder/codersdk"
1313
"github.com/coder/coder/database"
14-
"github.com/coder/coder/httpapi"
14+
"github.com/coder/coder/coderd/httpapi"
1515

1616
"github.com/mitchellh/mapstructure"
1717
)

coderd/workspaceresources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
"github.com/coder/coder/codersdk"
1919
"github.com/coder/coder/database"
20-
"github.com/coder/coder/httpapi"
20+
"github.com/coder/coder/coderd/httpapi"
2121
"github.com/coder/coder/coderd/httpmw"
2222
"github.com/coder/coder/peerbroker"
2323
"github.com/coder/coder/peerbroker/proto"

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
"github.com/coder/coder/codersdk"
1717
"github.com/coder/coder/database"
18-
"github.com/coder/coder/httpapi"
18+
"github.com/coder/coder/coderd/httpapi"
1919
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

codersdk/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"golang.org/x/xerrors"
1515

1616
"github.com/coder/coder/coderd/httpmw"
17-
"github.com/coder/coder/httpapi"
17+
"github.com/coder/coder/coderd/httpapi"
1818
)
1919

2020
// New creates a Coder client for the provided URL.

0 commit comments

Comments
 (0)