controller

package
v0.0.0-...-e06c804 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOnpremK8sAgent = errors.New("agent-based collection is not applicable to on-prem k8s connections")

ErrOnpremK8sAgent is returned when an agent-backed import is asked for an on-prem Kubernetes connection. Such a connection is registered by its kubeconfig and has no SSH host, so there is no in-guest agent to query. Group imports skip these connections instead of failing the whole group.

View Source
var IsReady = false
View Source
var OkMessage = model.SimpleMsg{}

Functions

func CheckReady

func CheckReady(c echo.Context) error

CheckReady func is for checking Honeybee server health.

@ID				health-check-readyz
@Summary		Check Ready
@Description	Check Honeybee is ready
@Tags [Admin]	System management
@Accept			json
@Produce		json
@Success		200 {object}	model.SimpleMsg			"Successfully get ready state."
@Failure		500	{object}	common.ErrorResponse	"Failed to check ready state."
@Router			/readyz [get]

func CreateConnectionInfo

func CreateConnectionInfo(c echo.Context) error

CreateConnectionInfo godoc

@ID				create-connection-info
@Summary		Create ConnectionInfo
@Description	Create the connection information.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			ConnectionInfo body model.CreateConnectionInfoReq true "Connection information of the node."
@Success		200	{object}	model.ConnectionInfo	"Successfully register the connection information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to register the connection information"
@Router			/source_group/{sgId}/connection_info [post]

func CreateSourceGroup

func CreateSourceGroup(c echo.Context) error

CreateSourceGroup godoc

@ID				register-source-group
@Summary		Register SourceGroup
@Description	Register the source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			SourceGroup body model.CreateSourceGroupReq true "source group of the node."
@Success		200	{object}	model.SourceGroupRes		"Successfully register the source group"
@Failure		400	{object}	common.ErrorResponse		"Sent bad request."
@Failure		500	{object}	common.ErrorResponse		"Failed to register the source group"
@Router			/source_group [post]

func DeleteConnectionInfo

func DeleteConnectionInfo(c echo.Context) error

DeleteConnectionInfo godoc

@ID				delete-connection-info
@Summary		Delete ConnectionInfo
@Description	Delete the connection information.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			connId path string true "ID of the connectionInfo"
@Success		200	{object}	model.SimpleMsg			"Successfully delete the connection information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to delete the connection information"
@Router			/source_group/{sgId}/connection_info/{connId} [delete]

func DeleteSourceGroup

func DeleteSourceGroup(c echo.Context) error

DeleteSourceGroup godoc

@ID				delete-source-group
@Summary		Delete SourceGroup
@Description	Delete the source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Success		200	{object}	model.SimpleMsg			"Successfully delete the source group"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to delete the source group"
@Router			/source_group/{sgId} [delete]

func DiscoverSourceGroupResources

func DiscoverSourceGroupResources(c echo.Context) error

DiscoverSourceGroupResources godoc

@ID				discover-source-group-resources
@Summary		Discover CSP resources for a SourceGroup
@Description	Lists VMs / K8s clusters / object-storage buckets / network load balancers / managed databases reachable through the CSP connection bound to this SourceGroup. Used by the UI to populate ConnectionInfo selection.
@Tags			[CSP] Discovery
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup (must be type=csp)"
@Param			resource_type query string true "Resource type to discover (vm | k8s | object_storage | nlb | rdbms)"
@Success		200	{object}	model.DiscoverRes		"Discovered resources"
@Failure		400	{object}	common.ErrorResponse	"Invalid request"
@Failure		500	{object}	common.ErrorResponse	"Discovery failed"
@Router			/source_group/{sgId}/discover [get]

func GetBenchmarkInfo

func GetBenchmarkInfo(c echo.Context) error

GetBenchmarkInfo godoc

@ID				get-benchmark-info
@Summary		Get Benchmark Info
@Description	Get the benchmark information of the connection information.
@Tags			[Import] BenchmarkInfo
@Accept			json
@Produce		json
@Param			connId path string true "ID of the connection info"
@Success		200	{object}	model.Benchmark			"Successfully get information of the benchmark."
@Success		200	{object}	model.SavedBenchmarkInfo		"Successfully get information of the benchmark."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the benchmark."
@Router			/bench/{connId} [get]

func GetCSP

func GetCSP(c echo.Context) error

GetCSP godoc

