generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #383 from Jougan-0/GetHostsFromDatabase
feat:retrieve registrants and number of models components relationshi…
- Loading branch information
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package v1alpha1 | ||
|
||
import "github.com/google/uuid" | ||
|
||
type MeshModelHostsWithEntitySummary struct { | ||
ID uuid.UUID `json:"id"` | ||
Hostname string `json:"hostname"` | ||
Port int `json:"port"` | ||
Summary EntitySummary `json:"summary"` | ||
} | ||
type EntitySummary struct { | ||
Models int64 `json:"models"` | ||
Components int64 `json:"components"` | ||
Relationships int64 `json:"relationships"` | ||
Policies int64 `json:"policies"` | ||
} | ||
type MesheryHostSummaryDB struct { | ||
HostID uuid.UUID `json:"-" gorm:"id"` | ||
Hostname string `json:"-" gorm:"hostname"` | ||
Port int `json:"-" gorm:"port"` | ||
Models int64 `json:"-" gorm:"models"` | ||
Components int64 `json:"-" gorm:"components"` | ||
Relationships int64 `json:"-" gorm:"relationships"` | ||
Policies int64 `json:"-" gorm:"policies"` | ||
} | ||
|
||
type HostFilter struct { | ||
Name string | ||
Greedy bool //when set to true - instead of an exact match, name will be prefix matched | ||
Trim bool //when set to true - the schema is not returned | ||
DisplayName string | ||
Version string | ||
Sort string //asc or desc. Default behavior is asc | ||
OrderOn string | ||
Limit int //If 0 or unspecified then all records are returned and limit is not used | ||
Offset int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters