server

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteServer

func DeleteServer(ac *client.AlpaconClient, serverName string) error

func GetServerDetail

func GetServerDetail(ac *client.AlpaconClient, serverName string) ([]byte, error)

func GetServerIDByName

func GetServerIDByName(ac *client.AlpaconClient, serverName string) (string, error)

func GetServerNameByID

func GetServerNameByID(ac *client.AlpaconClient, serverID string) (string, error)

func UpdateServer added in v1.2.0

func UpdateServer(ac *client.AlpaconClient, serverName string) ([]byte, error)

Types

type ServerAttributes

type ServerAttributes struct {
	Name      string `json:"name"`
	IP        string `json:"ip" table:"IP"`
	OS        string `json:"os" table:"OS"`
	Connected bool   `json:"connected"`
	Owner     string `json:"owner"`
}

func GetServerList

func GetServerList(ac *client.AlpaconClient) ([]ServerAttributes, error)

type ServerCreatedResponse

type ServerCreatedResponse struct {
	Name         string   `json:"name"`
	ID           string   `json:"id"`
	Instruction1 string   `json:"instruction_1"`
	Instruction2 string   `json:"instruction_2"`
	Groups       []string `json:"groups"`
}

func CreateServer

func CreateServer(ac *client.AlpaconClient, serverRequest ServerRequest) (ServerCreatedResponse, error)

type ServerDetails

type ServerDetails struct {
	ID               string            `json:"id"`
	Name             string            `json:"name"`
	RemoteIP         string            `json:"remote_ip"`
	Status           ServerStatus      `json:"status"`
	IsConnected      bool              `json:"is_connected"`
	Commissioned     bool              `json:"commissioned"`
	Starred          bool              `json:"starred"`
	CPUPhysicalCores int               `json:"cpu_physical_cores"`
	CPULogicalCores  int               `json:"cpu_logical_cores"`
	CPUType          string            `json:"cpu_type"`
	PhysicalMemory   int64             `json:"physical_memory"`
	OSName           string            `json:"os_name"`
	OSVersion        string            `json:"os_version"`
	Load             float64           `json:"load"`
	BootTime         time.Time         `json:"boot_time"`
	Owner            types.UserSummary `json:"owner"`
	Groups           []string          `json:"groups"`
}

type ServerRequest

type ServerRequest struct {
	Name     string   `json:"name"`
	Platform string   `json:"platform"`
	Groups   []string `json:"groups"`
}

type ServerStatus

type ServerStatus struct {
	Code     string           `json:"code"`
	Icon     string           `json:"icon"`
	Meta     ServerStatusMeta `json:"meta"`
	Text     string           `json:"text"`
	Color    string           `json:"color"`
	Messages []string         `json:"messages"`
}

type ServerStatusMeta

type ServerStatusMeta struct {
	Delay1d  float64 `json:"delay_1d"`
	Delay1h  float64 `json:"delay_1h"`
	Delay1w  float64 `json:"delay_1w"`
	DelayNow float64 `json:"delay_now"`
}

Jump to

Keyboard shortcuts

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