schema

package
v0.0.0-...-27647ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created time.Time         `json:"created"`
	Labels  map[string]string `json:"labels"`

	Type CertificateType `json:"type"`

	Certificate string `json:"certificate"`
	Fingerprint string `json:"fingerprint"`

	NotValidBefore time.Time `json:"not_valid_before"`
	NotValidAfter  time.Time `json:"not_valid_after"`

	DomainNames []string `json:"domain_names"`

	Status *CertificateStatus     `json:"status"`
	UsedBy []CertificateUsedByRef `json:"used_by"`
}

type CertificateStatus

type CertificateStatus struct {
	Issuance CertificateStatusType `json:"issuance"`
	Renewal  CertificateStatusType `json:"renewal"`

	Error *Error `json:"error"`
}

type CertificateStatusType

type CertificateStatusType string
const (
	CertificateStatusTypePending     CertificateStatusType = "pending"
	CertificateStatusTypeFailed      CertificateStatusType = "failed"
	CertificateStatusTypeCompleted   CertificateStatusType = "completed"
	CertificateStatusTypeScheduled   CertificateStatusType = "scheduled"
	CertificateStatusTypeUnavailable CertificateStatusType = "unavailable"
)

type CertificateType

type CertificateType string
const (
	CertificateTypeUploaded CertificateType = "uploaded"
	CertificateTypeManaged  CertificateType = "managed"
)

type CertificateUsedByRef

type CertificateUsedByRef struct {
	Id int `json:"id"`

	Type CertificateUsedByRefType `json:"type"`
}

type CertificateUsedByRefType

type CertificateUsedByRefType string
const (
	CertificateUsedByRefTypeLoadBalancer CertificateUsedByRefType = "load_balancer"
)

type CpuType

type CpuType string
const (
	CpuTypeShared    CpuType = "shared"
	CpuTypeDedicated CpuType = "dedicated"
)

type Datacenter

type Datacenter struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Description string `json:"description"`

	Location *Location `json:"location"`

	ServerTypes DatacenterServerTypes `json:"server_types"`
}

type DatacenterServerTypes

type DatacenterServerTypes struct {
	Supported []int `json:"supported"`
	Available []int `json:"available"`
}

type Error

type Error struct {
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
	Details any       `json:"details"`
}

type ErrorCode

type ErrorCode string

type Firewall

type Firewall struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created time.Time         `json:"created"`
	Labels  map[string]string `json:"labels"`

	Rules     []FirewallRule     `json:"rules"`
	AppliedTo []FirewallResource `json:"applied_to"`
}

type FirewallResource

type FirewallResource struct {
	Type          FirewallResourceType           `json:"type"`
	Server        *FirewallResourceServer        `json:"server"`
	LabelSelector *FirewallResourceLabelSelector `json:"label_selector"`
}

type FirewallResourceLabelSelector

type FirewallResourceLabelSelector struct {
	Selector string `json:"selector"`
}

type FirewallResourceServer

type FirewallResourceServer struct {
	Id int `json:"id"`
}

type FirewallResourceType

type FirewallResourceType string
const (
	FirewallResourceTypeServer        FirewallResourceType = "server"
	FirewallResourceTypeLabelSelector FirewallResourceType = "label_selector"
)

type FirewallRule

type FirewallRule struct {
	Protocol FirewallRuleProtocol `json:"protocol"`
	Port     *string              `json:"port"`

	Direction FirewallRuleDirection `json:"direction"`

	SourceIps      []net.IPNet `json:"source_ips"`
	DestinationIps []net.IPNet `json:"destination_ips"`

	Description *string `json:"description"`
}

type FirewallRuleDirection

type FirewallRuleDirection string
const (
	FirewallRuleDirectionIn  FirewallRuleDirection = "in"
	FirewallRuleDirectionOut FirewallRuleDirection = "out"
)

type FirewallRuleProtocol

type FirewallRuleProtocol string
const (
	FirewallRuleProtocolTCP  FirewallRuleProtocol = "tcp"
	FirewallRuleProtocolUDP  FirewallRuleProtocol = "udp"
	FirewallRuleProtocolICMP FirewallRuleProtocol = "icmp"
	FirewallRuleProtocolESP  FirewallRuleProtocol = "esp"
	FirewallRuleProtocolGRE  FirewallRuleProtocol = "gre"
)

type FloatingIp

type FloatingIp struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created     time.Time         `json:"created"`
	Description string            `json:"description"`
	Labels      map[string]string `json:"labels"`

	Ip net.IP `json:"ip"`

	Network *net.IPNet `json:"network"`

	Type FloatingIpType `json:"type"`

	Server *Server `json:"server"`

	DnsPtr any `json:"dns_ptr"`

	HomeLocation *Location `json:"home_location"`

	Blocked bool `json:"blocked"`
}