@ID				get-csp
@Summary		Get CSP metadata
@Description	Return the credential keys, regions, and other metadata for the given CSP. Name is matched case-insensitively.
@Tags			[CSP] Metadata
@Accept			json
@Produce		json
@Param			name path string true "CSP name (case-insensitive, e.g. aws or AWS)"
@Success		200	{object}	model.CSPInfo			"CSP metadata"
@Failure		400	{object}	common.ErrorResponse	"Unsupported or missing CSP name"
@Failure		500	{object}	common.ErrorResponse	"Failed to read CSP metadata"
@Router			/csp/{name} [get]

func GetConnectionInfo

func GetConnectionInfo(c echo.Context) error

GetConnectionInfo godoc

@ID				get-connection-info
@Summary		Get ConnectionInfo
@Description	Get the connection information.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			connId path string true "ID of the connectionInfo"
@Success		200	{object}	model.ConnectionInfo	"Successfully get the connection information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get the connection information"
@Router			/source_group/{sgId}/connection_info/{connId} [get]

func GetConnectionInfoDirectly

func GetConnectionInfoDirectly(c echo.Context) error

GetConnectionInfoDirectly godoc

@ID				get-connection-info-directly
@Summary		Get ConnectionInfo Directly
@Description	Get the connection information directly.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			connId path string true "ID of the connectionInfo"
@Success		200	{object}	model.ConnectionInfo	"Successfully get the connection information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get the connection information"
@Router			/connection_info/{connId} [get]

func GetDBInfo

func GetDBInfo(c echo.Context) error

GetDBInfo godoc

@ID				get-db-info
@Summary		Get Database Information
@Description	Get the database information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	model.DBInspectResult	"Successfully get information of the database."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the database."
@Router			/source_group/{sgId}/connection_info/{connId}/db [get]

func GetDBInfoRefined

func GetDBInfoRefined(c echo.Context) error

GetDBInfoRefined godoc

@ID				get-db-info-refined
@Summary		Get Refined Database Information
@Description	Get the refined database information of the connection information.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	sourcemodel.SourceDataMigrationModel	"Successfully get refined information of the database."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the database."
@Router			/source_group/{sgId}/connection_info/{connId}/db/refined [get]

func GetDBInfoSourceGroup

func GetDBInfoSourceGroup(c echo.Context) error

GetDBInfoSourceGroup godoc

@ID				get-db-info-source-group
@Summary		Get Database Information Source Group
@Description	Get the database information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.DBInfoList		"Successfully get information of the database."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the database."
@Router			/source_group/{sgId}/db [get]

func GetDBInfoSourceGroupRefined

func GetDBInfoSourceGroupRefined(c echo.Context) error

GetDBInfoSourceGroupRefined godoc

@ID				get-db-info-source-group-refined
@Summary		Get Refined Database Information Source Group
@Description	Get the refined database information for all connections in the source group.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	sourcemodel.SourceDataMigrationModel	"Successfully get refined information of the database."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the database."
@Router			/source_group/{sgId}/db/refined [get]

func GetDataInfo

func GetDataInfo(c echo.Context) error

GetDataInfo godoc

@ID				get-data-info
@Summary		Get Data Information
@Description	Get the data information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	data.MinIOData		"Successfully get information of the data."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the data."
@Router			/source_group/{sgId}/connection_info/{connId}/data [get]

func GetDataInfoRefined

func GetDataInfoRefined(c echo.Context) error

GetDataInfoRefined godoc

@ID				get-data-info-refined
@Summary		Get Refined Object Storage Information
@Description	Get the bucket of a CSP object-storage connection in the source model cm-beetle recommends a target bucket from. The values are those collected by import/infra.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	storagemodel.SourceObjectStorageModel	"Successfully get refined information of the bucket."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the bucket."
@Router			/source_group/{sgId}/connection_info/{connId}/data/refined [get]

func GetDataInfoSourceGroup

func GetDataInfoSourceGroup(c echo.Context) error

GetDataInfoSourceGroup godoc

@ID				get-data-info-source-group
@Summary		Get Data Information Source Group
@Description	Get the data information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.DataInfoList	"Successfully get information of the data."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the data."
@Router			/source_group/{sgId}/data [get]

func GetDataInfoSourceGroupRefined

func GetDataInfoSourceGroupRefined(c echo.Context) error

GetDataInfoSourceGroupRefined godoc

@ID				get-data-info-source-group-refined
@Summary		Get Refined Object Storage Information Source Group
@Description	Get every collected bucket of the source group's CSP object-storage connections in the source model cm-beetle recommends target buckets from. Connections without a collected bucket are left out.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	storagemodel.SourceObjectStorageModel	"Successfully get refined information of the buckets."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the buckets."
@Router			/source_group/{sgId}/data/refined [get]

func GetFSInfo

func GetFSInfo(c echo.Context) error

GetFSInfo godoc

