Documentation ¶
Index ¶
- Constants
- type CheckerDB
- type JoinFields
- type Metric
- type MetricDB
- func (db *MetricDB) Create(m *Metric) error
- func (db *MetricDB) Delete(id int64) error
- func (db *MetricDB) GetByFields(fields map[string]interface{}) (*Metric, error)
- func (db *MetricDB) GetByID(id int64) (*Metric, error)
- func (db *MetricDB) ListByIDs(ids ...int64) ([]*Metric, error)
- func (db *MetricDB) ListByProjectIDAndEnv(projectID int64, env string) ([]*Metric, error)
- func (db *MetricDB) ListIDs() ([]int64, error)
- func (db *MetricDB) Update(m *Metric) error
- type Project
- type ProjectDB
Constants ¶
View Source
const ( TableProject = "sp_project" TableMetric = "sp_metric" )
tables name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckerDB ¶
type CheckerDB struct { *gorm.DB ScopeInfoUpdateInterval time.Duration // contains filtered or unexported fields }
CheckerDB .
type JoinFields ¶ added in v1.3.2
type JoinFields struct { ID int64 `gorm:"column:id"` Name string `gorm:"column:name"` Mode string `gorm:"column:mode"` URL string `gorm:"column:url"` ProjectID int64 `gorm:"column:project_id"` TenantId string `gorm:"column:tenant_id"` ProjectName string `gorm:"column:project_name"` Env string `gorm:"column:env"` Config string `gorm:"column:config"` ScopeID string `gorm:"column:scope_id"` IsDeleted string `gorm:"column:is_deleted"` }
JoinFields .
type Metric ¶
type Metric struct { ID int64 `gorm:"column:id;primary_key"` TenantId string `gorm:"column:tenant_id"` ProjectID int64 `gorm:"column:project_id"` ServiceID int64 `gorm:"column:service_id"` Name string `gorm:"column:name"` URL string `gorm:"column:url"` Mode string `gorm:"column:mode"` Extra string `gorm:"column:extra"` AccountID int64 `gorm:"column:account_id"` Status int64 `gorm:"column:status"` Env string `gorm:"column:env"` Config string `gorm:"config"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` IsDeleted string `gorm:"column:is_deleted"` }
Metric .
type Project ¶
type Project struct { ID int64 `gorm:"column:id;primary_key"` Identity string `gorm:"column:identity"` Name string `gorm:"column:config"` Description string `gorm:"column:description"` Ats string `gorm:"column:ats"` Callback string `gorm:"column:callback"` ProjectID int64 `gorm:"column:project_id"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` IsDeleted string `gorm:"column:is_deleted"` }
Project .
Click to show internal directories.
Click to hide internal directories.