Documentation ¶
Index ¶
- Constants
- type CheckerDB
- type JoinFileds
- type Metric
- type MetricDB
- func (db *MetricDB) ConvertToChecker(m *Metric, projectID int64) *pb.Checker
- 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 JoinFileds ¶
type JoinFileds 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"` ProjectName string `gorm:"column:project_name"` Env string `gorm:"column:env"` ScopeID string `gorm:"column:scope_id"` IsDeleted string `gorm:"column:is_deleted"` }
JoinFileds .
type Metric ¶
type Metric struct { ID int64 `gorm:"column:id;primary_key"` 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"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` IsDeleted string `gorm:"column:is_deleted"` }
Metric .
type MetricDB ¶
MetricDB .
func (*MetricDB) ConvertToChecker ¶
func (*MetricDB) GetByFields ¶
func (*MetricDB) ListByProjectIDAndEnv ¶
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.