types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPv4

type IPv4 struct {
	IP string
}

type Lab

type Lab struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Spec       LabSpec   `json:"spec"`
	Status     LabStatus `json:"status,omitempty"`
}

type LabDeleteStatus

type LabDeleteStatus struct {
	Deleted     bool      `json:"deleted"`
	DeleteAfter time.Time `json:"deleteAfter"`
	Error       error     `json:"error"`
}

type LabServerSpec

type LabServerSpec struct {
	Name       string `json:"name"`
	ServerType string `json:"serverType"`
	Image      string `json:"image"`
}

type LabSpec

type LabSpec struct {
	Servers  []*LabServerSpec `json:"servers"`
	Volumes  []*LabVolumeSpec `json:"volumes"`
	TTL      string           `json:"ttl"`
	Provider string           `json:"provider"`
	Location string           `json:"location"`
}

type LabStatus

type LabStatus struct {
	Status      string    `json:"status"`
	Owner       string    `json:"owner"`
	Servers     []*Server `json:"servers"`
	Volumes     []*Volume `json:"volumes"`
	Created     time.Time `json:"created"`
	DeleteAfter time.Time `json:"deleteAfter"`
}

type LabVolumeSpec

type LabVolumeSpec struct {
	Name      string `json:"name"`
	Server    string `json:"server"`
	Size      int    `json:"size"`
	Format    string `json:"format"`
	Automount bool   `json:"automount"`
}

type ObjectMeta

type ObjectMeta struct {
	Name   string            `json:"name,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
}

type PublicNet

type PublicNet struct {
	IPv4 *struct {
		IP string `json:"ip"`
	} `json:"ipv4"`
}

type Resource

type Resource struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Spec       map[string]interface{} `json:"spec"`
}

Resource represents the common fields for all resources

type SSHKey

type SSHKey struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Spec       SSHKeySpec   `json:"spec"`
	Status     SSHKeyStatus `json:"status,omitempty"`
}

type SSHKeyDeleteStatus

type SSHKeyDeleteStatus struct {
	Deleted     bool      `json:"deleted"`
	DeleteAfter time.Time `json:"deleteAfter"`
	Error       error     `json:"error"`
}

type SSHKeySpec

type SSHKeySpec struct {
	PublicKey string            `json:"publicKey"`
	Labels    map[string]string `json:"labels"`
	TTL       string            `json:"ttl"`
}

type SSHKeyStatus

type SSHKeyStatus struct {
	Status      string    `json:"status"`
	Owner       string    `json:"owner"`
	Created     time.Time `json:"created"`
	DeleteAfter time.Time `json:"deleteAfter"`
}

type Server

type Server struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Spec       ServerSpec   `json:"spec"`
	Status     ServerStatus `json:"status,omitempty"`
}

type ServerDeleteStatus

type ServerDeleteStatus struct {
	Deleted     bool      `json:"deleted"`
	DeleteAfter time.Time `json:"deleteAfter"`
	Error       error     `json:"error"`
}

type ServerSpec

type ServerSpec struct {
	ServerType  string            `json:"serverType"`
	Image       string            `json:"image"`
	Location    string            `json:"location"`
	Provider    string            `json:"provider"`
	Labels      map[string]string `json:"labels"`
	Volumes     []*Volume         `json:"volumes"`
	SSHKeyNames []string          `json:"sshKeyNames"`
	TTL         string            `json:"ttl"`
}

Server represents a generic server across providers

type ServerStatus

type ServerStatus struct {
	Status      string     `json:"status"`
	Owner       string     `json:"owner"`
	Cores       int        `json:"cores"`
	Memory      float32    `json:"memory"`
	Disk        int        `json:"disk"`
	PublicNet   *PublicNet `json:"publicNet"`
	Created     time.Time  `json:"created"`
	DeleteAfter time.Time  `json:"deleteAfter"`
}

type TypeMeta

type TypeMeta struct {
	APIVersion string `json:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty"`
}

type Volume

type Volume struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Spec       VolumeSpec   `json:"spec"`
	Status     VolumeStatus `json:"status,omitempty"`
}

type VolumeDeleteStatus

type VolumeDeleteStatus struct {
	Deleted     bool      `json:"deleted"`
	DeleteAfter time.Time `json:"deleteAfter"`
	Error       error     `json:"error"`
}

type VolumeSpec

type VolumeSpec struct {
	ServerID   string            `json:"serverID"`
	ServerName string            `json:"serverName"`
	Location   string            `json:"location"`
	Provider   string            `json:"provider"`
	Size       int               `json:"size"`
	Automount  bool              `json:"automount"`
	Format     string            `json:"format"`
	Labels     map[string]string `json:"labels"`
	TTL        string            `json:"ttl"`
}

type VolumeStatus

type VolumeStatus struct {
	Status      string    `json:"status"`
	Owner       string    `json:"owner"`
	Created     time.Time `json:"created"`
	DeleteAfter time.Time `json:"deleteAfter"`
}

Jump to

Keyboard shortcuts

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