type FloatingIpType

type FloatingIpType string
const (
	FloatingIpTypeIpV4 FloatingIpType = "ipv4"
	FloatingIpTypeIpV6 FloatingIpType = "ipv6"
)

type Image

type Image struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Type   ImageType   `json:"type"`
	Status ImageStatus `json:"status"`

	Created     time.Time         `json:"created"`
	Description string            `json:"description"`
	Labels      map[string]string `json:"labels"`

	ImageSize float32 `json:"image_size"`
	DiskSize  float32 `json:"disk_size"`

	CreatedFrom *Server `json:"created_from"`
	BoundTo     *Server `json:"bound_to"`

	RapidDeploy bool `json:"rapid_deploy"`

	OsFlavor  string `json:"os_flavor"`
	OsVersion string `json:"os_version"`

	Deprecated time.Time `json:"deprecated"`
}

type ImageStatus

type ImageStatus string
const (
	ImageStatusCreating  ImageStatus = "creating"
	ImageStatusAvailable ImageStatus = "available"
)

type ImageType

type ImageType string
const (
	ImageTypeSnapshot ImageType = "snapshot"
	ImageTypeBackup   ImageType = "backup"
	ImageTypeSystem   ImageType = "system"
	ImageTypeApp      ImageType = "app"
)

type Iso

type Iso struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Description string `json:"description"`

	Type IsoType `json:"type"`

	Deprecated time.Time `json:"deprecated"`
}

type IsoType

type IsoType string
const (
	IsoTypePublic  IsoType = "public"
	IsoTypePrivate IsoType = "private"
)

type LoadBalancer

type LoadBalancer struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created time.Time         `json:"created"`
	Labels  map[string]string `json:"labels"`

	PublicNet  LoadBalancerPublicNet    `json:"public_net"`
	PrivateNet []LoadBalancerPrivateNet `json:"private_net"`

	Location *Location `json:"location"`

	LoadBalancerType *LoadBalancerType `json:"load_balancer_type"`

	Algorithm LoadBalancerAlgorithm `json:"algorithm"`

	Services []LoadBalancerService `json:"services"`
	Targets  []LoadBalancerTarget  `json:"targets"`

	IncludedTraffic uint64 `json:"included_traffic"`
	OutgoingTraffic uint64 `json:"outgoing_traffic"`
	IngoingTraffic  uint64 `json:"ingoing_traffic"`
}

type LoadBalancerAlgorithm

type LoadBalancerAlgorithm struct {
	Type LoadBalancerAlgorithmType `json:"type"`
}

type LoadBalancerAlgorithmType

type LoadBalancerAlgorithmType string
const (
	LoadBalancerAlgorithmTypeRoundRobin       LoadBalancerAlgorithmType = "round_robin"
	LoadBalancerAlgorithmTypeLeastConnections LoadBalancerAlgorithmType = "least_connections"
)

type LoadBalancerPrivateNet

type LoadBalancerPrivateNet struct {
	Ip      net.IP   `json:"ip"`
	Network *Network `json:"network"`
}

type LoadBalancerPublicNet

type LoadBalancerPublicNet struct {
	Enabled bool `json:"enabled"`

	IpV4 LoadBalancerPublicNetIpV4 `json:"ipv4"`
	IpV6 LoadBalancerPublicNetIpV6 `json:"ipv6"`
}

type LoadBalancerPublicNetIpV4

type LoadBalancerPublicNetIpV4 struct {
	Ip     net.IP `json:"ip"`
	DnsPtr any    `json:"dns_ptr"`
}

type LoadBalancerPublicNetIpV6

type LoadBalancerPublicNetIpV6 struct {
	Ip     net.IP `json:"ip"`
	DnsPtr any    `json:"dns_ptr"`
}

type LoadBalancerService

type LoadBalancerService struct {
	Protocol LoadBalancerServiceProtocol `json:"protocol"`

	ListenPort      int `json:"listen_port"`
	DestinationPort int `json:"destination_port"`

	ProxyProtocol bool `json:"proxy_protocol"`

	Http LoadBalancerServiceHTTP `json:"http"`

	HealthCheck LoadBalancerServiceHealthCheck `json:"health_check"`
}

type LoadBalancerServiceHTTP

type LoadBalancerServiceHTTP struct {
	CookieName     string        `json:"cookie_name"`
	CookieLifetime time.Duration `json:"cookie_lifetime"`

	Certificates []*Certificate `json:"certificates"`

	RedirectHTTP bool `json:"redirect_http"`

	StickySessions bool `json:"sticky_sessions"`
}

