Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Farm ¶
type Farm struct { ID schema.ID `bson:"_id" json:"id"` ThreebotId int64 `bson:"threebot_id" json:"threebot_id"` IyoOrganization string `bson:"iyo_organization" json:"iyo_organization"` Name string `bson:"name" json:"name"` WalletAddresses []WalletAddress `bson:"wallet_addresses" json:"wallet_addresses"` Location Location `bson:"location" json:"location"` Email schema.Email `bson:"email" json:"email"` ResourcePrices []NodeResourcePrice `bson:"resource_prices" json:"resource_prices"` PrefixZero schema.IPRange `bson:"prefix_zero" json:"prefix_zero"` }
type Gateway ¶
type Gateway struct { ID schema.ID `bson:"_id" json:"id"` NodeId string `bson:"node_id" json:"node_id"` FarmId int64 `bson:"farm_id" json:"farm_id"` OsVersion string `bson:"os_version" json:"os_version"` Created schema.Date `bson:"created" json:"created"` Updated schema.Date `bson:"updated" json:"updated"` Uptime int64 `bson:"uptime" json:"uptime"` Address string `bson:"address" json:"address"` Location Location `bson:"location" json:"location"` PublicKeyHex string `bson:"public_key_hex" json:"public_key_hex"` Workloads WorkloadAmount `bson:"workloads" json:"workloads"` ManagedDomains []string `bson:"managed_domains" json:"managed_domains"` TcpRouterPort int64 `bson:"tcp_router_port" json:"tcp_router_port"` DnsNameserver []string `bson:"dns_nameserver" json:"dns_nameserver"` FreeToUse bool `bson:"free_to_use" json:"free_to_use"` }
type Iface ¶
type IfaceTypeEnum ¶
type IfaceTypeEnum uint8
const ( IfaceTypeMacvlan IfaceTypeEnum = iota IfaceTypeVlan )
func (IfaceTypeEnum) String ¶
func (e IfaceTypeEnum) String() string
type Location ¶
type Location struct { City string `bson:"city" json:"city"` Country string `bson:"country" json:"country"` Continent string `bson:"continent" json:"continent"` Latitude float64 `bson:"latitude" json:"latitude"` Longitude float64 `bson:"longitude" json:"longitude"` }
func NewLocation ¶
type Node ¶
type Node struct { ID schema.ID `bson:"_id" json:"id"` NodeId string `bson:"node_id" json:"node_id"` HostName string `bson:"hostname" json:"hostname"` NodeIdV1 string `bson:"node_id_v1" json:"node_id_v1"` FarmId int64 `bson:"farm_id" json:"farm_id"` OsVersion string `bson:"os_version" json:"os_version"` Created schema.Date `bson:"created" json:"created"` Updated schema.Date `bson:"updated" json:"updated"` Uptime int64 `bson:"uptime" json:"uptime"` Address string `bson:"address" json:"address"` Location Location `bson:"location" json:"location"` TotalResources ResourceAmount `bson:"total_resources" json:"total_resources"` UsedResources ResourceAmount `bson:"used_resources" json:"used_resources"` ReservedResources ResourceAmount `bson:"reserved_resources" json:"reserved_resources"` Workloads WorkloadAmount `bson:"workloads" json:"workloads"` Proofs []Proof `bson:"proofs" json:"proofs"` Ifaces []Iface `bson:"ifaces" json:"ifaces"` PublicConfig *PublicIface `bson:"public_config,omitempty" json:"public_config"` FreeToUse bool `bson:"free_to_use" json:"free_to_use"` Approved bool `bson:"approved" json:"approved"` PublicKeyHex string `bson:"public_key_hex" json:"public_key_hex"` WgPorts []int64 `bson:"wg_ports" json:"wg_ports"` Deleted bool `bson:"deleted" json:"deleted"` }
type NodeResourcePrice ¶
type NodeResourcePrice struct { Currency PriceCurrencyEnum `bson:"currency" json:"currency"` Cru float64 `bson:"cru" json:"cru"` Mru float64 `bson:"mru" json:"mru"` Hru float64 `bson:"hru" json:"hru"` Sru float64 `bson:"sru" json:"sru"` Nru float64 `bson:"nru" json:"nru"` }
func NewNodeResourcePrice ¶
func NewNodeResourcePrice() (NodeResourcePrice, error)
type PriceCurrencyEnum ¶
type PriceCurrencyEnum uint8
const ( PriceCurrencyEUR PriceCurrencyEnum = iota PriceCurrencyUSD PriceCurrencyTFT PriceCurrencyAED PriceCurrencyGBP )
func (PriceCurrencyEnum) String ¶
func (e PriceCurrencyEnum) String() string
type Proof ¶
type Proof struct { Created schema.Date `bson:"created" json:"created"` HardwareHash string `bson:"hardware_hash" json:"hardware_hash"` DiskHash string `bson:"disk_hash" json:"disk_hash"` Hardware map[string]interface{} `bson:"hardware" json:"hardware"` Disks map[string]interface{} `bson:"disks" json:"disks"` Hypervisor []string `bson:"hypervisor" json:"hypervisor"` }
type PublicIface ¶
type PublicIface struct { Master string `bson:"master" json:"master"` Type IfaceTypeEnum `bson:"type" json:"type"` Ipv4 schema.IPRange `bson:"ipv4" json:"ipv4"` Ipv6 schema.IPRange `bson:"ipv6" json:"ipv6"` Gw4 net.IP `bson:"gw4" json:"gw4"` Gw6 net.IP `bson:"gw6" json:"gw6"` Version int64 `bson:"version" json:"version"` }
func (PublicIface) Validate ¶
func (p PublicIface) Validate() error
Validate check if all the value of the object are valid
type ResourceAmount ¶
type ResourceAmount struct { Cru uint64 `bson:"cru" json:"cru"` Mru float64 `bson:"mru" json:"mru"` Hru float64 `bson:"hru" json:"hru"` Sru float64 `bson:"sru" json:"sru"` }
func NewResourceAmount ¶
func NewResourceAmount() (ResourceAmount, error)
type WalletAddress ¶
type WorkloadAmount ¶
type WorkloadAmount struct { Network uint16 `bson:"network" json:"network"` NetworkResource uint16 `bson:"network_resource" json:"network_resource"` Volume uint16 `bson:"volume" json:"volume"` ZDBNamespace uint16 `bson:"zdb_namespace" json:"zdb_namespace"` Container uint16 `bson:"container" json:"container"` K8sVM uint16 `bson:"k8s_vm" json:"k8s_vm"` Proxy uint16 `bson:"proxy" json:"proxy"` ReverseProxy uint16 `bson:"reverse_proxy" json:"reverse_proxy"` Subdomain uint16 `bson:"subdomain" json:"subdomain"` DelegateDomain uint16 `bson:"delegate_domain" json:"delegate_domain"` }
Click to show internal directories.
Click to hide internal directories.