mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
chore(codersdk): rename WorkspaceAgent(Dev)container structs (#16996)
This is to free up the devcontainer name space for more targeted structs. Updates #16423
This commit is contained in:
committed by
GitHub
parent
ef62e626c8
commit
3ac844ad3d
8
coderd/apidoc/docs.go
generated
8
coderd/apidoc/docs.go
generated
@ -16180,7 +16180,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainer": {
|
||||
"codersdk.WorkspaceAgentContainer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
@ -16211,7 +16211,7 @@ const docTemplate = `{
|
||||
"description": "Ports includes ports exposed by the container.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerPort"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentContainerPort"
|
||||
}
|
||||
},
|
||||
"running": {
|
||||
@ -16231,7 +16231,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainerPort": {
|
||||
"codersdk.WorkspaceAgentContainerPort": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host_ip": {
|
||||
@ -16299,7 +16299,7 @@ const docTemplate = `{
|
||||
"description": "Containers is a list of containers visible to the workspace agent.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainer"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentContainer"
|
||||
}
|
||||
},
|
||||
"warnings": {
|
||||
|
8
coderd/apidoc/swagger.json
generated
8
coderd/apidoc/swagger.json
generated
@ -14753,7 +14753,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainer": {
|
||||
"codersdk.WorkspaceAgentContainer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
@ -14784,7 +14784,7 @@
|
||||
"description": "Ports includes ports exposed by the container.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerPort"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentContainerPort"
|
||||
}
|
||||
},
|
||||
"running": {
|
||||
@ -14804,7 +14804,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainerPort": {
|
||||
"codersdk.WorkspaceAgentContainerPort": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host_ip": {
|
||||
@ -14872,7 +14872,7 @@
|
||||
"description": "Containers is a list of containers visible to the workspace agent.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainer"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentContainer"
|
||||
}
|
||||
},
|
||||
"warnings": {
|
||||
|
@ -765,7 +765,7 @@ func (api *API) workspaceAgentListContainers(rw http.ResponseWriter, r *http.Req
|
||||
}
|
||||
|
||||
// Filter in-place by labels
|
||||
cts.Containers = slices.DeleteFunc(cts.Containers, func(ct codersdk.WorkspaceAgentDevcontainer) bool {
|
||||
cts.Containers = slices.DeleteFunc(cts.Containers, func(ct codersdk.WorkspaceAgentContainer) bool {
|
||||
return !maputil.Subset(labels, ct.Labels)
|
||||
})
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ func TestWorkspaceAgentContainers(t *testing.T) {
|
||||
"com.coder.test": uuid.New().String(),
|
||||
}
|
||||
testResponse := codersdk.WorkspaceAgentListContainersResponse{
|
||||
Containers: []codersdk.WorkspaceAgentDevcontainer{
|
||||
Containers: []codersdk.WorkspaceAgentContainer{
|
||||
{
|
||||
ID: uuid.NewString(),
|
||||
CreatedAt: dbtime.Now(),
|
||||
@ -1173,7 +1173,7 @@ func TestWorkspaceAgentContainers(t *testing.T) {
|
||||
Labels: testLabels,
|
||||
Running: true,
|
||||
Status: "running",
|
||||
Ports: []codersdk.WorkspaceAgentDevcontainerPort{
|
||||
Ports: []codersdk.WorkspaceAgentContainerPort{
|
||||
{
|
||||
Network: "tcp",
|
||||
Port: 80,
|
||||
|
Reference in New Issue
Block a user