pkgmachine

package
v1.775.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cpu

type Cpu struct {
	Processors int `json:"processors"`
}

type Machine

type Machine struct {
	Owner       string `xorm:"varchar(100) notnull pk" json:"owner"`
	Name        string `xorm:"varchar(100) notnull pk" json:"name"`
	Id          string `xorm:"varchar(100)" json:"id"`
	Provider    string `xorm:"varchar(100)" json:"provider"`
	CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
	UpdatedTime string `xorm:"varchar(100)" json:"updatedTime"`
	ExpireTime  string `xorm:"varchar(100)" json:"expireTime"`
	DisplayName string `xorm:"varchar(100)" json:"displayName"`

	Region   string `xorm:"varchar(100)" json:"region"`
	Zone     string `xorm:"varchar(100)" json:"zone"`
	Category string `xorm:"varchar(100)" json:"category"`
	Type     string `xorm:"varchar(100)" json:"type"`
	Size     string `xorm:"varchar(100)" json:"size"`
	Tag      string `xorm:"varchar(100)" json:"tag"`
	State    string `xorm:"varchar(100)" json:"state"`

	Image     string `xorm:"varchar(100)" json:"image"`
	Os        string `xorm:"varchar(100)" json:"os"`
	PublicIp  string `xorm:"varchar(100)" json:"publicIp"`
	PrivateIp string `xorm:"varchar(100)" json:"privateIp"`
	CpuSize   string `xorm:"varchar(100)" json:"cpuSize"`
	MemSize   string `xorm:"varchar(100)" json:"memSize"`
}

type MachineAliyunClient

type MachineAliyunClient struct {
	Client *ecs20140526.Client
}

func (MachineAliyunClient) GetMachine

func (client MachineAliyunClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineAliyunClient) GetMachines

func (client MachineAliyunClient) GetMachines(lang string) ([]*Machine, error)

func (MachineAliyunClient) UpdateMachineState

func (client MachineAliyunClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type MachineAwsClient

type MachineAwsClient struct {
	Client *ec2.Client
	// contains filtered or unexported fields
}

func (MachineAwsClient) GetMachine

func (client MachineAwsClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineAwsClient) GetMachines

func (client MachineAwsClient) GetMachines(lang string) ([]*Machine, error)

func (MachineAwsClient) UpdateMachineState

func (client MachineAwsClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type MachineAzureClient

type MachineAzureClient struct {
	Client *armcompute.VirtualMachinesClient
	// contains filtered or unexported fields
}

func (MachineAzureClient) GetMachine

func (client MachineAzureClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineAzureClient) GetMachines

func (client MachineAzureClient) GetMachines(lang string) ([]*Machine, error)

func (MachineAzureClient) UpdateMachineState

func (client MachineAzureClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type MachineClientInterface

type MachineClientInterface interface {
	GetMachines(lang string) ([]*Machine, error)
	GetMachine(name string, lang string) (*Machine, error)
	UpdateMachineState(name string, state string, lang string) (bool, string, error)
}

func NewMachineClient

func NewMachineClient(providerType string, accessKeyId string, accessKeySecret string, region string, lang string) (MachineClientInterface, error)

type MachineGcpClient

type MachineGcpClient struct {
	Client    *computepb.InstancesClient
	ProjectID string
	Zone      string
}

func (MachineGcpClient) GetMachine

func (client MachineGcpClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineGcpClient) GetMachines

func (client MachineGcpClient) GetMachines(lang string) ([]*Machine, error)

func (MachineGcpClient) UpdateMachineState

func (client MachineGcpClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type MachineKvmClient

type MachineKvmClient struct {
	L *libvirt.Libvirt
}

func (MachineKvmClient) GetMachine

func (client MachineKvmClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineKvmClient) GetMachines

func (client MachineKvmClient) GetMachines(lang string) ([]*Machine, error)

func (MachineKvmClient) UpdateMachineState

func (client MachineKvmClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type MachinePveClient

type MachinePveClient struct {
	// contains filtered or unexported fields
}

func (MachinePveClient) GetMachine

func (client MachinePveClient) GetMachine(name string) (*Machine, error)

func (MachinePveClient) GetMachines

func (client MachinePveClient) GetMachines() ([]*Machine, error)

func (MachinePveClient) UpdateMachineState

func (client MachinePveClient) UpdateMachineState(name string, state string) (bool, string, error)

type MachineTencentClient

type MachineTencentClient struct {
	Client *cvm.Client
}

func (MachineTencentClient) GetMachine

func (client MachineTencentClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineTencentClient) GetMachines

func (client MachineTencentClient) GetMachines(lang string) ([]*Machine, error)

func (MachineTencentClient) UpdateMachineState

func (client MachineTencentClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type MachineVmwareClient

type MachineVmwareClient struct {
	// contains filtered or unexported fields
}

func (MachineVmwareClient) GetMachine

func (client MachineVmwareClient) GetMachine(name string, lang string) (*Machine, error)

func (MachineVmwareClient) GetMachines

func (client MachineVmwareClient) GetMachines(lang string) ([]*Machine, error)

func (MachineVmwareClient) UpdateMachineState

func (client MachineVmwareClient) UpdateMachineState(name string, state string, lang string) (bool, string, error)

type VirtualMachine

type VirtualMachine struct {
	ID     string `json:"id"`
	Cpu    Cpu    `json:"cpu"`
	Memory int    `json:"memory"`
}

type VirtualMachinePath

type VirtualMachinePath struct {
	ID   string `json:"id"`
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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