Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLinkedEntityToAlarm = errors.New("entity is linked to alarm")
Functions ¶
This section is empty.
Types ¶
type API ¶
func NewApi ¶
func NewApi( store Store, entityChangeListener chan<- entityservice.ChangeEntityMessage, actionLogger logger.ActionLogger, logger zerolog.Logger, ) API
type EditRequest ¶
type EditRequest struct {
ID string `json:"-"`
Description string `json:"description" binding:"max=255"`
Enabled *bool `json:"enabled" binding:"required"`
Category string `json:"category"`
ImpactLevel int64 `json:"impact_level" binding:"required,min=1,max=10"`
Infos []InfoRequest `json:"infos" binding:"dive"`
Impacts []string `json:"impact"`
Depends []string `json:"depends"`
}
type InfoRequest ¶
type InfoRequest struct {
Name string `json:"name" binding:"required,max=255"`
Description string `json:"description" binding:"max=255"`
Value interface{} `json:"value"`
}
func (*InfoRequest) UnmarshalJSON ¶
func (r *InfoRequest) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.