Documentation ¶
Index ¶
- Constants
- type DB
- type LogDeployment
- type LogDeploymentDB
- func (db *LogDeploymentDB) List() ([]*LogDeployment, error)
- func (db *LogDeploymentDB) QueryByClusters(clusters ...string) ([]*LogDeployment, error)
- func (db *LogDeploymentDB) QueryByOrgID(orgID int64) ([]*LogDeployment, error)
- func (db *LogDeploymentDB) QueryByOrgIDAndClusters(orgID int64, clusters ...string) ([]*LogDeployment, error)
- type LogInstance
- type LogInstanceDB
- type LogServiceInstance
- type LogServiceInstanceDB
Constants ¶
View Source
const LogDeploymentTable = "sp_log_deployment"
LogDeploymentTable .
View Source
const LogServiceInstanceTable = "sp_log_service_instance"
LogServiceInstanceTable .
View Source
const TableLogInstance = "sp_log_instance"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { *gorm.DB LogDeployment LogDeploymentDB LogServiceInstanceDB LogServiceInstanceDB LogInstanceDB LogInstanceDB }
DB .
type LogDeployment ¶
type LogDeployment struct { ID int64 `gorm:"column:id" json:"id"` OrgID string `gorm:"column:org_id" json:"org_id"` ClusterName string `gorm:"column:cluster_name" json:"cluster_name"` ClusterType int `gorm:"column:cluster_type" json:"cluster_type"` ESURL string `gorm:"column:es_url" json:"es_url"` ESConfig string `gorm:"column:es_config" json:"es_config"` CollectorURL string `gorm:"column:collector_url" json:"collector_url"` Domain string `gorm:"column:domain" json:"domain"` LogType string `gorm:"column:log_type" json:"log_type"` }
LogDeployment .
type LogDeploymentDB ¶
LogDeploymentDB .
func (*LogDeploymentDB) QueryByClusters ¶
func (db *LogDeploymentDB) QueryByClusters(clusters ...string) ([]*LogDeployment, error)
QueryByClusters .
func (*LogDeploymentDB) QueryByOrgID ¶
func (db *LogDeploymentDB) QueryByOrgID(orgID int64) ([]*LogDeployment, error)
QueryByOrgID .
func (*LogDeploymentDB) QueryByOrgIDAndClusters ¶
func (db *LogDeploymentDB) QueryByOrgIDAndClusters(orgID int64, clusters ...string) ([]*LogDeployment, error)
QueryByOrgIDAndClusters .
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) GetByLogKey ¶
func (db *LogInstanceDB) GetByLogKey(logKey string) (*LogInstance, error)
func (*LogInstanceDB) GetListByClusterAndProjectIdAndWorkspace ¶
func (db *LogInstanceDB) GetListByClusterAndProjectIdAndWorkspace(clusterName, projectId, workspace string) ([]LogInstance, error)
type LogServiceInstance ¶
type LogServiceInstance struct { ID int `gorm:"column:id;primary_key"` InstanceID string `gorm:"column:instance_id"` EsUrls string `gorm:"column:es_urls"` EsConfig string `gorm:"column:es_config"` }
LogServiceInstance .
type LogServiceInstanceDB ¶
LogServiceInstanceDB .
func (*LogServiceInstanceDB) GetFirst ¶
func (db *LogServiceInstanceDB) GetFirst() (*LogServiceInstance, error)
Click to show internal directories.
Click to hide internal directories.