Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Server(id int) (*Server, error) SetServer(s *Server) error BootRescueMode(serverID int, image string) (*RescueCredentials, error) BootNormalMode(serverID int) error GetRescueImages(serverID int) ([]string, error) EditFailoverIP(source, destination string) error GenerateMACFailoverIP(address, macType string) (string, error) DeleteMACFailoverIP(address string) error ListRPNv2() ([]*RPNv2, error) RPNv2(id int) (*RPNv2, error) RPNv2ByName(name string) (*RPNv2, error) SetRPNv2(r *RPNv2, wait time.Duration) error DeleteRPNv2(id int, wait time.Duration) error }
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type Interface ¶
type Interface struct { Address string `json:"address"` MAC string `json:"mac"` Reverse string `json:"reverse"` SwitchPortState string `json:"switch_port_state"` Type InterfaceType `json:"type"` }
type InterfaceType ¶
type InterfaceType string
const ( Public InterfaceType = "public" Private InterfaceType = "private" )
type RPNv2 ¶
type RPNv2 struct { ID int `json:"id,omitempty"` Name string `json:"description"` Status string `json:"status,omitempty"` Type RPNv2Type `json:"type"` CompatibilityRPNv1 bool `json:"compatibility_rpn_v1"` Members []*Member `json:"member,omitempty"` }
func (*RPNv2) MemberByServerID ¶
type RescueCredentials ¶
type RescueCredentials struct { Login string `json:"login"` Password string `json:"password"` Protocol string `json:"protocol"` IP string `json:"ip"` }
RescueCredentials contain the login details for a server that booted into rescue mode
type Server ¶
type Server struct { ID int `json:"id"` Offer string `json:"offer"` Hostname string `json:"hostname"` OS interface{} `json:"os"` Power string `json:"power"` BootMode string `json:"boot_mode"` LastReboot string `json:"last_reboot"` AntiDDOS bool `json:"anti_ddos"` HardwareWatch bool `json:"hardware_watch"` ProactiveMonitoring bool `json:"proactive_monitoring"` Support string `json:"support"` Abuse string `json:"abuse"` Location *Location `json:"location"` Network struct { Public []string `json:"ip"` Private []string `json:"private"` Ipfo []interface{} `json:"ipfo"` } `json:"network"` IP []*Interface `json:"ip"` Contacts struct { Owner string `json:"owner"` Tech string `json:"tech"` } `json:"contacts"` Disks []struct { Ref string `json:"$ref"` } `json:"disks"` DriveArrays []struct { Disks []struct { Ref string `json:"$ref"` } `json:"disks"` RaidController struct { Ref string `json:"$ref"` } `json:"raid_controller"` RaidLevel string `json:"raid_level"` } `json:"drive_arrays"` RaidControllers []struct { Ref string `json:"$ref"` } `json:"raid_controllers"` BMC struct { SessionKey interface{} `json:"session_key"` } `json:"bmc"` }
func (*Server) InterfaceByType ¶
func (s *Server) InterfaceByType(t InterfaceType) *Interface
Source Files ¶
Click to show internal directories.
Click to hide internal directories.