Documentation
¶
Index ¶
- Constants
- type Instance
- type InstanceDB
- func (db *InstanceDB) GetByEngineAndTenantGroup(engine string, tenantGroup string) (*Instance, error)
- func (db *InstanceDB) GetByEngineAndVersionAndAz(engine string, version string, az string) (*Instance, error)
- func (db *InstanceDB) GetByFields(fields map[string]interface{}) (*Instance, error)
- func (db *InstanceDB) GetByID(id string) (*Instance, error)
- type InstanceTenant
- type InstanceTenantDB
- func (db *InstanceTenantDB) GetByEngineAndTenantGroup(engine string, tenantGroup string) (*InstanceTenant, error)
- func (db *InstanceTenantDB) GetByFields(fields map[string]interface{}) (*InstanceTenant, error)
- func (db *InstanceTenantDB) GetByID(id string) (*InstanceTenant, error)
- func (db *InstanceTenantDB) GetByTenantGroup(group string) ([]*InstanceTenant, error)
- func (db *InstanceTenantDB) GetClusterNameByTenantGroup(group string) (string, error)
- func (db *InstanceTenantDB) GetInstanceByTenantGroup(group string) (*InstanceTenant, error)
- type LogDeployment
- type LogDeploymentDB
- func (db *LogDeploymentDB) GetByClusterName(clusterName string, logType LogType) (*LogDeployment, error)
- func (db *LogDeploymentDB) GetByClusterNameAndOrgId(clusterName, orgId string, logType LogType) (*LogDeployment, error)
- func (db *LogDeploymentDB) GetByOrgId(orgId string, logType LogType) (*LogDeployment, error)
- type LogInstance
- type LogInstanceDB
- type LogServiceInstance
- type LogServiceInstanceDB
- type LogType
- type Project
- type ProjectDB
- type Tmc
- type TmcDB
- type TmcIni
- type TmcIniDB
- type TmcRequestRelation
- type TmcRequestRelationDB
- type TmcVersion
- type TmcVersionDB
Constants ¶
View Source
const ( TableInstance = "tb_tmc_instance" TableInstanceTenant = "tb_tmc_instance_tenant" TableTmc = "tb_tmc" TableTmcVersion = "tb_tmc_version" TableRequestRelation = "tb_tmc_request_relation" TableTmcIni = "tb_tmc_ini" TableProject = "sp_project" TableLogDeployment = "sp_log_deployment" TableLogInstance = "sp_log_instance" TableLogServiceInstance = "sp_log_service_instance" )
tables name
View Source
const EngineMenuJumpKeyPrefix = "MK_JUMP_"
View Source
const LogTypeLogAnalytics = LogType("log-analytics")
View Source
const LogTypeLogService = LogType("log-service")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
ID string `gorm:"column:id;primary_key"`
Engine string `gorm:"column:engine"`
Version string `gorm:"column:version"`
ReleaseID string `gorm:"column:release_id"`
Status string `gorm:"column:status"`
Az string `gorm:"column:az"`
Config string `gorm:"column:config"`
Options string `gorm:"column:options"`
IsCustom string `gorm:"column:is_custom;default:'N'"`
IsDeleted string `gorm:"column:is_deleted;default:'N'"`
CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP"`
UpdateTime time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP"`
}
Instance .
type InstanceDB ¶
InstanceDB .
func (*InstanceDB) GetByEngineAndTenantGroup ¶
func (db *InstanceDB) GetByEngineAndTenantGroup(engine string, tenantGroup string) (*Instance, error)
func (*InstanceDB) GetByEngineAndVersionAndAz ¶
func (*InstanceDB) GetByFields ¶
func (db *InstanceDB) GetByFields(fields map[string]interface{}) (*Instance, error)
type InstanceTenant ¶
type InstanceTenant struct {
ID string `gorm:"column:id;primary_key"`
InstanceID string `gorm:"column:instance_id"`
Config string `gorm:"column:config"`
Options string `gorm:"column:options"`
TenantGroup string `gorm:"column:tenant_group"`
Engine string `gorm:"column:engine"`
Az string `gorm:"column:az"`
CreateTime time.Time `gorm:"column:create_time"`
UpdateTime time.Time `gorm:"column:update_time"`
IsDeleted string `gorm:"column:is_deleted"`
}
InstanceTenant .
type InstanceTenantDB ¶
InstanceTenantDB .
func (*InstanceTenantDB) GetByEngineAndTenantGroup ¶
func (db *InstanceTenantDB) GetByEngineAndTenantGroup(engine string, tenantGroup string) (*InstanceTenant, error)
func (*InstanceTenantDB) GetByFields ¶
func (db *InstanceTenantDB) GetByFields(fields map[string]interface{}) (*InstanceTenant, error)
func (*InstanceTenantDB) GetByID ¶
func (db *InstanceTenantDB) GetByID(id string) (*InstanceTenant, error)
func (*InstanceTenantDB) GetByTenantGroup ¶
func (db *InstanceTenantDB) GetByTenantGroup(group string) ([]*InstanceTenant, error)
func (*InstanceTenantDB) GetClusterNameByTenantGroup ¶
func (db *InstanceTenantDB) GetClusterNameByTenantGroup(group string) (string, error)
func (*InstanceTenantDB) GetInstanceByTenantGroup ¶ added in v1.3.0
func (db *InstanceTenantDB) GetInstanceByTenantGroup(group string) (*InstanceTenant, error)
type LogDeployment ¶
type LogDeployment struct {
ID int `gorm:"column:id;primary_key"`
OrgId string `gorm:"column:org_id"`
ClusterName string `gorm:"column:cluster_name"`
ClusterType int `gorm:"column:cluster_type"`
EsUrl string `gorm:"column:es_url"`
EsConfig string `gorm:"column:es_config"`
KafkaServers string `gorm:"column:kafka_servers"`
KafkaConfig string `gorm:"column:kafka_config"`
CollectorUrl string `gorm:"column:collector_url"`
Domain string `gorm:"column:domain"`
Created time.Time `gorm:"column:created"`
Updated time.Time `gorm:"column:updated"`
LogType string `gorm:"column:log_type;default:'log-analytics'"`
}
func (LogDeployment) TableName ¶
func (LogDeployment) TableName() string
type LogDeploymentDB ¶
func (*LogDeploymentDB) GetByClusterName ¶
func (db *LogDeploymentDB) GetByClusterName(clusterName string, logType LogType) (*LogDeployment, error)
func (*LogDeploymentDB) GetByClusterNameAndOrgId ¶
func (db *LogDeploymentDB) GetByClusterNameAndOrgId(clusterName, orgId string, logType LogType) (*LogDeployment, error)
func (*LogDeploymentDB) GetByOrgId ¶ added in v1.3.0
func (db *LogDeploymentDB) GetByOrgId(orgId string, logType LogType) (*LogDeployment, error)
type LogInstance ¶
type LogInstance struct {
ID int `gorm:"column:id;primary_key"`
LogKey string `gorm:"column:log_key"`
OrgId string `gorm:"column:org_id"`
OrgName string `gorm:"column:org_name"`
ClusterName string `gorm:"column:cluster_name"`
ProjectId string `gorm:"column:project_id"`
ProjectName string `gorm:"column:project_name"`
Workspace string `gorm:"column:workspace"`
ApplicationId string `gorm:"column:application_id"`
ApplicationName string `gorm:"column:application_name"`
RuntimeId string `gorm:"column:runtime_id"`
RuntimeName string `gorm:"column:runtime_name"`
Config string `gorm:"column:config"`
Version string `gorm:"column:version"`
Plan string `gorm:"column:plan"`
IsDelete int `gorm:"column:is_delete"`
Created time.Time `gorm:"column:created"`
Updated time.Time `gorm:"column:updated"`
LogType string `gorm:"column:log_type;default:'log-analytics'"`
}
func (LogInstance) TableName ¶
func (LogInstance) TableName() string
type LogInstanceDB ¶
func (*LogInstanceDB) GetLatestByLogKey ¶
func (db *LogInstanceDB) GetLatestByLogKey(logKey string, logType LogType) (*LogInstance, error)
func (*LogInstanceDB) GetListByClusterAndProjectIdAndWorkspace ¶ added in v1.5.0
func (db *LogInstanceDB) GetListByClusterAndProjectIdAndWorkspace(clusterName, projectId, workspace string) ([]LogInstance, error)
type LogServiceInstance ¶ added in v1.3.0
type LogServiceInstance struct {
ID string `gorm:"column:id;primary_key"`
EsUrls string `gorm:"column:es_urls"`
EsConfig string `gorm:"column:es_config"`
}
func (LogServiceInstance) TableName ¶ added in v1.3.0
func (LogServiceInstance) TableName() string
type LogServiceInstanceDB ¶ added in v1.3.0
func (*LogServiceInstanceDB) AddOrUpdateEsUrls ¶ added in v1.3.0
func (db *LogServiceInstanceDB) AddOrUpdateEsUrls(instanceId, esUrls, esConfig string) error
func (*LogServiceInstanceDB) GetFirst ¶ added in v1.3.0
func (db *LogServiceInstanceDB) GetFirst() (*LogServiceInstance, error)
type Project ¶
type Project struct {
ID int `gorm:"column:id;primary_key"`
Identity string `gorm:"column:identity"`
Name string `gorm:"column:name"`
Description string `gorm:"column:description"`
Ats string `gorm:"column:ats"`
Callback string `gorm:"column:callback"`
ProjectId string `gorm:"column:project_id"`
CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP"`
UpdateTime time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP"`
IsDeleted string `gorm:"column:is_deleted;default:'N'"`
}
type Tmc ¶
type Tmc struct {
ID int `gorm:"column:id;primary_key"`
Name string `gorm:"column:name"`
Engine string `gorm:"column:engine"`
ServiceType string `gorm:"column:service_type"`
DeployMode string `gorm:"column:deploy_mode"`
IsDeleted string `gorm:"column:is_deleted"`
CreateTime time.Time `gorm:"column:create_time"`
UpdateTime time.Time `gorm:"column:update_time"`
}
Tmc .
type TmcIni ¶
type TmcIni struct {
ID int `gorm:"column:id,primary_key"`
IniName string `gorm:"column:ini_name"`
IniDesc string `gorm:"column:ini_desc"`
IniValue string `gorm:"column:ini_value"`
CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP"`
UpdateTime time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP"`
IsDeleted string `gorm:"column:is_deleted;default:'N'"`
}
type TmcRequestRelation ¶
type TmcRequestRelation struct {
ID int `gorm:"column:id;primary_key;"`
ParentRequestId string `gorm:"column:parent_request_id"`
ChildRequestId string `gorm:"column:child_request_id"`
CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP"`
UpdateTime time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP"`
IsDeleted string `gorm:"column:is_deleted;default:'N'"`
}
func (TmcRequestRelation) TableName ¶
func (TmcRequestRelation) TableName() string
type TmcRequestRelationDB ¶
TmcRequestRelationDB .
func (*TmcRequestRelationDB) DeleteRequestRelation ¶
func (db *TmcRequestRelationDB) DeleteRequestRelation(parentId string, childId string) error
func (*TmcRequestRelationDB) GetChildRequestIdsByParentId ¶
func (db *TmcRequestRelationDB) GetChildRequestIdsByParentId(parentId string) ([]string, error)
type TmcVersion ¶
type TmcVersion struct {
ID int `gorm:"column:id;primary_key"`
Engine string `gorm:"column:engine"`
Version string `gorm:"column:version"`
ReleaseId string `gorm:"column:release_id"`
CreateTime time.Time `gorm:"column:create_time"`
UpdateTime time.Time `gorm:"column:update_time"`
IsDeleted string `gorm:"column:is_deleted"`
}
TmcVersion .
func (TmcVersion) TableName ¶
func (TmcVersion) TableName() string
type TmcVersionDB ¶
func (*TmcVersionDB) GetByEngine ¶
func (db *TmcVersionDB) GetByEngine(engine string, version string) (*TmcVersion, error)
func (*TmcVersionDB) GetLatestVersionByEngine ¶
func (db *TmcVersionDB) GetLatestVersionByEngine(engine string) (*TmcVersion, error)
func (*TmcVersionDB) UpdateReleaseId ¶
func (db *TmcVersionDB) UpdateReleaseId(engine string, version string, releaseId string) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.