statping/types/integrations.go

24 lines
848 B
Go
Raw Normal View History

2020-01-03 06:10:25 +00:00
package types
type Integration struct {
2020-02-01 03:53:00 +00:00
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"`
2020-01-03 06:10:25 +00:00
}
type IntegrationField struct {
2020-02-01 03:53:00 +00:00
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"`
2020-01-03 06:10:25 +00:00
}
type Integrator interface {
Get() *Integration
List() ([]*Service, error)
}