Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
602352ce
Commit
602352ce
authored
Mar 08, 2025
by
Neelay Shah
Committed by
GitHub
Mar 08, 2025
Browse files
chore: rename dynamo (#44)
Co-authored-by:
Biswa Panda
<
biswa.panda@gmail.com
>
parent
ecf53ce2
Changes
431
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
0 additions
and
1200 deletions
+0
-1200
deploy/dynemo/api-server/api/models/deployment_target.go
deploy/dynemo/api-server/api/models/deployment_target.go
+0
-39
deploy/dynemo/api-server/api/models/resource.go
deploy/dynemo/api-server/api/models/resource.go
+0
-23
deploy/dynemo/api-server/api/models/visibility.go
deploy/dynemo/api-server/api/models/visibility.go
+0
-29
deploy/dynemo/api-server/api/routes/routes.go
deploy/dynemo/api-server/api/routes/routes.go
+0
-343
deploy/dynemo/api-server/api/runtime/runtime.go
deploy/dynemo/api-server/api/runtime/runtime.go
+0
-42
deploy/dynemo/api-server/api/schemas/base.go
deploy/dynemo/api-server/api/schemas/base.go
+0
-27
deploy/dynemo/api-server/api/schemas/cluster.go
deploy/dynemo/api-server/api/schemas/cluster.go
+0
-50
deploy/dynemo/api-server/api/schemas/compound_ai.go
deploy/dynemo/api-server/api/schemas/compound_ai.go
+0
-57
deploy/dynemo/api-server/api/schemas/compound_component.go
deploy/dynemo/api-server/api/schemas/compound_component.go
+0
-72
deploy/dynemo/api-server/api/schemas/compound_nim.go
deploy/dynemo/api-server/api/schemas/compound_nim.go
+0
-33
deploy/dynemo/api-server/api/schemas/compound_nim_version.go
deploy/dynemo/api-server/api/schemas/compound_nim_version.go
+0
-55
deploy/dynemo/api-server/api/schemas/deployment.go
deploy/dynemo/api-server/api/schemas/deployment.go
+0
-51
deploy/dynemo/api-server/api/schemas/deployment_revision.go
deploy/dynemo/api-server/api/schemas/deployment_revision.go
+0
-35
deploy/dynemo/api-server/api/schemas/deployment_revision_status.go
...nemo/api-server/api/schemas/deployment_revision_status.go
+0
-33
deploy/dynemo/api-server/api/schemas/deployment_status.go
deploy/dynemo/api-server/api/schemas/deployment_status.go
+0
-38
deploy/dynemo/api-server/api/schemas/deployment_target.go
deploy/dynemo/api-server/api/schemas/deployment_target.go
+0
-120
deploy/dynemo/api-server/api/schemas/event.go
deploy/dynemo/api-server/api/schemas/event.go
+0
-47
deploy/dynemo/api-server/api/schemas/external_service.go
deploy/dynemo/api-server/api/schemas/external_service.go
+0
-52
deploy/dynemo/api-server/api/schemas/label.go
deploy/dynemo/api-server/api/schemas/label.go
+0
-23
deploy/dynemo/api-server/api/schemas/list.go
deploy/dynemo/api-server/api/schemas/list.go
+0
-31
No files found.
deploy/dynemo/api-server/api/models/deployment_target.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
models
import
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/schemas"
type
DeploymentTarget
struct
{
BaseModel
CreatorAssociate
DeploymentAssociate
DeploymentRevisionAssociate
CompoundNimVersionAssociate
DmsAssociate
Config
*
schemas
.
DeploymentTargetConfig
`json:"config"`
}
func
(
s
*
DeploymentTarget
)
GetName
()
string
{
return
s
.
Uid
.
String
()
}
func
(
s
*
DeploymentTarget
)
GetResourceType
()
schemas
.
ResourceType
{
return
schemas
.
ResourceTypeDeploymentRevision
}
deploy/dynemo/api-server/api/models/resource.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
models
type
Resource
struct
{
BaseModel
Name
string
`json:"name"`
}
deploy/dynemo/api-server/api/models/visibility.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
models
type
VisibilityLevel
string
const
(
UserLevel
VisibilityLevel
=
"user"
OrgLevel
VisibilityLevel
=
"organization"
)
type
Visibility
struct
{
Visibility
VisibilityLevel
`json:"visibility"`
}
deploy/dynemo/api-server/api/routes/routes.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
routes
import
(
"strings"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog/log"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/common/consts"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/controllers"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/mocks"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/schemas"
)
func
SetupRouter
()
*
gin
.
Engine
{
router
:=
gin
.
Default
()
router
.
Use
(
injectCurrentOrganization
)
baseGroup
:=
router
.
Group
(
""
)
createK8sRoutes
(
baseGroup
)
api
:=
router
.
Group
(
"/api"
)
api
.
Use
(
getAuthInfo
)
v1
:=
api
.
Group
(
"/v1"
)
v2
:=
api
.
Group
(
"/v2"
)
/* Start V1 APIs */
createClusterRoutes
(
v1
)
// These routes are proxied to NDS
createCompoundNimRoutes
(
v1
)
createBentoRepositoriesRoutes
(
v1
)
createMiscellaneousRoutes
(
v1
)
createMockedRoutes
(
v1
)
createOrganizationRoutes
(
v1
)
createPublicRoutes
(
v1
)
/* End V1 APIs */
/* Start V2 APIs */
deploymentRoutesV2
(
v2
)
/* End V2 APIs */
return
router
}
func
createK8sRoutes
(
grp
*
gin
.
RouterGroup
)
{
healthGroup
:=
grp
.
Group
(
"/healthz"
)
healthGroup
.
GET
(
""
,
controllers
.
HealthController
.
Get
)
readyGroup
:=
grp
.
Group
(
"/readyz"
)
readyGroup
.
GET
(
""
,
controllers
.
HealthController
.
Get
)
}
func
createClusterRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/clusters"
)
resourceGrp
:=
grp
.
Group
(
"/:clusterName"
)
resourceGrp
.
GET
(
""
,
controllers
.
ClusterController
.
Get
)
resourceGrp
.
PATCH
(
""
,
controllers
.
ClusterController
.
Update
)
grp
.
GET
(
""
,
controllers
.
ClusterController
.
List
)
grp
.
POST
(
""
,
controllers
.
ClusterController
.
Create
)
compoundComponentRoutes
(
resourceGrp
)
deploymentRoutes
(
resourceGrp
)
}
func
deploymentRoutes
(
grp
*
gin
.
RouterGroup
)
{
namespacedGrp
:=
grp
.
Group
(
"/namespaces/:kubeNamespace/deployments"
)
grp
=
grp
.
Group
(
"/deployments"
)
resourceGrp
:=
namespacedGrp
.
Group
(
"/:deploymentName"
)
resourceGrp
.
GET
(
""
,
controllers
.
DeploymentController
.
Get
)
resourceGrp
.
PATCH
(
""
,
controllers
.
DeploymentController
.
Update
)
resourceGrp
.
POST
(
"/sync_status"
,
controllers
.
DeploymentController
.
SyncStatus
)
resourceGrp
.
POST
(
"/terminate"
,
controllers
.
DeploymentController
.
Terminate
)
resourceGrp
.
DELETE
(
""
,
controllers
.
DeploymentController
.
Delete
)
// resourceGrp.GET("/terminal_records", controllers.DeploymentController.ListTerminalRecords)
grp
.
GET
(
""
,
controllers
.
DeploymentController
.
ListClusterDeployments
)
grp
.
POST
(
""
,
controllers
.
DeploymentController
.
Create
)
deploymentRevisionRoutes
(
resourceGrp
)
}
func
deploymentRevisionRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/revisions"
)
resourceGrp
:=
grp
.
Group
(
"/:revisionUid"
)
resourceGrp
.
GET
(
""
,
controllers
.
DeploymentRevisionController
.
Get
)
grp
.
GET
(
""
,
controllers
.
DeploymentRevisionController
.
List
)
}
func
deploymentRoutesV2
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/deployments"
)
grp
.
POST
(
""
,
controllers
.
DeploymentController
.
CreateV2
)
resourceGrp
:=
grp
.
Group
(
"/:deploymentName"
)
resourceGrp
.
GET
(
""
,
controllers
.
DeploymentController
.
GetV2
)
resourceGrp
.
PUT
(
""
,
controllers
.
DeploymentController
.
UpdateV2
)
resourceGrp
.
POST
(
"/terminate"
,
controllers
.
DeploymentController
.
TerminateV2
)
resourceGrp
.
DELETE
(
""
,
controllers
.
DeploymentController
.
DeleteV2
)
}
func
createBentoRepositoriesRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/bento_repositories"
)
resourceGrp
:=
grp
.
Group
(
"/:bentoRepositoryName"
)
resourceGrp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/deployments"
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
POST
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
bentoRoutes
(
resourceGrp
)
}
func
bentoRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/bentos"
)
resourceGrp
:=
grp
.
Group
(
"/:version"
)
resourceGrp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/update_image_build_status_syncing_at"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/update_image_build_status"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/models"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/deployments"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/start_multipart_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/presign_multipart_upload_url"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/complete_multipart_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/presign_upload_url"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/presign_download_url"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/start_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/finish_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PUT
(
"/upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/download"
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
POST
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
}
func
createCompoundNimRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/compound_nims"
)
resourceGrp
:=
grp
.
Group
(
"/:compoundNimName"
)
resourceGrp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/deployments"
,
controllers
.
DeploymentController
.
ListCompoundNimDeployments
)
grp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
POST
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
compoundNimVersionRoutes
(
resourceGrp
)
}
func
compoundNimVersionRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/versions"
)
resourceGrp
:=
grp
.
Group
(
"/:version"
)
resourceGrp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/update_image_build_status_syncing_at"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/update_image_build_status"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/models"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/deployments"
,
controllers
.
DeploymentController
.
ListCompoundNimVersionDeployments
)
resourceGrp
.
PATCH
(
"/start_multipart_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/presign_multipart_upload_url"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/complete_multipart_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/presign_upload_url"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/presign_download_url"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/start_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PATCH
(
"/finish_upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
PUT
(
"/upload"
,
controllers
.
ProxyController
.
ReverseProxy
)
resourceGrp
.
GET
(
"/download"
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
GET
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
grp
.
POST
(
""
,
controllers
.
ProxyController
.
ReverseProxy
)
}
func
createMiscellaneousRoutes
(
grp
*
gin
.
RouterGroup
)
{
versionGrp
:=
grp
.
Group
(
"/version"
)
versionGrp
.
GET
(
""
,
controllers
.
VersionController
.
Get
)
}
// Legacy APIs used by the CLI
func
createMockedRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
.
GET
(
"auth/current"
,
controllers
.
UserController
.
GetDefaultUser
)
}
func
createOrganizationRoutes
(
grp
*
gin
.
RouterGroup
)
{
resourceGrp
:=
grp
.
Group
(
"/current_org"
)
resourceGrp
.
GET
(
""
,
controllers
.
OrganizationController
.
Get
)
resourceGrp
.
GET
(
"/major_cluster"
,
controllers
.
OrganizationController
.
GetMajorCluster
)
resourceGrp
.
PATCH
(
""
,
controllers
.
OrganizationController
.
Update
)
resourceGrp
.
GET
(
"/events"
,
controllers
.
OrganizationController
.
ListEvents
)
resourceGrp
.
GET
(
"/event_operation_names"
,
controllers
.
OrganizationController
.
ListEventOperationNames
)
grp
.
GET
(
"/members"
,
controllers
.
OrganizationMemberController
.
List
)
grp
.
POST
(
"/members"
,
controllers
.
OrganizationMemberController
.
Create
)
grp
.
DELETE
(
"/members"
,
controllers
.
OrganizationMemberController
.
Delete
)
grp
.
GET
(
"/deployments"
,
controllers
.
DeploymentController
.
ListDeployments
)
grp
.
GET
(
"/deployment_creation_json_schema"
,
controllers
.
DeploymentController
.
CreationJSONSchema
)
grp
.
GET
(
"/yatai_components"
,
controllers
.
CompoundComponentController
.
ListAll
)
grp
.
GET
(
"/orgs"
,
controllers
.
OrganizationController
.
List
)
grp
.
POST
(
"/orgs"
,
controllers
.
OrganizationController
.
Create
)
}
func
createPublicRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
.
GET
(
"/info"
,
controllers
.
InfoController
.
GetInfo
)
}
func
compoundComponentRoutes
(
grp
*
gin
.
RouterGroup
)
{
grp
=
grp
.
Group
(
"/yatai_components"
)
grp
.
GET
(
""
,
controllers
.
CompoundComponentController
.
List
)
grp
.
POST
(
""
,
controllers
.
CompoundComponentController
.
Register
)
}
func
injectCurrentOrganization
(
c
*
gin
.
Context
)
{
orgName
:=
strings
.
TrimSpace
(
c
.
GetHeader
(
consts
.
YataiOrganizationHeaderName
))
if
orgName
==
""
{
orgName
=
strings
.
TrimSpace
(
c
.
Query
(
"organization_name"
))
}
org
:=
mocks
.
DefaultOrg
()
if
orgName
!=
""
{
org
.
Name
=
orgName
}
orgId
:=
c
.
GetHeader
(
consts
.
NgcOrganizationHeaderName
)
if
orgId
==
""
{
orgId
=
"default"
}
org
.
Uid
=
orgId
c
.
Set
(
controllers
.
CurrentOrganizationKey
,
org
)
c
.
Next
()
}
func
getAuthInfo
(
c
*
gin
.
Context
)
{
orgId
:=
c
.
GetHeader
(
consts
.
NgcOrganizationHeaderName
)
if
orgId
==
""
{
orgId
=
"default"
}
userId
:=
c
.
GetHeader
(
consts
.
NgcUserHeaderName
)
if
userId
==
""
{
userId
=
"default"
}
ownership
:=
&
schemas
.
OwnershipSchema
{
UserId
:
userId
,
OrganizationId
:
orgId
,
}
log
.
Info
()
.
Msgf
(
"Setting ownership info %+v"
,
ownership
)
c
.
Set
(
controllers
.
OwnershipInfoKey
,
ownership
)
c
.
Next
()
}
deploy/dynemo/api-server/api/runtime/runtime.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
runtime
import
(
"fmt"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/common/env"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/database"
"github.com/dynemo-ai/dynemo/deploy/compoundai/api-server/api/routes"
"github.com/rs/zerolog/log"
)
type
runtime
struct
{}
var
Runtime
=
runtime
{}
func
(
r
*
runtime
)
StartServer
(
port
int
)
{
env
.
SetupEnv
()
database
.
SetupDB
()
router
:=
routes
.
SetupRouter
()
log
.
Info
()
.
Msgf
(
"Starting CompoundAI API server on port %d"
,
port
)
router
.
Run
(
fmt
.
Sprintf
(
"0.0.0.0:%d"
,
port
))
}
deploy/dynemo/api-server/api/schemas/base.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
import
"time"
type
BaseSchema
struct
{
Uid
string
`json:"uid"`
CreatedAt
time
.
Time
`json:"created_at"`
UpdatedAt
time
.
Time
`json:"updated_at"`
DeletedAt
*
time
.
Time
`json:"deleted_at"`
}
deploy/dynemo/api-server/api/schemas/cluster.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
ClusterSchema
struct
{
ResourceSchema
Creator
*
UserSchema
`json:"creator"`
Description
string
`json:"description"`
}
type
ClusterListSchema
struct
{
BaseListSchema
Items
[]
*
ClusterSchema
`json:"items"`
}
type
ClusterFullSchema
struct
{
ClusterSchema
Organization
*
OrganizationSchema
`json:"organization"`
KubeConfig
*
string
`json:"kube_config"`
}
type
UpdateClusterSchema
struct
{
Description
*
string
`json:"description"`
KubeConfig
*
string
`json:"kube_config"`
}
type
CreateClusterSchema
struct
{
Description
string
`json:"description"`
KubeConfig
string
`json:"kube_config"`
Name
string
`json:"name"`
}
type
GetClusterSchema
struct
{
ClusterName
string
`uri:"clusterName" binding:"required"`
}
deploy/dynemo/api-server/api/schemas/compound_ai.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
CompoundNimApiSchema
struct
{
Route
string
`json:"route"`
Doc
string
`json:"doc"`
Input
string
`json:"input"`
Output
string
`json:"output"`
}
type
CompoundNimManifestSchema
struct
{
Service
string
`json:"service"`
CompoundAiVersion
string
`json:"bentoml_version"`
Apis
map
[
string
]
CompoundNimApiSchema
`json:"apis"`
SizeBytes
uint
`json:"size_bytes"`
}
type
TransmissionStrategy
string
const
(
TransmissionStrategyPresignedURL
TransmissionStrategy
=
"presigned_url"
TransmissionStrategyProxy
TransmissionStrategy
=
"proxy"
)
type
CompoundNimVersionUploadStatus
string
const
(
CompoundNimVersionUploadStatusPending
CompoundNimVersionUploadStatus
=
"pending"
CompoundNimVersionUploadStatusUploading
CompoundNimVersionUploadStatus
=
"uploading"
CompoundNimVersionUploadStatusSuccess
CompoundNimVersionUploadStatus
=
"success"
CompoundNimVersionUploadStatusFailed
CompoundNimVersionUploadStatus
=
"failed"
)
type
ImageBuildStatus
string
const
(
ImageBuildStatusPending
ImageBuildStatus
=
"pending"
ImageBuildStatusBuilding
ImageBuildStatus
=
"building"
ImageBuildStatusSuccess
ImageBuildStatus
=
"success"
ImageBuildStatusFailed
ImageBuildStatus
=
"failed"
)
deploy/dynemo/api-server/api/schemas/compound_component.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
import
(
"database/sql/driver"
"encoding/json"
"time"
)
type
CompoundComponentName
string
const
(
CompoundComponentNameDeployment
CompoundComponentName
=
"deployment"
CompoundComponentNameImageBuilder
CompoundComponentName
=
"image-builder"
CompoundComponentNameFunction
CompoundComponentName
=
"function"
CompoundComponentNameJob
CompoundComponentName
=
"job"
)
type
CompoundComponentManifestSchema
struct
{
SelectorLabels
map
[
string
]
string
`json:"selector_labels,omitempty"`
LatestCRDVersion
string
`json:"latest_crd_version,omitempty"`
}
func
(
c
*
CompoundComponentManifestSchema
)
Scan
(
value
interface
{})
error
{
if
value
==
nil
{
return
nil
}
return
json
.
Unmarshal
(
value
.
([]
byte
),
c
)
}
func
(
c
*
CompoundComponentManifestSchema
)
Value
()
(
driver
.
Value
,
error
)
{
if
c
==
nil
{
return
nil
,
nil
}
return
json
.
Marshal
(
c
)
}
type
RegisterCompoundComponentSchema
struct
{
Name
CompoundComponentName
`json:"name"`
Version
string
`json:"version"`
KubeNamespace
string
`json:"kube_namespace"`
SelectorLabels
map
[
string
]
string
`json:"selector_labels,omitempty"`
Manifest
*
CompoundComponentManifestSchema
`json:"manifest"`
}
type
CompoundComponentSchema
struct
{
ResourceSchema
Creator
*
UserSchema
`json:"creator"`
Cluster
*
ClusterFullSchema
`json:"cluster"`
Description
string
`json:"description"`
Version
string
`json:"version"`
KubeNamespace
string
`json:"kube_namespace"`
Manifest
*
CompoundComponentManifestSchema
`json:"manifest"`
LatestInstalledAt
*
time
.
Time
`json:"latest_installed_at"`
LatestHeartbeatAt
*
time
.
Time
`json:"latest_heartbeat_at"`
}
deploy/dynemo/api-server/api/schemas/compound_nim.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
CompoundNimSchema
struct
{
ResourceSchema
Creator
*
UserSchema
`json:"creator"`
Organization
*
OrganizationSchema
`json:"organization"`
LatestCompoundNimVersion
*
CompoundNimVersionSchema
`json:"latest_bento"`
NCompoundNimVersions
uint
`json:"n_bentos"`
NDeployments
uint
`json:"n_deployments"`
LatestCompoundNimVersions
[]
*
CompoundNimVersionSchema
`json:"latest_bentos"`
Description
string
`json:"description"`
}
type
GetCompoundNimSchema
struct
{
CompoundNimName
string
`uri:"compoundNimName" binding:"required"`
}
deploy/dynemo/api-server/api/schemas/compound_nim_version.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
import
"time"
type
CompoundNimVersionSchema
struct
{
ResourceSchema
CompoundNimUid
string
`json:"bento_repository_uid"`
Creator
*
UserSchema
`json:"creator"`
Version
string
`json:"version"`
Description
string
`json:"description"`
ImageBuildStatus
ImageBuildStatus
`json:"image_build_status"`
UploadStatus
CompoundNimVersionUploadStatus
`json:"upload_status"`
UploadStartedAt
*
time
.
Time
`json:"upload_started_at"`
UploadFinishedAt
*
time
.
Time
`json:"upload_finished_at"`
UploadFinishedReason
string
`json:"upload_finished_reason"`
PresignedUploadUrl
string
`json:"presigned_upload_url"`
PresignedDownloadUrl
string
`json:"presigned_download_url"`
PresignedUrlsDeprecated
bool
`json:"presigned_urls_deprecated"`
TransmissionStrategy
TransmissionStrategy
`json:"transmission_strategy"`
UploadId
string
`json:"upload_id"`
Manifest
*
CompoundNimManifestSchema
`json:"manifest"`
BuildAt
time
.
Time
`json:"build_at"`
}
type
CompoundNimVersionFullSchema
struct
{
CompoundNimVersionSchema
Repository
*
CompoundNimSchema
`json:"repository"`
}
type
GetCompoundNimVersionSchema
struct
{
GetCompoundNimSchema
CompoundNimVersion
string
`uri:"version" binding:"required"`
}
func
(
s
*
GetCompoundNimVersionSchema
)
Tag
()
*
string
{
tag
:=
s
.
CompoundNimName
+
":"
+
s
.
CompoundNimVersion
return
&
tag
}
deploy/dynemo/api-server/api/schemas/deployment.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
DeploymentSchema
struct
{
ResourceSchema
Creator
*
UserSchema
`json:"creator"`
Cluster
*
ClusterFullSchema
`json:"cluster"`
Status
DeploymentStatus
`json:"status" enum:"unknown,non-deployed,running,unhealthy,failed,deploying"`
URLs
[]
string
`json:"urls"`
LatestRevision
*
DeploymentRevisionSchema
`json:"latest_revision"`
KubeNamespace
string
`json:"kube_namespace"`
}
type
DeploymentListSchema
struct
{
BaseListSchema
Items
[]
*
DeploymentSchema
`json:"items"`
}
type
UpdateDeploymentSchema
struct
{
Targets
[]
*
CreateDeploymentTargetSchema
`json:"targets"`
Description
*
string
`json:"description,omitempty"`
DoNotDeploy
bool
`json:"do_not_deploy,omitempty"`
}
type
CreateDeploymentSchema
struct
{
Name
string
`json:"name"`
KubeNamespace
string
`json:"kube_namespace"`
UpdateDeploymentSchema
}
type
GetDeploymentSchema
struct
{
GetClusterSchema
DeploymentName
string
`uri:"deploymentName" binding:"required"`
KubeNamespace
string
`uri:"kubeNamespace" binding:"required"`
}
deploy/dynemo/api-server/api/schemas/deployment_revision.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
DeploymentRevisionSchema
struct
{
ResourceSchema
Creator
*
UserSchema
`json:"creator"`
Status
DeploymentRevisionStatus
`json:"status" enum:"active,inactive"`
Targets
[]
*
DeploymentTargetSchema
`json:"targets"`
}
type
DeploymentRevisionListSchema
struct
{
BaseListSchema
Items
[]
*
DeploymentRevisionSchema
`json:"items"`
}
type
GetDeploymentRevisionSchema
struct
{
GetDeploymentSchema
RevisionUid
string
`uri:"revisionUid" binding:"required"`
}
deploy/dynemo/api-server/api/schemas/deployment_revision_status.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
DeploymentRevisionStatus
string
const
(
DeploymentRevisionStatusActive
DeploymentRevisionStatus
=
"active"
DeploymentRevisionStatusInactive
DeploymentRevisionStatus
=
"inactive"
)
func
(
d
DeploymentRevisionStatus
)
Ptr
()
*
DeploymentRevisionStatus
{
return
&
d
}
func
DeploymentRevisionStatusPtr
(
status
DeploymentRevisionStatus
)
*
DeploymentRevisionStatus
{
return
status
.
Ptr
()
}
deploy/dynemo/api-server/api/schemas/deployment_status.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
DeploymentStatus
string
const
(
DeploymentStatusUnknown
DeploymentStatus
=
"unknown"
DeploymentStatusNonDeployed
DeploymentStatus
=
"non-deployed"
DeploymentStatusRunning
DeploymentStatus
=
"running"
DeploymentStatusUnhealthy
DeploymentStatus
=
"unhealthy"
DeploymentStatusFailed
DeploymentStatus
=
"failed"
DeploymentStatusDeploying
DeploymentStatus
=
"deploying"
DeploymentStatusTerminating
DeploymentStatus
=
"terminating"
DeploymentStatusTerminated
DeploymentStatus
=
"terminated"
DeploymentStatusImageBuilding
DeploymentStatus
=
"image-building"
DeploymentStatusImageBuildFailed
DeploymentStatus
=
"image-build-failed"
DeploymentStatusImageBuildSucceeded
DeploymentStatus
=
"image-build-succeeded"
)
func
(
d
DeploymentStatus
)
Ptr
()
*
DeploymentStatus
{
return
&
d
}
deploy/dynemo/api-server/api/schemas/deployment_target.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
import
(
"database/sql/driver"
"encoding/json"
"fmt"
)
type
DeploymentTargetType
string
const
(
DeploymentTargetTypeStable
DeploymentTargetType
=
"stable"
DeploymentTargetTypeCanary
DeploymentTargetType
=
"canary"
)
type
DeploymentStrategy
string
const
(
DeploymentStrategyRollingUpdate
DeploymentStrategy
=
"RollingUpdate"
DeploymentStrategyRecreate
DeploymentStrategy
=
"Recreate"
DeploymentStrategyRampedSlowRollout
DeploymentStrategy
=
"RampedSlowRollout"
DeploymentStrategyBestEffortControlledRollout
DeploymentStrategy
=
"BestEffortControlledRollout"
)
var
DeploymentTargetTypeAddrs
=
map
[
DeploymentTargetType
]
string
{
DeploymentTargetTypeStable
:
"stb"
,
DeploymentTargetTypeCanary
:
"cnr"
,
}
type
DeploymentTargetHPAConf
struct
{
CPU
*
int32
`json:"cpu,omitempty"`
GPU
*
int32
`json:"gpu,omitempty"`
Memory
*
string
`json:"memory,omitempty"`
QPS
*
int64
`json:"qps,omitempty"`
MinReplicas
*
int32
`json:"min_replicas,omitempty"`
MaxReplicas
*
int32
`json:"max_replicas,omitempty"`
}
type
DeploymentOverrides
struct
{
ColdStartTimeout
*
int32
`json:"cold_start_timeout"`
}
type
DeploymentTargetConfig
struct
{
KubeResourceUid
string
`json:"kubeResourceUid"`
KubeResourceVersion
string
`json:"kubeResourceVersion"`
Resources
*
Resources
`json:"resources"`
HPAConf
*
DeploymentTargetHPAConf
`json:"hpa_conf,omitempty"`
EnableIngress
*
bool
`json:"enable_ingress,omitempty"`
EnableStealingTrafficDebugMode
*
bool
`json:"enable_stealing_traffic_debug_mode,omitempty"`
EnableDebugMode
*
bool
`json:"enable_debug_mode,omitempty"`
EnableDebugPodReceiveProductionTraffic
*
bool
`json:"enable_debug_pod_receive_production_traffic,omitempty"`
DeploymentStrategy
*
DeploymentStrategy
`json:"deployment_strategy,omitempty"`
ExternalServices
map
[
string
]
ExternalService
`json:"external_services,omitempty"`
DeploymentOverrides
*
DeploymentOverrides
`json:"DeploymentOverrides,omitempty"`
}
type
CreateDeploymentTargetSchema
struct
{
CompoundNim
string
`json:"bento_repository"`
Version
string
`json:"bento"`
Config
*
DeploymentTargetConfig
`json:"config"`
}
func
(
c
*
DeploymentTargetConfig
)
Scan
(
value
interface
{})
error
{
if
value
==
nil
{
return
nil
}
var
data
[]
byte
switch
v
:=
value
.
(
type
)
{
case
string
:
data
=
[]
byte
(
v
)
case
[]
byte
:
data
=
v
default
:
return
fmt
.
Errorf
(
"unsupported type: %T"
,
value
)
}
return
json
.
Unmarshal
(
data
,
c
)
}
func
(
c
*
DeploymentTargetConfig
)
Value
()
(
driver
.
Value
,
error
)
{
if
c
==
nil
{
return
nil
,
nil
}
return
json
.
Marshal
(
c
)
}
type
DeploymentTargetTypeSchema
struct
{
Type
string
`json:"type" enum:"stable,canary"`
}
type
DeploymentTargetSchema
struct
{
ResourceSchema
DeploymentTargetTypeSchema
Creator
*
UserSchema
`json:"creator"`
CompoundNimVersion
*
CompoundNimVersionFullSchema
`json:"bento"`
Config
*
DeploymentTargetConfig
`json:"config"`
}
type
DeploymentTargetListSchema
struct
{
BaseListSchema
Items
[]
*
DeploymentTargetSchema
`json:"items"`
}
deploy/dynemo/api-server/api/schemas/event.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
import
(
"time"
)
type
EventStatus
string
const
(
EventStatusPending
EventStatus
=
"pending"
EventStatusSuccess
EventStatus
=
"success"
EventStatusFailed
EventStatus
=
"failed"
)
type
EventSchema
struct
{
BaseSchema
Resource
interface
{}
`json:"resource,omitempty"`
Name
string
`json:"name,omitempty"`
Status
EventStatus
`json:"status,omitempty"`
OperationName
string
`json:"operation_name,omitempty"`
ApiTokenName
string
`json:"api_token_name,omitempty"`
Creator
*
UserSchema
`json:"creator,omitempty"`
CreatedAt
time
.
Time
`json:"created_at,omitempty"`
ResourceDeleted
bool
`json:"resource_deleted,omitempty"`
}
type
EventListSchema
struct
{
BaseListSchema
Items
[]
*
EventSchema
`json:"items"`
}
deploy/dynemo/api-server/api/schemas/external_service.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
import
(
"encoding/json"
)
type
ExternalService
struct
{
DeploymentSelectorKey
string
`json:"-"`
DeploymentSelectorValue
string
`json:"-"`
}
// UnmarshalJSON handles snake_case to struct mapping
func
(
e
*
ExternalService
)
UnmarshalJSON
(
data
[]
byte
)
error
{
var
temp
map
[
string
]
interface
{}
if
err
:=
json
.
Unmarshal
(
data
,
&
temp
);
err
!=
nil
{
return
err
}
if
val
,
ok
:=
temp
[
"deployment_selector_key"
]
.
(
string
);
ok
{
e
.
DeploymentSelectorKey
=
val
}
if
val
,
ok
:=
temp
[
"deployment_selector_value"
]
.
(
string
);
ok
{
e
.
DeploymentSelectorValue
=
val
}
return
nil
}
// MarshalJSON converts the struct to camelCase
func
(
e
ExternalService
)
MarshalJSON
()
([]
byte
,
error
)
{
temp
:=
map
[
string
]
interface
{}{
"deploymentSelectorKey"
:
e
.
DeploymentSelectorKey
,
"deploymentSelectorValue"
:
e
.
DeploymentSelectorValue
,
}
return
json
.
Marshal
(
temp
)
}
deploy/dynemo/api-server/api/schemas/label.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
LabelItemSchema
struct
{
Key
string
`json:"key"`
Value
string
`json:"value"`
}
deploy/dynemo/api-server/api/schemas/list.go
deleted
100644 → 0
View file @
ecf53ce2
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
schemas
type
BaseListSchema
struct
{
Total
uint
`json:"total"`
Start
uint
`json:"start"`
Count
uint
`json:"count"`
}
type
ListQuerySchema
struct
{
Start
uint
`form:"start"`
Count
uint
`form:"count"`
Search
*
string
`form:"search"`
Q
string
`query:"q"`
}
Prev
1
…
5
6
7
8
9
10
11
12
13
…
22
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment