infra

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignedTo

type AssignedTo struct {
	ID       int     `json:"id"`
	Name     string  `json:"name"`
	Href     string  `json:"href"`
	Hostname string  `json:"hostname"`
	Image    string  `json:"image"`
	Region   Region  `json:"region"`
	State    string  `json:"state"`
	Pricing  Pricing `json:"pricing"`
}

AssignedTo assignment of a network floating IP to a server

type AttachedTo

type AttachedTo struct {
	Href string `json:"href"`
}

AttachedTo what a resource is attached to

type AvailableRegions

type AvailableRegions struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	RegionIso2 string `json:"region_iso_2"`
	StockQty   int    `json:"stock_qty"`
}

AvailableRegions regions that are available to the user

type BGPRoute

type BGPRoute struct {
	Subnet  string `json:"subnet"`
	Active  bool   `json:"active"`
	Router  string `json:"router"`
	Age     string `json:"age"`
	Updated string `json:"updated"`
}

BGPRoute single server BGP route

type Bandwidth

type Bandwidth struct {
	Name string `json:"name"`
}

Bandwidth total bandwidth available

type BlockStorage

type BlockStorage struct {
	ID            int        `json:"id"`
	Name          string     `json:"name"`
	Href          string     `json:"href"`
	Size          int        `json:"size"`
	AllowEditSize bool       `json:"allow_edit_size"`
	Unit          string     `json:"unit"`
	Description   string     `json:"description"`
	AttachedTo    AttachedTo `json:"attached_to"`
	VlanID        string     `json:"vlan_id"`
	VlanIP        string     `json:"vlan_ip"`
	Initiator     string     `json:"initiator"`
	DiscoveryIP   string     `json:"discovery_ip"`
}

BlockStorage cloud block storage

type Config

type Config struct {
	BGPRoute               BGPRoute               `json:"bgp_route"`
	Server                 Server                 `json:"server"`
	ServerBGP              ServerBGP              `json:"server_bgp"`
	Project                Project                `json:"project"`
	Region                 Region                 `json:"region"`
	Plan                   Plan                   `json:"plan"`
	Plans                  Plans                  `json:"plans"`
	BlockStorage           BlockStorage           `json:"block_storage"`
	AssignedTo             AssignedTo             `json:"assigned_to"`
	RoutedTo               RoutedTo               `json:"routed_to"`
	IPAddresses            IPAddresses            `json:"ip_addresses"`
	SSHKeys                SSHKeys                `json:"ssh_keys"`
	Cpus                   Cpus                   `json:"cpus"`
	Memory                 Memory                 `json:"memory"`
	Nics                   Nics                   `json:"nics"`
	Raid                   Raid                   `json:"raid"`
	Storage                Storage                `json:"storage"`
	Bandwidth              Bandwidth              `json:"bandwidth"`
	IPAddressCreateRequest IPAddressCreateRequest `json:"ip_address_create_request"`
	CreateServer           CreateServer           `json:"create_server"`
}

type Cpus

type Cpus struct {
	Count     int     `json:"count"`
	Name      string  `json:"name"`
	Cores     int     `json:"cores"`
	Frequency float32 `json:"frequency"`
	Unit      string  `json:"unit"`
}

Cpus cpu information for a server

type CreateServer

type CreateServer struct {
	ProjectID       int                `json:"project_id"`
	Plan            string             `json:"plan"`
	Hostname        string             `json:"hostname"`
	Image           string             `json:"image"`
	Region          string             `json:"region"`
	SSHKeys         []int              `json:"ssh_keys"`
	IPAddresses     []string           `json:"ip_addresses"`
	UserData        string             `json:"user_data"`
	Tags            *map[string]string `json:"tags"`
	SpotInstance    int                `json:"spot_market"`
	OSPartitionSize int                `json:"os_partition_size"`
}

CreateServer represents a request to create a new Cherry Servers server. Used by createNodes

type IPAddressCreateRequest

type IPAddressCreateRequest struct {
	AddressFamily int  `json:"address_family"`
	Public        bool `json:"public"`
}

IPAddressCreateRequest represents a request to create a new IP address within a CreateServer request

type IPAddresses

type IPAddresses struct {
	ID            string            `json:"id"`
	Address       string            `json:"address"`
	AddressFamily int               `json:"address_family"`
	Cidr          string            `json:"cidr"`
	Gateway       string            `json:"gateway"`
	Type          string            `json:"type"`
	Region        Region            `json:"region"`
	RoutedTo      RoutedTo          `json:"routed_to"`
	AssignedTo    AssignedTo        `json:"assigned_to"`
	TargetedTo    AssignedTo        `json:"targeted_to"`
	Project       Project           `json:"project"`
	PtrRecord     string            `json:"ptr_record"`
	ARecord       string            `json:"a_record"`
	Tags          map[string]string `json:"tags"`
	Href          string            `json:"href"`
}

