Documentation ¶
Overview ¶
domain model
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id"` Name string `bson:"name" json:"name"` URL string `bson:"url" json:"url"` Setting *DomainSetting `bson:"settings" json:"settigns"` }
func NewDomain ¶
func NewDomain(Name, URL string, Setting *DomainSetting) Domain
Create a new Domain instance
type DomainSetting ¶
type DomainSetting struct { Interval uint8 `bson:"interval" json:"interval"` // Interval for each ping in seconds. min: 60s max: 180s Retry uint8 `bson:"retry" json:"retry"` // Amount times for retry a ping to domain. min: 1 max: 5 Timeout uint8 `bson:"timeout" json:"timeout"` // Timeout for each retry ping. min: 5s max: 20s }
func NewDomainSetting ¶
func NewDomainSetting(Interval, Retry, Timeout uint8) (DomainSetting, error)
Create a new DomainSetting instance
func (*DomainSetting) Validate ¶
func (ds *DomainSetting) Validate() bool
Check if DomainSetting instance accomplish all restrictions.
type EventDomain ¶
type EventServices ¶
type EventServices struct { DaemonID string `bson:"daemon_id"` TypeID string `bson:"type_id"` CreatedAt time.Time `bson:"created_at"` Description string `bson:"description"` Environment string `bson:"env"` // Shoul be a JSON field with all env data where run the daemon }
For the future
Click to show internal directories.
Click to hide internal directories.