type LoadBalancerServiceHealthCheck

type LoadBalancerServiceHealthCheck struct {
	Protocol LoadBalancerServiceProtocol `json:"protocol"`

	Port int `json:"port"`

	Interval time.Duration `json:"interval"`
	Timeout  time.Duration `json:"timeout"`

	Retries int `json:"retries"`

	Http *LoadBalancerServiceHealthCheckHTTP `json:"http"`
}

type LoadBalancerServiceHealthCheckHTTP

type LoadBalancerServiceHealthCheckHTTP struct {
	Domain      string   `json:"domain"`
	Path        string   `json:"path"`
	Response    string   `json:"response"`
	StatusCodes []string `json:"status_codes"`
	Tls         bool     `json:"tls"`
}

type LoadBalancerServiceProtocol

type LoadBalancerServiceProtocol string
const (
	LoadBalancerServiceProtocolTCP   LoadBalancerServiceProtocol = "tcp"
	LoadBalancerServiceProtocolHTTP  LoadBalancerServiceProtocol = "http"
	LoadBalancerServiceProtocolHTTPS LoadBalancerServiceProtocol = "https"
)

type LoadBalancerTarget

type LoadBalancerTarget struct {
	Type LoadBalancerTargetType `json:"type"`

	Server *LoadBalancerTargetServer `json:"server"`
	Ip     *LoadBalancerTargetIP     `json:"ip"`

	LabelSelector *LoadBalancerTargetLabelSelector `json:"label_selector"`

	HealthStatus []LoadBalancerTargetHealthStatus `json:"health_status"`
	Targets      []LoadBalancerTarget             `json:"targets"`

	UsePrivateIp bool `json:"use_private_ip"`
}

type LoadBalancerTargetHealthStatus

type LoadBalancerTargetHealthStatus struct {
	ListenPort int                                  `json:"listen_port"`
	Status     LoadBalancerTargetHealthStatusStatus `json:"status"`
}

type LoadBalancerTargetHealthStatusStatus

type LoadBalancerTargetHealthStatusStatus string
const (
	LoadBalancerTargetHealthStatusStatusUnknown   LoadBalancerTargetHealthStatusStatus = "unknown"
	LoadBalancerTargetHealthStatusStatusHealthy   LoadBalancerTargetHealthStatusStatus = "healthy"
	LoadBalancerTargetHealthStatusStatusUnhealthy LoadBalancerTargetHealthStatusStatus = "unhealthy"
)

type LoadBalancerTargetIP

type LoadBalancerTargetIP struct {
	Ip string `json:"ip"`
}

type LoadBalancerTargetLabelSelector

type LoadBalancerTargetLabelSelector struct {
	Selector string `json:"selector"`
}

type LoadBalancerTargetServer

type LoadBalancerTargetServer struct {
	Server *Server `json:"server"`
}

type LoadBalancerTargetType

type LoadBalancerTargetType string
const (
	LoadBalancerTargetTypeServer        LoadBalancerTargetType = "server"
	LoadBalancerTargetTypeLabelSelector LoadBalancerTargetType = "label_selector"
	LoadBalancerTargetTypeIP            LoadBalancerTargetType = "ip"
)

type LoadBalancerType

type LoadBalancerType struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Description string `json:"description"`

	MaxConnections          int `json:"max_connections"`
	MaxServices             int `json:"max_services"`
	MaxTargets              int `json:"max_targets"`
	MaxAssignedCertificates int `json:"max_assigned_certificates"`
}

type Location