@ID				get-fs-info
@Summary		Get Filesystem Information
@Description	Get the filesystem information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	sourcemodel.FSInfo		"Successfully get information of the filesystem."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the filesystem."
@Router			/source_group/{sgId}/connection_info/{connId}/fs [get]

func GetFSInfoRefined

func GetFSInfoRefined(c echo.Context) error

GetFSInfoRefined godoc

@ID				get-fs-info-refined
@Summary		Get Refined Filesystem Information
@Description	Get the refined filesystem information of the connection information.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	sourcemodel.SourceDataMigrationModel	"Successfully get refined information of the filesystem."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the filesystem."
@Router			/source_group/{sgId}/connection_info/{connId}/fs/refined [get]

func GetFSInfoSourceGroup

func GetFSInfoSourceGroup(c echo.Context) error

GetFSInfoSourceGroup godoc

@ID				get-fs-info-source-group
@Summary		Get Filesystem Information Source Group
@Description	Get the filesystem information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.FSInfoList		"Successfully get information of the filesystem."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the filesystem."
@Router			/source_group/{sgId}/fs [get]

func GetFSInfoSourceGroupRefined

func GetFSInfoSourceGroupRefined(c echo.Context) error

GetFSInfoSourceGroupRefined godoc

@ID				get-fs-info-source-group-refined
@Summary		Get Refined Filesystem Information Source Group
@Description	Get the refined filesystem information for all connections in the source group.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	sourcemodel.SourceDataMigrationModel	"Successfully get refined information of the filesystem."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the filesystem."
@Router			/source_group/{sgId}/fs/refined [get]

func GetHelmInfo

func GetHelmInfo(c echo.Context) error

GetHelmInfo godoc

@ID				get-helm-info
@Summary		Get Helm Information
@Description	Get the helm information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	kubernetes.Helm		"Successfully get information of the kubernetes."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the kubernetes."
@Router			/source_group/{sgId}/connection_info/{connId}/helm [get]

func GetHelmInfoSourceGroup

func GetHelmInfoSourceGroup(c echo.Context) error

GetHelmInfoSourceGroup godoc

@ID				get-helm-info-source-group
@Summary		Get helm Information Source Group
@Description	Get the helm information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.HelmInfoList	"Successfully get information of the helm."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the helm."
@Router		/source_group/{sgId}/helm [get]

func GetInfraInfo

func GetInfraInfo(c echo.Context) error

GetInfraInfo godoc

@ID				get-infra-info
@Summary		Get Infra Information
@Description	Get the infra information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	infra.Infra				"Successfully get information of the infra."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the infra."
@Router			/source_group/{sgId}/connection_info/{connId}/infra [get]

func GetInfraInfoRefined

func GetInfraInfoRefined(c echo.Context) error

GetInfraInfoRefined godoc

@ID				get-infra-info-refined
@Summary		Get Refined Infra Information
@Description	Get the refined infra information of the connection information.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	model.RefinedOnpremiseInfraModel	"Successfully get refined information of the infra."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the infra."
@Router			/source_group/{sgId}/connection_info/{connId}/infra/refined [get]

func GetInfraInfoSourceGroup

func GetInfraInfoSourceGroup(c echo.Context) error

GetInfraInfoSourceGroup godoc

@ID				get-infra-info-source-group
@Summary		Get Infra Information Source Group
@Description	Get the infra information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.InfraInfoList		"Successfully get information of the infra."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the infra."
@Router			/source_group/{sgId}/infra [get]

func GetInfraInfoSourceGroupRefined

func GetInfraInfoSourceGroupRefined(c echo.Context) error

GetInfraInfoSourceGroupRefined godoc

@ID				get-infra-info-source-group-refined
@Summary		Get Refined Infra Information Source Group
@Description	Get the refined infra information for all connections in the source group.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.RefinedOnpremiseInfraModel	"Successfully get refined information of the infra."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the infra."
@Router		/source_group/{sgId}/infra/refined [get]

func GetKubernetesInfo

func GetKubernetesInfo(c echo.Context) error

GetKubernetesInfo godoc

@ID				get-kubernetes-info
@Summary		Get Kubernetes Information
@Description	Get the kubernetes information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	kubernetes.Kubernetes		"Successfully get information of the kubernetes."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the kubernetes."
@Router			/source_group/{sgId}/connection_info/{connId}/kubernetes [get]

func GetKubernetesInfoSourceGroup

func GetKubernetesInfoSourceGroup(c echo.Context) error

GetKubernetesInfoSourceGroup godoc

