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) List ¶ added in v1.3.0
func (db *LogDeploymentDB) List() ([]*LogDeployment, error)
List .
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 ¶ added in v1.3.0
func (db *LogDeploymentDB) QueryByOrgIDAndClusters(orgID int64, clusters ...string) ([]*LogDeployment, error)
QueryByOrgIDAndClusters .
type LogInstance ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (LogInstance) TableName() string
type LogInstanceDB ¶ added in v1.3.0
func (*LogInstanceDB) GetByLogKey ¶ added in v1.3.0
func (db *LogInstanceDB) GetByLogKey(logKey string) (*LogInstance, error)
func (*LogInstanceDB) GetListByClusterAndProjectIdAndWorkspace ¶ added in v1.3.0
func (db *LogInstanceDB) GetListByClusterAndProjectIdAndWorkspace(clusterName, projectId, workspace string) ([]LogInstance, error)
type LogServiceInstance ¶ added in v1.3.0
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 .
func (LogServiceInstance) TableName ¶ added in v1.3.0
func (LogServiceInstance) TableName() string
TableName .
type LogServiceInstanceDB ¶ added in v1.3.0
LogServiceInstanceDB .
func (*LogServiceInstanceDB) GetFirst ¶ added in v1.3.0
func (db *LogServiceInstanceDB) GetFirst() (*LogServiceInstance, error)
Click to show internal directories.
Click to hide internal directories.