adminweb

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0, BSD-2-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PRICEINFO_CACHE_PATH string = os.Getenv("CBSPIDER_ROOT") + "/cache/priceinfo"

Functions

func BodyFrame added in v0.9.2

func BodyFrame(c echo.Context) error

BodyFrame renders the body frame

func ClusterManagement added in v0.9.6

func ClusterManagement(c echo.Context) error

func ClusterMgmt added in v0.6.16

func ClusterMgmt(c echo.Context) error

func ConnectionManagement added in v0.9.2

func ConnectionManagement(c echo.Context) error

func Connectionconfig

func Connectionconfig(c echo.Context) error

create Connection page

func Credential

func Credential(c echo.Context) error

================ Credential Info Management create credential page

func CredentialManagement added in v0.9.2

func CredentialManagement(c echo.Context) error

func Dashboard added in v0.8.17

func Dashboard(c echo.Context) error

Dashboard renders the dashboard page.

func DiskManagement added in v0.9.2

func DiskManagement(c echo.Context) error

Handler function to render the Disk management page

func DiskMgmt added in v0.6.7

func DiskMgmt(c echo.Context) error

func DownloadPriceInfo added in v0.8.6

func DownloadPriceInfo(c echo.Context) error

func Driver

func Driver(c echo.Context) error

================ Driver Info Management create driver page

func DriverManagement added in v0.9.2

func DriverManagement(c echo.Context) error

DriverManagement - Handles the management of drivers

func FileSystemManagement added in v0.12.5

func FileSystemManagement(c echo.Context) error

func Frame

func Frame(c echo.Context) error

================ Frame

func HandleWebSocket added in v0.9.2

func HandleWebSocket(c echo.Context) error

func KeyPairManagement added in v0.9.2

func KeyPairManagement(c echo.Context) error

Handler function to render the KeyPair management page

func KeyPairMgmt

func KeyPairMgmt(c echo.Context) error

func LeftMenu added in v0.9.2

func LeftMenu(c echo.Context) error

LeftMenu renders the left menu

func Log added in v0.5.4

func Log(c echo.Context) error

================ Log Page

func MainPage added in v0.9.2

func MainPage(c echo.Context) error

MainPage renders the main page with iframes

func MyImageManagement added in v0.9.2

func MyImageManagement(c echo.Context) error

Handler function to render the MyImage management page

func MyImageMgmt added in v0.6.10

func MyImageMgmt(c echo.Context) error

func NLBManagement added in v0.9.5

func NLBManagement(c echo.Context) error

Handler function to render the NLB management page

func NLBMgmt added in v0.5.11

func NLBMgmt(c echo.Context) error

func PriceInfoRequest added in v0.8.2

func PriceInfoRequest(c echo.Context) error

func PriceInfoTableList added in v0.8.2

func PriceInfoTableList(c echo.Context) error

PriceInfoTableList handles the display of CloudPrice to Table

func Region

func Region(c echo.Context) error

================ Region Info Management create region page

func RegionManagement added in v0.9.2

func RegionManagement(c echo.Context) error

func RegionZone added in v0.7.6

func RegionZone(c echo.Context) error

func S3Management added in v0.10.8

func S3Management(c echo.Context) error

func SecurityGroupManagement added in v0.9.2

func SecurityGroupManagement(c echo.Context) error

Handler function to render the SecurityGroup management page

func SecurityGroupMgmt

func SecurityGroupMgmt(c echo.Context) error

func SpiderInfo

func SpiderInfo(c echo.Context) error

================ Spider Info

func SpiderletVMMointoring added in v0.9.8

func SpiderletVMMointoring(c echo.Context) error

func SystemStatsInfoPage added in v0.10.4

func SystemStatsInfoPage(c echo.Context) error

Handler function to render the Combined System Information and Resource Usage page

func Top

func Top(c echo.Context) error

================ Top Page

func VMImage

func VMImage(c echo.Context) error

func VMManagement added in v0.9.2

func VMManagement(c echo.Context) error

func VMMgmt

func VMMgmt(c echo.Context) error

func VMMointoring added in v0.9.8

func VMMointoring(c echo.Context) error

func VMSpec

func VMSpec(c echo.Context) error

func VPCMgmt

func VPCMgmt(c echo.Context) error

func VPCSubnetManagement added in v0.9.2

func VPCSubnetManagement(c echo.Context) error

Handler function to render the VPC-Subnet management page

Types

type ClaudeContent added in v0.10.3

type ClaudeContent struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type ClaudeMessage added in v0.10.3

type ClaudeMessage struct {
	Role    string          `json:"role"`
	Content []ClaudeContent `json:"content"`
}

------------------- Data Structures for Claude -------------------

type ClaudeRequestBody added in v0.10.3

type ClaudeRequestBody struct {
	Model       string          `json:"model"`
	MaxTokens   int             `json:"max_tokens"`
	Temperature float64         `json:"temperature"`
	System      string          `json:"system"`
	Messages    []ClaudeMessage `json:"messages"`
}

type ConnectionConfig added in v0.8.17

type ConnectionConfig struct {
	ConfigName     string `json:"ConfigName"`
	ProviderName   string `json:"ProviderName"`
	DriverName     string `json:"DriverName"`
	CredentialName string `json:"CredentialName"`
	RegionName     string `json:"RegionName"`
}

================ Connection Config Info Management

type ConnectionConfigs added in v0.8.17

type ConnectionConfigs struct {
	ConnectionConfigs []ConnectionConfig `json:"connectionconfig"`
}

type CountResponse added in v0.8.17

type CountResponse struct {
	Count int `json:"count"`
}

type CredentialInfo added in v0.9.2

