Documentation
¶
Index ¶
- Variables
- func AdminWebSessionMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func AuthInfo(c echo.Context) error
- func BodyFrame(c echo.Context) error
- func ClusterManagement(c echo.Context) error
- func ClusterMgmt(c echo.Context) error
- func ConnectionManagement(c echo.Context) error
- func Connectionconfig(c echo.Context) error
- func Credential(c echo.Context) error
- func CredentialManagement(c echo.Context) error
- func DBSpec(c echo.Context) error
- func DNSZoneManagement(c echo.Context) error
- func Dashboard(c echo.Context) error
- func DiskManagement(c echo.Context) error
- func DiskMgmt(c echo.Context) error
- func DownloadPriceInfo(c echo.Context) error
- func Driver(c echo.Context) error
- func DriverManagement(c echo.Context) error
- func FileSystemManagement(c echo.Context) error
- func Frame(c echo.Context) error
- func HandleWebSocket(c echo.Context) error
- func KeyPairManagement(c echo.Context) error
- func KeyPairMgmt(c echo.Context) error
- func LeftMenu(c echo.Context) error
- func Log(c echo.Context) error
- func Login(c echo.Context) error
- func Logout(c echo.Context) error
- func MainPage(c echo.Context) error
- func MyImageManagement(c echo.Context) error
- func MyImageMgmt(c echo.Context) error
- func NICManagement(c echo.Context) error
- func NLBManagement(c echo.Context) error
- func NLBMgmt(c echo.Context) error
- func PriceInfoRequest(c echo.Context) error
- func PriceInfoTableList(c echo.Context) error
- func PublicIPManagement(c echo.Context) error
- func Quota(c echo.Context) error
- func QuotaList(c echo.Context) error
- func QuotaServiceTypeList(c echo.Context) error
- func RDBMSCreateDatabase(c echo.Context) error
- func RDBMSCreateTable(c echo.Context) error
- func RDBMSDeleteRow(c echo.Context) error
- func RDBMSDescribeTable(c echo.Context) error
- func RDBMSDropDatabase(c echo.Context) error
- func RDBMSDropTable(c echo.Context) error
- func RDBMSInsertRow(c echo.Context) error
- func RDBMSListDatabases(c echo.Context) error
- func RDBMSListRows(c echo.Context) error
- func RDBMSListTables(c echo.Context) error
- func RDBMSManagement(c echo.Context) error
- func RDBMSSecureTransportStatus(c echo.Context) error
- func RDBMSTestConnection(c echo.Context) error
- func Region(c echo.Context) error
- func RegionManagement(c echo.Context) error
- func RegionZone(c echo.Context) error
- func S3Management(c echo.Context) error
- func SecurityGroupManagement(c echo.Context) error
- func SecurityGroupMgmt(c echo.Context) error
- func SetAPIMode(mode string)
- func SpiderInfo(c echo.Context) error
- func SpiderletVMMointoring(c echo.Context) error
- func Top(c echo.Context) error
- func TopologyAllManagement(c echo.Context) error
- func TopologyConnData(c echo.Context) error
- func TopologyConnections(c echo.Context) error
- func TopologyManagement(c echo.Context) error
- func VMImage(c echo.Context) error
- func VMManagement(c echo.Context) error
- func VMMgmt(c echo.Context) error
- func VMMointoring(c echo.Context) error
- func VMSpec(c echo.Context) error
- func VPCMgmt(c echo.Context) error
- func VPCSubnetManagement(c echo.Context) error
- type ClaudeContent
- type ClaudeMessage
- type ClaudeRequestBody
- type ConnectionConfig
- type ConnectionConfigs
- type CountResponse
- type CredentialInfo
- type CredentialMetaInfo
- type Credentials
- type DashboardData
- type DriverInfo
- type Drivers
- type FileSystemInfo
- type IID
- type KeyValue
- type NameWidth
- type Providers
- type RegionInfo
- type RegionMetaInfo
- type Regions
- type ResourceCounts
- type S3BucketInfo
- type S3ObjectInfo
- type TemplateData
- type TopoEdge
- type TopoNode
- type VMStatusMap
Constants ¶
This section is empty.
Variables ¶
var APIMode = "managed"
APIMode mirrors restruntime's apiMode ("managed" or "stateless"). AdminWeb cannot import restruntime (restruntime already imports this package), so restruntime sets this once at startup via SetAPIMode(). AuthInfo exposes it so the UI can badge which mode the server (and therefore this running AdminWeb instance) is in.
var PRICEINFO_CACHE_PATH string = os.Getenv("CBSPIDER_ROOT") + "/cache/priceinfo"
Functions ¶
func AdminWebSessionMiddleware ¶ added in v0.12.6
func AdminWebSessionMiddleware(next echo.HandlerFunc) echo.HandlerFunc
AdminWebSessionMiddleware checks server-side session for protected adminweb pages.
func ClusterManagement ¶ added in v0.9.6
func ClusterMgmt ¶ added in v0.6.16
func ConnectionManagement ¶ added in v0.9.2
func Credential ¶
================ Credential Info Management create credential page
func CredentialManagement ¶ added in v0.9.2
func DNSZoneManagement ¶ added in v0.13.20
Handler function to render the DNS Zone management page
func DiskManagement ¶ added in v0.9.2
Handler function to render the Disk management page
func DownloadPriceInfo ¶ added in v0.8.6
func DriverManagement ¶ added in v0.9.2
DriverManagement - Handles the management of drivers
func FileSystemManagement ¶ added in v0.12.5
func HandleWebSocket ¶ added in v0.9.2
func KeyPairManagement ¶ added in v0.9.2
Handler function to render the KeyPair management page
func KeyPairMgmt ¶
func MyImageManagement ¶ added in v0.9.2
Handler function to render the MyImage management page
func MyImageMgmt ¶ added in v0.6.10
func NICManagement ¶ added in v0.12.33
NICManagement renders the NIC management page.
func NLBManagement ¶ added in v0.9.5
Handler function to render the NLB management page
func PriceInfoRequest ¶ added in v0.8.2
func PriceInfoTableList ¶ added in v0.8.2
PriceInfoTableList handles the display of CloudPrice to Table
func PublicIPManagement ¶ added in v0.12.33
PublicIPManagement renders the PublicIP management page.
func Quota ¶ added in v0.12.10
Quota renders the quota shell page (service type selector + AJAX-driven table).
func QuotaList ¶ added in v0.12.10
QuotaList returns the quota info for a service type as JSON for AJAX calls.
func QuotaServiceTypeList ¶ added in v0.12.10
QuotaServiceTypeList returns the service type list and provider name as JSON for AJAX calls.
func RDBMSCreateDatabase ¶ added in v0.12.20
RDBMSCreateDatabase creates a new database via the Spider REST API. For CSPs without CSP-native API (AWS, IBM), UserName/Password are forwarded as MasterUserName/MasterUserPassword.
func RDBMSCreateTable ¶ added in v0.12.20
RDBMSCreateTable creates a new table.
func RDBMSDeleteRow ¶ added in v0.12.20
RDBMSDeleteRow deletes rows from a table matching WHERE conditions.
func RDBMSDescribeTable ¶ added in v0.12.20
RDBMSDescribeTable returns column information for a table.
func RDBMSDropDatabase ¶ added in v0.12.20
RDBMSDropDatabase drops a database via the Spider REST API. For CSPs without CSP-native API (AWS, IBM), UserName/Password are forwarded as MasterUserName/MasterUserPassword.
func RDBMSDropTable ¶ added in v0.12.20
RDBMSDropTable drops a table.
func RDBMSInsertRow ¶ added in v0.12.20
RDBMSInsertRow inserts a row into a table.
func RDBMSListDatabases ¶ added in v0.12.20
RDBMSListDatabases lists all databases via the Spider REST API. For CSPs without CSP-native API (AWS, IBM), the caller supplies MasterUserName/MasterUserPassword.
func RDBMSListRows ¶ added in v0.12.20
RDBMSListRows returns rows from a table (with LIMIT).
func RDBMSListTables ¶ added in v0.12.20
RDBMSListTables lists all tables in the database.
func RDBMSManagement ¶ added in v0.12.20
Handler function to render the RDBMS management page
func RDBMSSecureTransportStatus ¶ added in v0.13.10
RDBMSSecureTransportStatus proxies to the core Spider API's GET /rdbms/{Name}/secure-transport, which reports whether the RDBMS instance enforces encrypted (TLS/SSL) client connections via standard SQL against the engine itself. This handler does no SQL work of its own — the core API (cmrt.GetRDBMSSecureTransportStatus) is the single implementation; this only bridges AdminWeb's session-cookie auth to the core API's Basic Auth, the same way trySpiderDatabaseCreateAPI does.
func RDBMSTestConnection ¶ added in v0.12.20
RDBMSTestConnection tests connectivity to an RDBMS instance.
func RegionManagement ¶ added in v0.9.2
func RegionZone ¶ added in v0.7.6
func S3Management ¶ added in v0.10.8
func SecurityGroupManagement ¶ added in v0.9.2
Handler function to render the SecurityGroup management page
func SecurityGroupMgmt ¶
func SetAPIMode ¶ added in v0.13.22
func SetAPIMode(mode string)
SetAPIMode is called once by restruntime at startup to mirror its apiMode setting here.
func SpiderletVMMointoring ¶ added in v0.9.8
func TopologyAllManagement ¶ added in v0.13.24
TopologyAllManagement renders one topology of every connection shown on the Dashboard (connections that have at least one resource). Each connection becomes a top-level group ("conn" node). Only the first connection's graph is fetched here; the others are sent as collapsed, not-yet-loaded groups (Lazy) and fetched by the page when they are first expanded (TopologyConnData), since querying every CSP up front can take a long time.
func TopologyConnData ¶ added in v0.13.24
TopologyConnData returns one connection's graph for the all-connections view (ids prefixed and roots placed under the connection group): {nodes, edges, error}.
func TopologyConnections ¶ added in v0.13.24
TopologyConnections returns the connections with resources for the topology page's selector: [{name, provider, region: "region/zone"}].
func TopologyManagement ¶ added in v0.12.33
TopologyManagement renders the topology visualization page.
func VMManagement ¶ added in v0.9.2
func VMMointoring ¶ added in v0.9.8
func VPCSubnetManagement ¶ added in v0.9.2
Handler function to render the VPC-Subnet management page
Types ¶
type ClaudeContent ¶ added in v0.10.3
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 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
APIUsername string
APIPassword string
}
DashboardData aggregates the data for rendering the dashboard
type DriverInfo ¶ added in v0.9.2
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 RegionInfo ¶ added in v0.9.2
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"`
PublicIPs int `json:"publicIPs"`
NICs int `json:"nics"`
Clusters int `json:"clusters"`
MyImages int `json:"myImages"`
S3Buckets int `json:"s3Buckets"`
RDBMSInstances int `json:"rdbmsInstances"`
// NA marks resources that the connection's driver does not support (key: resource name, ex: "cluster").
// Derived from the Driver Capability API on every render, so it follows driver changes dynamically.
NA map[string]bool `json:"na"`
}
ResourceCounts holds the counts for various resources
type S3BucketInfo ¶ added in v0.10.8
type S3ObjectInfo ¶ added in v0.10.8
type TemplateData ¶ added in v0.11.9
type TemplateData struct {
Data cres.CloudPrice
CachedFileName string
TotalItems int
SimpleMode string
APIUsername string
APIPassword string
}
TemplateData structure to render the HTML template
type TopoNode ¶ added in v0.12.33
type TopoNode struct {
ID string `json:"id"`
Name string `json:"name,omitempty"` // Spider NameId of a registered resource (used by delete); empty for unregistered nodes
Label string `json:"label"`
Kind string `json:"kind"` // vpc, subnet, sg, vm, nic, privateip, publicip, nlb, rdbms, cluster, nodegroup, k8snode
Parent string `json:"parent"` // compound parent node id
PrivateIP string `json:"privateIP,omitempty"`
PublicIP string `json:"publicIP,omitempty"`
Status string `json:"status,omitempty"`
Info map[string]string `json:"info,omitempty"` // extra key/values shown in the detail panel
Public bool `json:"public,omitempty"` // reachable from the Internet (public NLB, publicly accessible RDBMS)
Conn string `json:"conn,omitempty"` // connection name (all-connections view only; used by delete)
Lazy bool `json:"lazy,omitempty"` // connection group whose graph is loaded on first expand
InfoOrder []string `json:"infoOrder,omitempty"` // display order of Info keys (others follow, sorted)
}
type VMStatusMap ¶ added in v0.9.2
Source Files
¶
- AdminWeb-CIM.go
- AdminWeb-Cluster.go
- AdminWeb-Common.go
- AdminWeb-Connection.go
- AdminWeb-Credential.go
- AdminWeb-DBSpec.go
- AdminWeb-DNS-Zone.go
- AdminWeb-Dashboard.go
- AdminWeb-Disk.go
- AdminWeb-Driver.go
- AdminWeb-FileSystem.go
- AdminWeb-Frame.go
- AdminWeb-KeyPair.go
- AdminWeb-MGMT.go
- AdminWeb-Main.go
- AdminWeb-MyImage.go
- AdminWeb-NIC.go
- AdminWeb-NLB.go
- AdminWeb-PriceInfo-Request.go
- AdminWeb-PriceInfo-TableList.go
- AdminWeb-PublicIP.go
- AdminWeb-PublicImage.go
- AdminWeb-QuotaInfo.go
- AdminWeb-RDBMS-Query.go
- AdminWeb-RDBMS.go
- AdminWeb-Region.go
- AdminWeb-RegionZone.go
- AdminWeb-S3.go
- AdminWeb-SSHWebTerminal.go
- AdminWeb-SecurityGroup.go
- AdminWeb-Topology.go
- AdminWeb-VM.go
- AdminWeb-VMMon.go
- AdminWeb-VMSpec.go
- AdminWeb-VPC-Subnet.go