@ID				get-kubernetes-info-source-group
@Summary		Get Kubernetes Information Source Group
@Description	Get the kubernetes information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.KubernetesInfoList	"Successfully get information of the kubernetes."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the kubernetes."
@Router		/source_group/{sgId}/kubernetes [get]

func GetObjectStorageInfo

func GetObjectStorageInfo(c echo.Context) error

GetObjectStorageInfo godoc

@ID				get-object-storage-info
@Summary		Get Object Storage Information
@Description	Get the object storage information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	sourcemodel.ObjectStorageInfo	"Successfully get information of the object storage."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the object storage."
@Router			/source_group/{sgId}/connection_info/{connId}/objectstorage [get]

func GetObjectStorageInfoRefined

func GetObjectStorageInfoRefined(c echo.Context) error

GetObjectStorageInfoRefined godoc

@ID				get-object-storage-info-refined
@Summary		Get Refined Object Storage Information
@Description	Get the refined object storage information of the connection information.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	sourcemodel.SourceDataMigrationModel	"Successfully get refined information of the object storage."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the object storage."
@Router			/source_group/{sgId}/connection_info/{connId}/objectstorage/refined [get]

func GetObjectStorageInfoSourceGroup

func GetObjectStorageInfoSourceGroup(c echo.Context) error

GetObjectStorageInfoSourceGroup godoc

@ID				get-object-storage-info-source-group
@Summary		Get Object Storage Information Source Group
@Description	Get the object storage information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.ObjectStorageInfoList	"Successfully get information of the object storage."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the object storage."
@Router			/source_group/{sgId}/objectstorage [get]

func GetObjectStorageInfoSourceGroupRefined

func GetObjectStorageInfoSourceGroupRefined(c echo.Context) error

GetObjectStorageInfoSourceGroupRefined godoc

@ID				get-object-storage-info-source-group-refined
@Summary		Get Refined Object Storage Information Source Group
@Description	Get the refined object storage information for all connections in the source group.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	sourcemodel.SourceDataMigrationModel	"Successfully get refined information of the object storage."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the object storage."
@Router			/source_group/{sgId}/objectstorage/refined [get]

func GetRDBMSInfo

func GetRDBMSInfo(c echo.Context) error

GetRDBMSInfo godoc

@ID				get-rdbms-info
@Summary		Get RDBMS Information
@Description	Get the database information of the connection information. A CSP managed database (resource_type rdbms) gives what the CSP driver reported; a VM gives the databases installed on it.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	model.RDBMSInfoList		"Successfully get information of the rdbms."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the rdbms."
@Router			/source_group/{sgId}/connection_info/{connId}/rdbms [get]

func GetRDBMSInfoRefined

func GetRDBMSInfoRefined(c echo.Context) error

GetRDBMSInfoRefined godoc

@ID				get-rdbms-info-refined
@Summary		Get Refined RDBMS Information
@Description	Get the refined database information of the connection information, in the source model cm-beetle recommends from. A value the source did not report is left empty for cm-beetle to fill in.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	rdbmsmodel.SourceRDBMSModel	"Successfully get refined information of the rdbms."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the rdbms."
@Router			/source_group/{sgId}/connection_info/{connId}/rdbms/refined [get]

func GetRDBMSInfoSourceGroup

func GetRDBMSInfoSourceGroup(c echo.Context) error

GetRDBMSInfoSourceGroup godoc

@ID				get-rdbms-info-source-group
@Summary		Get RDBMS Information Source Group
@Description	Get the database information for all connections in the source group. Connections that cannot hold a database or have not been collected are skipped.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.RDBMSInfoList		"Successfully get information of the rdbms."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the rdbms."
@Router			/source_group/{sgId}/rdbms [get]

func GetRDBMSInfoSourceGroupRefined

func GetRDBMSInfoSourceGroupRefined(c echo.Context) error

GetRDBMSInfoSourceGroupRefined godoc

@ID				get-rdbms-info-source-group-refined
@Summary		Get Refined RDBMS Information Source Group
@Description	Get the refined database information for all connections in the source group, in the source model cm-beetle recommends from. Connections that cannot hold a database or have not been collected are skipped.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	rdbmsmodel.SourceRDBMSModel	"Successfully get refined information of the rdbms."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the rdbms."
@Router			/source_group/{sgId}/rdbms/refined [get]

func GetSoftwareInfo

func GetSoftwareInfo(c echo.Context) error

GetSoftwareInfo godoc

@ID				get-software-info
@Summary		Get Software Information
@Description	Get the software information of the connection information.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	software.Software		"Successfully get information of the software."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the software."
@Router			/source_group/{sgId}/connection_info/{connId}/software [get]

func GetSoftwareInfoRefined

func GetSoftwareInfoRefined(c echo.Context) error

