Files
decort-golang-sdk/pkg/cloudapi/lb/models.go

260 lines
4.4 KiB
Go
Raw Normal View History

2022-10-03 16:56:47 +03:00
package lb
2022-12-22 17:56:47 +03:00
// Detailed information about load balancer
type RecordLB struct {
//HAMode
HAMode bool `json:"HAmode"`
// Access Control List
2023-09-29 12:28:16 +03:00
ACL interface{} `json:"acl"`
2023-09-24 12:11:31 +03:00
2025-07-15 17:39:18 +03:00
//Account ID
AccountID uint64 `json:"accountId"`
2023-09-24 12:11:31 +03:00
// BackendHAIP
BackendHAIP string `json:"backendHAIP"`
2022-12-22 17:56:47 +03:00
// List of load balancer backends
Backends ListBackends `json:"backends"`
// Created by
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Deleted by
DeletedBy string `json:"deletedBy"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Description
Description string `json:"desc"`
// DPAPIUser
DPAPIUser string `json:"dpApiUser"`
// External network ID
2024-11-12 12:51:21 +03:00
ExtNetID int64 `json:"extnetId"`
2022-12-22 17:56:47 +03:00
2023-09-24 12:11:31 +03:00
// FrontendHAIP
FrontendHAIP string `json:"frontendHAIP"`
2022-12-22 17:56:47 +03:00
// List of load balancer frontends
Frontends ListFrontends `json:"frontends"`
// Grid ID
GID uint64 `json:"gid"`
// GUID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
2024-04-16 14:26:06 +03:00
// ManagerId
ManagerId uint64 `json:"managerId"`
// ManagerType
ManagerType string `json:"managerType"`
2022-12-22 17:56:47 +03:00
// Image ID
ImageID uint64 `json:"imageId"`
// Milestones
Milestones uint64 `json:"milestones"`
// Name
Name string `json:"name"`
2023-09-24 12:11:31 +03:00
// Part K8s
PartK8s bool `json:"partK8s"`
2022-12-22 17:56:47 +03:00
// Primary node
PrimaryNode RecordNode `json:"primaryNode"`
// Resource group ID
RGID uint64 `json:"rgId"`
// Resource group name
RGName string `json:"rgName"`
// Secondary node
SecondaryNode RecordNode `json:"secondaryNode"`
// Status
Status string `json:"status"`
2023-09-24 12:11:31 +03:00
// Sysctl Params
2025-07-15 17:39:18 +03:00
SysctlParams map[string]string `json:"sysctlParams"`
2023-09-24 12:11:31 +03:00
2022-12-22 17:56:47 +03:00
// Tech status
TechStatus string `json:"techStatus"`
// Updated by
UpdatedBy string `json:"updatedBy"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
2024-04-16 14:26:06 +03:00
// UserManaged
UserManaged bool `json:"userManaged"`
2022-12-22 17:56:47 +03:00
// VINS ID
VINSID uint64 `json:"vinsId"`
2025-07-15 17:39:18 +03:00
// Zone ID
ZoneID uint64 `json:"zoneId"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// Main information about load balancer
type ItemLoadBalancer struct {
// DPAPIPassword
2022-10-03 16:56:47 +03:00
DPAPIPassword string `json:"dpApiPassword"`
2022-12-22 17:56:47 +03:00
// Detailed information about load balancer
RecordLB
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of load balancers
2023-07-07 12:40:03 +03:00
type ListLB struct {
// Data
Data []ItemLoadBalancer `json:"data"`
// EntryCount
EntryCount uint64 `json:"entryCount"`
}
2022-12-22 17:56:47 +03:00
// Main information about backend
type ItemBackend struct {
// Algorithm
Algorithm string `json:"algorithm"`
// GUID
GUID string `json:"guid"`
// Name
Name string `json:"name"`
// Server settings
ServerDefaultSettings RecordServerSettings `json:"serverDefaultSettings"`
// List of servers
Servers ListServers `json:"servers"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of backends
type ListBackends []ItemBackend
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// Server settings
type RecordServerSettings struct {
// Inter
Inter uint64 `json:"inter"`
// GUID
GUID string `json:"guid"`
// DownInter
2022-10-03 16:56:47 +03:00
DownInter uint64 `json:"downinter"`
2022-12-22 17:56:47 +03:00
// Rise
Rise uint64 `json:"rise"`
// Fall
Fall uint64 `json:"fall"`
// SlowStart
2022-10-03 16:56:47 +03:00
SlowStart uint64 `json:"slowstart"`
2022-12-22 17:56:47 +03:00
// Max connections
MaxConn uint64 `json:"maxconn"`
// Max queue
MaxQueue uint64 `json:"maxqueue"`
// Weight
Weight uint64 `json:"weight"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// Main information about server
type ItemServer struct {
// Address
Address string `json:"address"`
// Check
Check string `json:"check"`
// GUID
GUID string `json:"guid"`
// Name
Name string `json:"name"`
// Port
Port uint64 `json:"port"`
// Server settings
ServerSettings RecordServerSettings `json:"serverSettings"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of servers
type ListServers []ItemServer
// Main information about node
type RecordNode struct {
// Backend IP
BackendIP string `json:"backendIp"`
// Compute ID
ComputeID uint64 `json:"computeId"`
// Frontend IP
2022-10-03 16:56:47 +03:00
FrontendIP string `json:"frontendIp"`
2022-12-22 17:56:47 +03:00
// GUID
GUID string `json:"guid"`
// MGMTIP
MGMTIP string `json:"mgmtIp"`
// Network ID
NetworkID uint64 `json:"networkId"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// Main information about frontend
type ItemFrontend struct {
// Backend
Backend string `json:"backend"`
// List of bindings
Bindings ListBindings `json:"bindings"`
// GUID
GUID string `json:"guid"`
// Name
Name string `json:"name"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of frontends
type ListFrontends []ItemFrontend
// Main information about bindings
type ItemBinding struct {
// Address
2022-10-03 16:56:47 +03:00
Address string `json:"address"`
2022-12-22 17:56:47 +03:00
// GUID
GUID string `json:"guid"`
// Name
Name string `json:"name"`
// Port
Port uint64 `json:"port"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of bindings
type ListBindings []ItemBinding