type CredentialInfo struct {
	CredentialName   string `json:"CredentialName"`
	ProviderName     string `json:"ProviderName"`
	KeyValueInfoList []struct {
		Key   string `json:"Key"`
		Value string `json:"Value"`
	} `json:"KeyValueInfoList"`
}

type CredentialMetaInfo added in v0.9.2

type CredentialMetaInfo struct {
	Credential []string `json:"Credential"`
}

type Credentials added in v0.9.2

type Credentials struct {
	Credentials []CredentialInfo `json:"credential"`
}

type DashboardData added in v0.8.17

type DashboardData struct {
	ServerIP           string
	TotalConnections   int
	ConnectionsByCloud map[string]int
	Providers          []string
	ResourceCounts     map[string][]ResourceCounts
	Regions            map[string]string
	ShowEmpty          bool
}

DashboardData aggregates the data for rendering the dashboard

type DiskPartitionInfo added in v0.10.4

type DiskPartitionInfo struct {
	MountPoint string
	TotalSpace string
}

DiskPartitionInfo structure for disk partition information

type DriverInfo added in v0.9.2

type DriverInfo struct {
	DriverName        string `json:"DriverName"`
	DriverLibFileName string `json:"DriverLibFileName"`
	ProviderName      string `json:"ProviderName"`
}

type Drivers added in v0.9.2

type Drivers struct {
	Drivers []DriverInfo `json:"driver"`
}

type FileSystemInfo added in v0.12.5

type FileSystemInfo struct {
	IId            IID        `json:"IId"`
	Name           string     `json:"Name"`
	Zone           string     `json:"Zone"`
	VpcIID         IID        `json:"VpcIID"`
	FileSystemType string     `json:"FileSystemType"`
	Status         string     `json:"Status"`
	CreatedTime    string     `json:"CreatedTime"`
	AccessSubnets  []IID      `json:"AccessSubnets,omitempty"`
	KeyValueList   []KeyValue `json:"KeyValueList,omitempty"`
}

type IID added in v0.12.5

type IID struct {
	NameId   string `json:"NameId"`
	SystemId string `json:"SystemId"`
}

type KeyValue added in v0.12.5

type KeyValue struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

type NameWidth

type NameWidth struct {
	Name  string
	Width string
}

type Providers added in v0.9.2

type Providers struct {
	Providers []string `json:"cloudos"`
}

type RegionInfo added in v0.9.2

type RegionInfo struct {
	RegionName       string `json:"RegionName"`
	ProviderName     string `json:"ProviderName"`
	KeyValueInfoList []struct {
		Key   string `json:"Key"`
		Value string `json:"Value"`
	} `json:"KeyValueInfoList"`
}

type RegionMetaInfo added in v0.9.2

type RegionMetaInfo struct {
	Region []string `json:"Region"`
}

type Regions added in v0.9.2

type Regions struct {
	Regions []RegionInfo `json:"region"`
}

type ResourceCounts added in v0.8.17

type ResourceCounts struct {
	ConnectionName       string `json:"connectionName"`
	RegionName           string `json:"regionName"`
	VPCs                 int    `json:"vpcs"`
	Subnets              int    `json:"subnets"`
	SecurityGroups       int    `json:"securityGroups"`
	VMs                  int    `json:"vms"`
	KeyPairs             int    `json:"keyPairs"`
	Disks                int    `json:"disks"`
	NetworkLoadBalancers int    `json:"nlbs"`
	Clusters             int    `json:"clusters"`
	MyImages             int    `json:"myImages"`
	S3Buckets            int    `json:"s3Buckets"`
}

ResourceCounts holds the counts for various resources

type ResourceUsage added in v0.10.4

type ResourceUsage struct {
	ProcessCPUCorePercent map[string]string
	ProcessCPUPercent     string
	ProcessDiskRead       string
	ProcessDiskWrite      string
	ProcessMemoryPercent  string
	ProcessMemoryUsed     string
	ProcessName           string
	ProcessNetReceived    string
	ProcessNetSent        string
	SystemCPUCorePercent  map[string]string
	SystemCPUPercent      string
	SystemDiskRead        string
	SystemDiskWrite       string
	SystemMemoryPercent   string
	SystemMemoryTotal     string
	SystemMemoryUsed      string
	SystemNetReceived     string
	SystemNetSent         string
}

ResourceUsage structure mapping from the API response

type S3BucketInfo added in v0.10.8

type S3BucketInfo struct {
	Name             string `json:"Name"`
	BucketRegion     string `json:"BucketRegion,omitempty"`
	CreationDate     string `json:"CreationDate"`
	VersioningStatus string `json:"VersioningStatus"`
	CORSStatus       string `json:"CORSStatus"`
}

type S3ObjectInfo added in v0.10.8

type S3ObjectInfo struct {
	ETag         string `json:"ETag"`
	Key          string `json:"Key"`
	LastModified string `json:"LastModified"`
	Size         int64  `json:"Size"`
	ContentType  string `json:"ContentType"`
}

type SystemInfo added in v0.10.4

type SystemInfo struct {
	CPUModel        string
	ClockSpeed      string
	DiskPartitions  []DiskPartitionInfo
	Hostname        string
	KernelArch      string
	KernelVersion   string
	LogicalCores    int
	PhysicalCores   int
	Platform        string
	PlatformVersion string
	SwapMemory      string
	TotalMemory     string
	Uptime          string
}

SystemInfo structure mapping from the API response

type TemplateData added in v0.11.9

type TemplateData struct {
	Data           cres.CloudPrice
	CachedFileName string
	TotalItems     int
	SimpleMode     string
}

TemplateData structure to render the HTML template

type VMStatusMap added in v0.9.2

type VMStatusMap map[string]string

Jump to

Keyboard shortcuts

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