GetSoftwareInfoRefined godoc

@ID				get-software-info-refined
@Summary		Get Refined Software Information
@Description	Get the refined software information of the connection information.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	softwaremodel.SourceConnectionInfoSoftwareProperty	"Successfully get refined information of softwares."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the infra."
@Router			/source_group/{sgId}/connection_info/{connId}/software/refined [get]

func GetSoftwareInfoSourceGroup

func GetSoftwareInfoSourceGroup(c echo.Context) error

GetSoftwareInfoSourceGroup godoc

@ID				get-software-info-source-group
@Summary		Get Software Information Source Group
@Description	Get the software information for all connections in the source group.
@Tags			[Get] Get source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	model.SoftwareInfoList	"Successfully get information of the software."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the software."
@Router			/source_group/{sgId}/software [get]

func GetSoftwareInfoSourceGroupRefined

func GetSoftwareInfoSourceGroupRefined(c echo.Context) error

GetSoftwareInfoSourceGroupRefined godoc

@ID				get-software-info-source-group-refined
@Summary		Get Refined Software Information Source Group
@Description	Get the refined software information for all connections in the source group.
@Tags			[Get] Get refined source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	softwaremodel.SourceGroupSoftwareProperty		"Successfully get refined information of softwares."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get refined information of the software."
@Router		/source_group/{sgId}/software/refined [get]

func GetSourceGroup

func GetSourceGroup(c echo.Context) error

GetSourceGroup godoc

@ID				get-source-group
@Summary		Get SourceGroup
@Description	Get the source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Success		200	{object}	model.SourceGroupRes	"Successfully get the source group"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get the source group"
@Router			/source_group/{sgId} [get]

func ImportDB

func ImportDB(c echo.Context) error

ImportDB godoc

@ID				import-db
@Summary		Import database
@Description	Import the database information of the connection information. With no db_name on the connection, every user database on the server is inspected.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Param			ImportDBReq body model.ImportDBReq false "Metric selection."
@Success		200	{object}	model.SavedDBInfo		"Successfully saved the database information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the database information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/db [post]

func ImportDBSourceGroup

func ImportDBSourceGroup(c echo.Context) error

ImportDBSourceGroup godoc

@ID				import-db-source-group
@Summary		Import database Source Group
@Description	Import database information for all connections in the source group. Each connection is inspected at its own db_name and db_pg_schema.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			ImportDBReq body model.ImportDBReq false "Metric selection applied to every connection."
@Success		200	{object}	[]model.SavedDBInfo		"Successfully saved the database information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the database information"
@Router			/source_group/{sgId}/import/db [post]

func ImportData

func ImportData(c echo.Context) error

ImportData godoc

@ID				import-data
@Summary		Import data
@Description	Import the data information.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	model.SavedDataInfo	"Successfully saved the data information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the data information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/data [post]

func ImportDataSourceGroup

func ImportDataSourceGroup(c echo.Context) error

ImportDataSourceGroup godoc

@ID				import-data-source-group
@Summary		Import Data Source Group
@Description	Import data information for all connections in the source group.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	[]model.SavedDataInfo	"Successfully saved the data information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the data information"
@Router			/source_group/{sgId}/import/data [post]

func ImportFS

func ImportFS(c echo.Context) error

ImportFS godoc

@ID				import-fs
@Summary		Import filesystem
@Description	Import the filesystem information of the connection information. The path inspected is the connection's fs_scan_path.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Param			ImportFSReq body model.ImportFSReq false "Scan depth and metric selection."
@Success		200	{object}	model.SavedFSInfo		"Successfully saved the filesystem information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the filesystem information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/fs [post]

func ImportFSSourceGroup

func ImportFSSourceGroup(c echo.Context) error

ImportFSSourceGroup godoc

@ID				import-fs-source-group
@Summary		Import filesystem Source Group
@Description	Import filesystem information for all connections in the source group. Each connection is inspected at its own fs_scan_path.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			ImportFSReq body model.ImportFSReq false "Scan depth and metric selection applied to every connection."
@Success		200	{object}	[]model.SavedFSInfo		"Successfully saved the filesystem information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the filesystem information"
@Router			/source_group/{sgId}/import/fs [post]

func ImportHelm

func ImportHelm(c echo.Context) error

ImportHelm godoc

@ID				import-helm
@Summary		Import helm
@Description	Import the helm information.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	model.SavedHelmInfo	"Successfully saved the helm information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the helm information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/helm [post]

func ImportHelmSourceGroup

func ImportHelmSourceGroup(c echo.Context) error

ImportHelmSourceGroup godoc

