organize models

This commit is contained in:
Ryan McKinley
2025-06-27 16:03:24 -07:00
parent 94eea040e2
commit 60981e813b
5 changed files with 12 additions and 81 deletions
+9 -6
View File
@@ -156,8 +156,8 @@ type AddDataSourceCommand struct {
Type string `json:"type" binding:"Required"`
Access DsAccess `json:"access" binding:"Required"`
URL string `json:"url"`
Database string `json:"database"`
User string `json:"user"`
Database string `json:"database"`
BasicAuth bool `json:"basicAuth"`
BasicAuthUser string `json:"basicAuthUser"`
WithCredentials bool `json:"withCredentials"`
@@ -166,9 +166,9 @@ type AddDataSourceCommand struct {
SecureJsonData map[string]string `json:"secureJsonData"`
UID string `json:"uid"`
// swagger:ignore
APIVersion string `json:"apiVersion"`
APIVersion string `json:"apiVersion,omitempty"`
// swagger:ignore
IsPrunable bool
IsPrunable bool `json:"-"`
OrgID int64 `json:"-"`
UserID int64 `json:"-"`
@@ -191,12 +191,15 @@ type UpdateDataSourceCommand struct {
IsDefault bool `json:"isDefault"`
JsonData *simplejson.Json `json:"jsonData"`
SecureJsonData map[string]string `json:"secureJsonData"`
Version int `json:"version"`
UID string `json:"uid"`
// swagger:ignore
APIVersion string `json:"apiVersion"`
APIVersion string `json:"apiVersion,omitempty"`
// swagger:ignore
IsPrunable bool
IsPrunable bool `json:"-"`
// Everything above is identical in AddDataSourceCommand
// The previous version -- used for optimistic locking
Version int `json:"version"`
OrgID int64 `json:"-"`
ID int64 `json:"-"`