Documentation
¶
Index ¶
- func AddCluster(cluster *OwlCluster) (int64, error)
- func DelCluster(id int64) error
- func ListClusterName(userId uint, filter bool, cType string) ([]string, error)
- func ListDB(clusterName string, userId uint, filter bool) ([]string, error)
- func ListTable(clusterName, dbName string) ([]string, error)
- func SetClusterDao(impl ClusterDao)
- func UpdateCluster(cluster *OwlCluster) error
- type ClusterDao
- type DBInfoTool
- type OwlCluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCluster ¶
func AddCluster(cluster *OwlCluster) (int64, error)
func DelCluster ¶
func ListClusterName ¶
func SetClusterDao ¶
func SetClusterDao(impl ClusterDao)
func UpdateCluster ¶
func UpdateCluster(cluster *OwlCluster) error
Types ¶
type ClusterDao ¶
type ClusterDao interface { AddCluster(db *gorm.DB, cluster *OwlCluster) (int64, error) UpdateCluster(db *gorm.DB, cluster *OwlCluster) error DelCluster(db *gorm.DB, id int64) error GetClusterByName(db *gorm.DB, clusterName string) (*OwlCluster, error) ListCluster(db *gorm.DB, pageInfo request.SortPageInfo) ([]OwlCluster, error) ListAllCluster(db *gorm.DB) ([]OwlCluster, error) }
type OwlCluster ¶
type OwlCluster struct { ID int64 `json:"id" gorm:"column:id"` Name string `json:"name" gorm:"column:name"` Description string `json:"description" gorm:"column:description"` Addr string `json:"addr" gorm:"column:addr"` //ip : port User string `json:"user" gorm:"column:user"` Pwd string `json:"pwd" gorm:"column:pwd"` CType string `json:"c_type" gorm:"column:ctype"` Ct int64 `json:"ct" gorm:"column:ct"` Ut int64 `json:"ut" gorm:"column:ut"` Operator string `json:"operator" gorm:"column:operator"` }
todo, list support type, backend and ui
func GetClusterByName ¶
func GetClusterByName(name string) (*OwlCluster, error)
func ListCluster ¶
func ListCluster(pageInfo request.SortPageInfo) ([]OwlCluster, error)
func ListClusterForUI ¶
func ListClusterForUI(pageInfo request.SortPageInfo) ([]OwlCluster, error)
Click to show internal directories.
Click to hide internal directories.