type Location struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Description string `json:"description"`

	Country string `json:"country"`
	City    string `json:"city"`

	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`

	NetworkZone NetworkZone `json:"network_zone"`
}

type Network

type Network struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created time.Time `json:"created"`
	Labels  map[string]string

	IpRange *net.IPNet `json:"ip_range"`

	Subnets []NetworkSubnet `json:"subnets"`
	Routes  []NetworkRoute  `json:"routes"`

	Servers []*Server `json:"servers"`
}

type NetworkRoute

type NetworkRoute struct {
	Destination *net.IPNet `json:"destination"`

	Gateway net.IP `json:"gateway"`
}

type NetworkSubnet

type NetworkSubnet struct {
	Type NetworkSubnetType `json:"type"`

	IpRange *net.IPNet `json:"ip_range"`

	NetworkZone NetworkZone `json:"network_zone"`

	Gateway net.IP `json:"gateway"`

	VswitchID int `json:"vswitch_id"`
}

type NetworkSubnetType

type NetworkSubnetType string
const (
	NetworkSubnetTypeCloud   NetworkSubnetType = "cloud"
	NetworkSubnetTypeServer  NetworkSubnetType = "server"
	NetworkSubnetTypeVSwitch NetworkSubnetType = "vswitch"
)

type NetworkZone

type NetworkZone string
const (
	NetworkZoneEuCentral NetworkZone = "eu-central"
	NetworkZoneUsEast    NetworkZone = "us-east"
)

type PlacementGroup

type PlacementGroup struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created time.Time         `json:"created"`
	Labels  map[string]string `json:"labels"`

	Servers []int `json:"servers"`

	Type PlacementGroupType `json:"type"`
}

type PlacementGroupType

type PlacementGroupType string
const (
	PlacementGroupTypeSpread PlacementGroupType = "spread"
)

type Server

type Server struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Created time.Time         `json:"created"`
	Labels  map[string]string `json:"labels"`

	Status ServerStatus `json:"status"`

	PublicNet  ServerPublicNet    `json:"public_net"`
	PrivateNet []ServerPrivateNet `json:"private_net"`

	ServerType *ServerType `json:"server_type"`
	Datacenter *Datacenter `json:"datacenter"`

	IncludedTraffic uint64 `json:"included_traffic"`
	OutgoingTraffic uint64 `json:"outgoing_traffic"`
	IngoingTraffic  uint64 `json:"ingoing_traffic"`

	Iso   *Iso   `json:"iso"`
	Image *Image `json:"image"`

	PrimaryDiskSize int `json:"primary_disk_size"`

	PlacementGroup *PlacementGroup `json:"placement_group"`
}

type ServerFirewallStatus

type ServerFirewallStatus struct {
	Firewall Firewall                 `json:"firewall"`
	Status   ServerFirewallStatusEnum `json:"status"`
}

type ServerFirewallStatusEnum

type ServerFirewallStatusEnum string
const (
	ServerFirewallStatusPending ServerFirewallStatusEnum = "pending"
	ServerFirewallStatusApplied ServerFirewallStatusEnum = "applied"
)

type ServerPrivateNet

type ServerPrivateNet struct {
	Network    *Network `json:"network"`
	Ip         net.IP   `json:"ip"`
	Aliases    []net.IP `json:"aliases"`
	MacAddress string   `json:"mac_address"`
}

type ServerPublicNet

type ServerPublicNet struct {
	IpV4 ServerPublicNetIpV4 `json:"ipv4"`
	IpV6 ServerPublicNetIpV6 `json:"ipv6"`

	FloatingIps []*FloatingIp `json:"floating_ips"`

	Firewalls []*ServerFirewallStatus `json:"firewalls"`
}

type ServerPublicNetIpV4

type ServerPublicNetIpV4 struct {
	Id int    `json:"id"`
	Ip net.IP `json:"ip"`

	Blocked bool `json:"blocked"`

	DnsPtr any `json:"dns_ptr"`
}

type ServerPublicNetIpV6

type ServerPublicNetIpV6 struct {
	Id int    `json:"id"`
	Ip string `json:"ip"`

	Network *net.IPNet `json:"network"`

	Blocked bool `json:"blocked"`

	DnsPtr any `json:"dns_ptr"`
}

type ServerStatus

type ServerStatus string
const (
	ServerStatusInitializing ServerStatus = "initializing"
	ServerStatusOff          ServerStatus = "off"
	ServerStatusRunning      ServerStatus = "running"
	ServerStatusStarting     ServerStatus = "starting"
	ServerStatusStopping     ServerStatus = "stopping"
	ServerStatusMigrating    ServerStatus = "migrating"
	ServerStatusRebuilding   ServerStatus = "rebuilding"
	ServerStatusDeleting     ServerStatus = "deleting"
	ServerStatusUnknown      ServerStatus = "unknown"
)

type ServerType

type ServerType struct {
	Id   int    `json:"id"`
	Name string `json:"name"`

	Description string `json:"description"`

	Cores  int     `json:"cores"`
	Memory float32 `json:"memory"`
	Disk   int     `json:"disk"`

	StorageType StorageType `json:"storage_type"`

	CpuType CpuType `json:"cpu_type"`
}

type ServerTypePrice

type ServerTypePrice struct {
	Location string `json:"location"`

	PriceHourly  ServerTypePriceValue `json:"price_hourly"`
	PriceMonthly ServerTypePriceValue `json:"price_monthly"`
}

type ServerTypePriceValue

type ServerTypePriceValue struct {
	Net   float64 `json:"net"`
	Gross float64 `json:"gross"`
}

type StorageType

type StorageType string
const (
	StorageTypeLocal StorageType = "local"
	StorageTypeCeph  StorageType = "ceph"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL