-
Notifications
You must be signed in to change notification settings - Fork 1
/
integrations.go
43 lines (37 loc) · 1.47 KB
/
integrations.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package models
import (
"time"
"github.com/google/uuid"
)
type IntegrationType string
const (
IntegrationTypeScraper IntegrationType = "scrapers"
IntegrationTypeLoggingBackends IntegrationType = "logging_backends"
IntegrationTypeTopology IntegrationType = "topology"
)
type Integration struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Integration IntegrationType `json:"integration"`
Source string `json:"source"`
AgentID *uuid.UUID `json:"agent_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
CreatedBy *uuid.UUID `json:"created_by,omitempty"`
JobName string `json:"job_name"`
JobSuccess int `json:"job_success_count"`
JobError int `json:"job_error_count"`
JobDetails string `json:"job_details"`
JobHostname string `json:"job_hostname"`
JobDuration int `json:"job_duration_millis"`
JobResource string `json:"job_resource_type"`
JobStatus string `json:"job_status"`
JobTimeStart time.Time `json:"job_time_start"`
JobTimeEnd time.Time `json:"job_time_end"`
JobCreatedAt time.Time `json:"job_created_at"`
}
func (t *Integration) TableName() string {
return "integrations_with_status"
}