@ID				import-helm-source-group
@Summary		Import helm Source Group
@Description	Import helm information for all connections in the source group.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	[]model.SavedHelmInfo	"Successfully saved the helm information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the helm information"
@Router			/source_group/{sgId}/import/helm [post]

func ImportInfra

func ImportInfra(c echo.Context) error

ImportInfra godoc

@ID				import-infra
@Summary		Import Infra
@Description	Import the infra information.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Param			count_objects query bool false "For an object-storage connection, count the bucket's objects and total size by listing every object. Default true."
@Success		200	{object}	model.SavedInfraInfo	"Successfully saved the infra information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the infra information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/infra [post]

func ImportInfraSourceGroup

func ImportInfraSourceGroup(c echo.Context) error

ImportInfraSourceGroup godoc

@ID				import-infra-source-group
@Summary		Import Infra Source Group
@Description	Import infra information for all connections in the source group.
@Tags		[Import] Import source info
@Accept		json
@Produce		json
@Param		sgId path string true "ID of the source group."
@Param		count_objects query bool false "For object-storage connections, count each bucket's objects and total size by listing every object. Default true."
@Success		200	{object}	[]model.SavedInfraInfo	"Successfully saved the infra information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the infra information"
@Router		/source_group/{sgId}/import/infra [post]

func ImportKubernetes

func ImportKubernetes(c echo.Context) error

ImportKubernetes godoc

@ID				import-kubernetes
@Summary		Import kubernetes
@Description	Import the kubernetes information.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Success		200	{object}	model.SavedKubernetesInfo	"Successfully saved the kubernetes information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the kubernetes information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/kubernetes [post]

func ImportKubernetesSourceGroup

func ImportKubernetesSourceGroup(c echo.Context) error

ImportKubernetesSourceGroup godoc

@ID				import-kubernetes-source-group
@Summary		Import Kubernetes Source Group
@Description	Import kubernetes information for all connections in the source group.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Success		200	{object}	[]model.SavedKubernetesInfo	"Successfully saved the kubernetes information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the kubernetes information"
@Router			/source_group/{sgId}/import/kubernetes [post]

func ImportObjectStorage

func ImportObjectStorage(c echo.Context) error

ImportObjectStorage godoc

@ID				import-object-storage
@Summary		Import object storage
@Description	Import the object storage information of the connection information. The bucket and prefix inspected are the connection's os_scan_bucket and os_scan_prefix.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Param			ImportObjectStorageReq body model.ImportObjectStorageReq false "Metric selection."
@Success		200	{object}	model.SavedObjectStorageInfo	"Successfully saved the object storage information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the object storage information"
@Router			/source_group/{sgId}/connection_info/{connId}/import/objectstorage [post]

func ImportObjectStorageSourceGroup

func ImportObjectStorageSourceGroup(c echo.Context) error

ImportObjectStorageSourceGroup godoc

@ID				import-object-storage-source-group
@Summary		Import object storage Source Group
@Description	Import object storage information for all connections in the source group. Each connection is inspected at its own os_scan_bucket and os_scan_prefix.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			ImportObjectStorageReq body model.ImportObjectStorageReq false "Metric selection applied to every connection."
@Success		200	{object}	[]model.SavedObjectStorageInfo	"Successfully saved the object storage information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the object storage information"
@Router			/source_group/{sgId}/import/objectstorage [post]

func ImportSoftware

func ImportSoftware(c echo.Context) error

ImportSoftware godoc

@ID				import-software
@Summary		Import software
@Description	Import the software information.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			connId path string true "ID of the connection info."
@Param			show_default_packages query bool false "Enable for show all packages include default packages. (Default: false)"
@Success		200	{object}	model.SavedSoftwareInfo	"Successfully saved the software information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the software information"
@Router		/source_group/{sgId}/connection_info/{connId}/import/software [post]

func ImportSoftwareSourceGroup

func ImportSoftwareSourceGroup(c echo.Context) error

ImportSoftwareSourceGroup godoc

@ID				import-software-source-group
@Summary		Import Software Source Group
@Description	Import software information for all connections in the source group.
@Tags			[Import] Import source info
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the source group."
@Param			show_default_packages query bool false "Enable for show all packages include default packages. (Default: false)"
@Success		200	{object}	[]model.SavedSoftwareInfo	"Successfully saved the software information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to save the software information"
@Router			/source_group/{sgId}/import/software [post]

func ListCSP

func ListCSP(c echo.Context) error

ListCSP godoc

