mirror of https://github.com/statping/statping
24 lines
848 B
Go
24 lines
848 B
Go
package types
|
|
|
|
type Integration struct {
|
|
ShortName string `gorm:"column:name" json:"name"`
|
|
Name string `gorm:"-" json:"full_name,omitempty"`
|
|
Icon string `gorm:"-" json:"-"`
|
|
Description string `gorm:"-" json:"description,omitempty"`
|
|
Enabled bool `gorm:"column:enabled;default:false" json:"enabled"`
|
|
Fields []*IntegrationField `gorm:"column:fields" json:"fields"`
|
|
}
|
|
|
|
type IntegrationField struct {
|
|
Name string `gorm:"-" json:"name"`
|
|
Value interface{} `gorm:"-" json:"value"`
|
|
Type string `gorm:"-" json:"type"`
|
|
Description string `gorm:"-" json:"description,omitempty"`
|
|
MimeType string `gorm:"-" json:"mime_type,omitempty"`
|
|
}
|
|
|
|
type Integrator interface {
|
|
Get() *Integration
|
|
List() ([]*Service, error)
|
|
}
|