IPAddresses individual IP address

type Memory

type Memory struct {
	Count int    `json:"count"`
	Total int    `json:"total"`
	Unit  string `json:"unit"`
	Name  string `json:"name"`
}

Memory cpu information for a server

type Nics

type Nics struct {
	Name string `json:"name"`
}

Nics network interface information for a server

type Plan

type Plan struct {
	ID               int                `json:"id"`
	Slug             string             `json:"slug"`
	Name             string             `json:"name"`
	Custom           bool               `json:"custom"`
	Specs            Specs              `json:"specs"`
	Pricing          []Pricing          `json:"pricing"`
	AvailableRegions []AvailableRegions `json:"available_regions"`
}

Plan a server plan

type Plans

type Plans []Plan

Plans represents a list of Cherry Servers plans

type Pricing

type Pricing struct {
	Price    float32 `json:"price"`
	Taxed    bool    `json:"taxed"`
	Currency string  `json:"currency"`
	Unit     string  `json:"unit"`
}

Pricing price for a specific plan

type Project

type Project struct {
	ID   int        `json:"id"`
	Name string     `json:"name"`
	Bgp  ProjectBGP `json:"bgp"`
	Href string     `json:"href"`
}

Project a CherryServers project

type ProjectBGP

type ProjectBGP struct {
	Enabled  bool `json:"enabled"`
	LocalASN int  `json:"local_asn"`
}

ProjectBGP information about BGP on an individual project

type Raid

type Raid struct {
	Name string `json:"name"`
}

Raid raid for block storage on a server

type Region

type Region struct {
	ID         int       `json:"id"`
	Slug       string    `json:"slug"`
	Name       string    `json:"name"`
	RegionIso2 string    `json:"region_iso_2"`
	BGP        RegionBGP `json:"bgp"`
	Href       string    `json:"href"`
}

Region a CherryServers region

type RegionBGP

type RegionBGP struct {
	Hosts []string `json:"hosts"`
	Asn   int      `json:"asn"`
}

RegionBGP information about BGP in a region

type RoutedTo

type RoutedTo struct {
	ID            string `json:"id"`
	Address       string `json:"address"`
	AddressFamily int    `json:"address_family"`
	Cidr          string `json:"cidr"`
	Gateway       string `json:"gateway"`
	Type          string `json:"type"`
	Region        Region `json:"region"`
}

RoutedTo routing of a floating IP to an underlying IP

type SSHKeys

type SSHKeys struct {
	ID          int    `json:"id"`
	Label       string `json:"label"`
	Key         string `json:"key"`
	Fingerprint string `json:"fingerprint"`
	Updated     string `json:"updated"`
	Created     string `json:"created"`
	Href        string `json:"href"`
}

SSHKeys an ssh key

type Server

type Server struct {
	ID               int               `json:"id"`
	Name             string            `json:"name"`
	Href             string            `json:"href"`
	Hostname         string            `json:"hostname"`
	Image            string            `json:"image"`
	SpotInstance     bool              `json:"spot_instance"`
	BGP              ServerBGP         `json:"bgp"`
	Project          Project           `json:"project"`
	Region           Region            `json:"region"`
	State            string            `json:"state"`
	Plan             Plan              `json:"plan"`
	AvailableRegions AvailableRegions  `json:"availableregions"`
	Pricing          Pricing           `json:"pricing"`
	IPAddresses      []IPAddresses     `json:"ip_addresses"`
	SSHKeys          []SSHKeys         `json:"ssh_keys"`
	Tags             map[string]string `json:"tags"`
	Storage          BlockStorage      `json:"storage"`
	Created          string            `json:"created_at"`
	TerminationDate  string            `json:"termination_date"`
}

Server represents a Cherry Servers server

type ServerBGP

type ServerBGP struct {
	Enabled   bool       `json:"enabled"`
	Available bool       `json:"available"`
	Status    string     `json:"status"`
	Routers   int        `json:"routers"`
	Connected int        `json:"connected"`
	Limit     int        `json:"limit"`
	Active    int        `json:"active"`
	Routes    []BGPRoute `json:"routes"`
	Updated   string     `json:"updated"`
}

ServerBGP status of BGP on a server

type Specs

type Specs struct {
	Cpus      Cpus      `json:"cpus"`
	Memory    Memory    `json:"memory"`
	Storage   []Storage `json:"storage"`
	Raid      Raid      `json:"raid"`
	Nics      Nics      `json:"nics"`
	Bandwidth Bandwidth `json:"bandwidth"`
}

Specs aggregated specs for a server

type Storage

type Storage struct {
	Count int     `json:"count"`
	Name  string  `json:"name"`
	Size  float32 `json:"size"`
	Unit  string  `json:"unit"`
}

Storage amount of storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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