@ID				list-csp
@Summary		List supported CSPs
@Description	Return the list of CSPs supported by the linked cb-spider drivers.
@Tags			[CSP] Metadata
@Accept			json
@Produce		json
@Success		200	{object}	model.ListCSPRes		"List of CSP names"
@Failure		500	{object}	common.ErrorResponse	"Failed to read CSP metadata"
@Router			/csp [get]

func ListConnectionInfo

func ListConnectionInfo(c echo.Context) error

ListConnectionInfo godoc

@ID				list-connection-info
@Summary		List ConnectionInfo
@Description	Get a list of connection information.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			page query string false "Page of the connection information list."
@Param			row query string false "Row of the connection information list."
@Param			name query string false "Name of the connection information."
@Param			description query string false "Description of the connection information."
@Param			ip_address query string false "IP address of the connection information."
@Param			ssh_port query string false "SSH port of the connection information."
@Param			user query string false "User of the connection information."
@Success		200	{object}	[]model.ListConnectionInfoRes	"Successfully get a list of connection information."
@Failure		400	{object}	common.ErrorResponse			"Sent bad request."
@Failure		500	{object}	common.ErrorResponse			"Failed to get a list of connection information."
@Router			/source_group/{sgId}/connection_info [get]

func ListSourceGroup

func ListSourceGroup(c echo.Context) error

ListSourceGroup godoc

@ID				list-source-group
@Summary		List SourceGroup
@Description	Get a list of source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			page query string false "Page of the source group list."
@Param			row query string false "Row of the source group list."
@Param			name query string false "Name of the source group."
@Param			description query string false "Description of the source group."
@Success		200	{object}	[]model.ListSourceGroupRes		"Successfully get a list of source group."
@Failure		400	{object}	common.ErrorResponse			"Sent bad request."
@Failure		500	{object}	common.ErrorResponse			"Failed to get a list of source group."
@Router			/source_group [get]

func ListSourceGroupRegions

func ListSourceGroupRegions(c echo.Context) error

ListSourceGroupRegions godoc

@ID				list-source-group-regions
@Summary		List CSP regions for a source group
@Description	Return the CSP's available regions and zones, queried live via the source group's stored credential. CSP-type source groups only.
@Tags			[CSP] Metadata
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup (csp type)"
@Success		200	{object}	model.ListRegionRes		"Regions and zones"
@Failure		400	{object}	common.ErrorResponse	"Not a csp-type source group / missing sgId"
@Failure		500	{object}	common.ErrorResponse	"Failed to load the CSP credential or query the CSP"
@Router			/source_group/{sgId}/region [get]

func MigratePlaintextSecretsToOpenBao

func MigratePlaintextSecretsToOpenBao()

MigratePlaintextSecretsToOpenBao moves SSH secrets that are still stored in the SQLite DB into OpenBao, then blanks the DB columns. Connections created before the OpenBao backend was introduced kept their password/private_key directly in the DB (in plaintext); this lets those rows self-heal on the next restart once OpenBao is configured.

It runs at startup and is a no-op when OpenBao is disabled or when no DB row still carries a secret, so it is safe (and idempotent) to call every boot.

func RefreshConnectionInfoStatus

func RefreshConnectionInfoStatus(c echo.Context) error

RefreshConnectionInfoStatus godoc

@ID				refresh-connection-info-status
@Summary		Refresh Connection Info Status
@Description	Refresh the connection info status.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			connId path string true "ID of the connectionInfo"
@Success		200	{object}	model.SimpleMsg			"Successfully refresh the source group"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to refresh the source group"
@Router			/source_group/{sgId}/connection_info/{connId}/refresh [put]

func RefreshConnectionInfoStatusDirectly

func RefreshConnectionInfoStatusDirectly(c echo.Context) error

RefreshConnectionInfoStatusDirectly godoc

@ID				refresh-connection-info-status-directly
@Summary		Refresh Connection Info Status Directly
@Description	Refresh the connection info status directly.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			connId path string true "ID of the connectionInfo"
@Success		200	{object}	model.SimpleMsg			"Successfully refresh the source group"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to refresh the source group"
@Router			/connection_info/{connId}/refresh [put]

func RefreshSourceGroupConnectionInfoStatus

func RefreshSourceGroupConnectionInfoStatus(c echo.Context) error

RefreshSourceGroupConnectionInfoStatus godoc

@ID				refresh-source-group-connection-info-status
@Summary		Refresh SourceGroup Connection Info Status
@Description	Refresh connection info status of the source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Success		200	{object}	model.SimpleMsg			"Successfully refresh the source group"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to refresh the source group"
@Router			/source_group/{sgId}/refresh [put]

func RegisterTargetInfoToSourceGroup

func RegisterTargetInfoToSourceGroup(c echo.Context) error

