111 lines
2.8 KiB
Go
111 lines
2.8 KiB
Go
package models
|
|
|
|
import (
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
)
|
|
|
|
type User struct {
|
|
ID string `json:"id,omitempty"`
|
|
Username string `json:"username"`
|
|
Email string `json:"email"`
|
|
Password string `json:"password,omitempty"`
|
|
}
|
|
|
|
type Cluster struct {
|
|
ID primitive.ObjectID `bson:"_id,omitempty"`
|
|
Name string `json:"name"`
|
|
Namespace string `json:"namespace"`
|
|
ControlPlane string `json:"controlPlane"`
|
|
PlatformVersion string `json:"platformversion`
|
|
Cpu string `json:"cpu"`
|
|
Memory string `json:"memory"`
|
|
CreatedAt string `json:"createdAt"`
|
|
UserID primitive.ObjectID `json:"userId"`
|
|
Cluster_config string `json:"clusterconfig"`
|
|
}
|
|
|
|
type Header struct {
|
|
Authorization string `bson:"token"`
|
|
}
|
|
|
|
type Pod struct {
|
|
Name string `json:name`
|
|
Namespace string `json:name`
|
|
Status string `json:status`
|
|
Restart int32 `json:restart`
|
|
Age string `json:age`
|
|
}
|
|
|
|
type Service struct {
|
|
Name string `json:name`
|
|
Namespace string `json:name`
|
|
Type string `json:type`
|
|
ClusterIP string `json:clusterIp`
|
|
ExternalIP string `json:externalIp`
|
|
Ports string `json:ports`
|
|
Age string `json:age`
|
|
}
|
|
|
|
type Deployment struct {
|
|
Name string `json:name`
|
|
Namespace string `json:namespace`
|
|
Available string `json:available`
|
|
Replicas int32 `json:replicas`
|
|
Message string `json:message`
|
|
Reason string `json:reason`
|
|
}
|
|
|
|
type Daemonset struct {
|
|
Name string `json:name`
|
|
Namespace string `json:namespace`
|
|
Ready int32 `json:Ready`
|
|
Age string `json:age`
|
|
DESIRED int32 `json:desired`
|
|
CURRENT int32 `json:current`
|
|
UpdateToDate int32 `json:uptodate`
|
|
Available int32 `json:available`
|
|
Node string `json:node`
|
|
Selector string `json:selector`
|
|
}
|
|
|
|
type Jobs struct {
|
|
Namespace string `json:name`
|
|
Name string `json:name`
|
|
Status string `json:status`
|
|
Completion string `json:completion`
|
|
Duration string `json:duration`
|
|
Age string `json:age`
|
|
}
|
|
|
|
type Replicaset struct {
|
|
Name string `json:name`
|
|
Desired int32 `json:desired`
|
|
Current int32 `json:current`
|
|
Ready int32 `json:Ready`
|
|
Age string `json:age`
|
|
Namespace string `json:name`
|
|
}
|
|
|
|
type ReplicationController struct {
|
|
Namespace string `json:name`
|
|
Name string `json:name`
|
|
Desired int32 `json:desired`
|
|
Current int32 `json:current`
|
|
Ready int32 `json:Ready`
|
|
Age string `json:age`
|
|
}
|
|
|
|
type StatefulSet struct {
|
|
Namespace string `json:name`
|
|
Name string `json:name`
|
|
Ready string `json:Ready`
|
|
Age string `json:age`
|
|
}
|
|
|
|
type WorkerNodesPlans struct {
|
|
Plan string `json:plan`
|
|
Cpu string `json:cpu`
|
|
Memory string `json:memory`
|
|
Storage string `;sjon:storage`
|
|
}
|