RegisterTargetInfoToSourceGroup godoc

@ID				register-target-to-source-group
@Summary		Register TargetInfo to SourceGroup
@Description	Register target information to the source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			TargetInfo body model.RegisterTargetInfoReq true "Target info data received from infra migration via beetle."
@Success		200	{object}	model.SourceGroup	"Successfully update the source group"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to update the source group"
@Router			/source_group/{sgId}/target [post]

func RunBenchmarkInfo

func RunBenchmarkInfo(c echo.Context) error

RunBenchmarkInfo godoc

@ID				run-benchmark-info
@Summary		Run Benchmark Information
@Description	Run the benchmark information of the connection information. If no Benchmark Agent is present on the connected server, it will be automatically installed, and the benchmark will be executed.
@Tags			[Import] BenchmarkInfo
@Accept			json
@Produce		json
@Param			connId path string true "ID of the connection info"
@Param			types query string false "Comma-separated types for benchmarking (e.g., cpus, cpum, memR, memW, fioR, fioW, dbR, dbW)" default(cpus,cpum,memR,memW,fioR,fioW)
@Success		200	{object}	model.Benchmark			"Successfully get information of the benchmark."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to get information of the benchmark."
@Router			/bench/{connId}/run [post]

func StopBenchmarkInfo

func StopBenchmarkInfo(c echo.Context) error

StopBenchmarkInfo godoc

@ID				stop-benchmark
@Summary		Stop Benchmark
@Description	Stop the benchmark
@Tags			[Import] BenchmarkInfo
@Accept			json
@Produce		json
@Param			connId path string true "ID of the connection info"
@Success		200	{object}	model.SimpleMsg				"Benchmark Stopped."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to stop of the benchmark."
@Router			/bench/{connId}/stop [post]

func UninstallAgent

func UninstallAgent(c echo.Context) error

UninstallAgent godoc

@ID				uninstall-agent
@Summary		Uninstall Agent
@Description	Uninstall cm-honeybee-agent from the connection's host over SSH. It is kept (not removed) when another connection on the same host (same ip_address) still uses it. This does not delete the connection record.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			connId path string true "ID of the connectionInfo"
@Success		200	{object}	model.SimpleMsg			"Agent uninstalled, or kept because it is still shared."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to uninstall the agent."
@Router			/source_group/{sgId}/connection_info/{connId}/agent [delete]

func UninstallAgentSourceGroup

func UninstallAgentSourceGroup(c echo.Context) error

UninstallAgentSourceGroup godoc

@ID				uninstall-agent-source-group
@Summary		Uninstall Agent (Source Group)
@Description	Uninstall cm-honeybee-agent from every host in the source group over SSH. Each host is processed once; a host is kept (not removed) when a connection in another source group still uses it. This does not delete the connection records.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Success		200	{object}	model.SimpleMsg			"Per-host uninstall results."
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to uninstall the agents."
@Router			/source_group/{sgId}/agent [delete]

func UpdateConnectionInfo

func UpdateConnectionInfo(c echo.Context) error

UpdateConnectionInfo godoc

@ID				update-connection-info
@Summary		Update ConnectionInfo
@Description	Update the connection information.
@Tags			[On-premise] ConnectionInfo
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			connId path string true "ID of the connectionInfo"
@Param			ConnectionInfo body model.CreateConnectionInfoReq true "Connection information to modify."
@Success		200	{object}	model.ConnectionInfo	"Successfully update the connection information"
@Failure		400	{object}	common.ErrorResponse	"Sent bad request."
@Failure		500	{object}	common.ErrorResponse	"Failed to update the connection information"
@Router			/source_group/{sgId}/connection_info/{connId} [put]

func UpdateSourceGroup

func UpdateSourceGroup(c echo.Context) error

UpdateSourceGroup godoc

@ID				update-source-group
@Summary		Update SourceGroup
@Description	Update the source group.
@Tags			[On-premise] SourceGroup
@Accept			json
@Produce		json
@Param			sgId path string true "ID of the SourceGroup"
@Param			SourceGroup body model.UpdateSourceGroupReq true	"source group to modify."
@Success		200	{object}	model.SourceGroup					"Successfully update the source group"
@Failure		400	{object}	common.ErrorResponse				"Sent bad request."
@Failure		500	{object}	common.ErrorResponse				"Failed to update the source group"
@Router			/source_group/{sgId} [put]

Types

type AgentUninstallResult

type AgentUninstallResult struct {
	Host    string `json:"host"`
	Message string `json:"message"`
}

AgentUninstallResult is one host's outcome in a source-group agent uninstall.

Jump to

Keyboard shortcuts

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