Documentation
¶
Index ¶
Constants ¶
View Source
const ( Endpoints = "endpoints" Schedules = "schedules" Rules = "rules" Reports = "reports" Errors = "errors" )
MongoDB Collections
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { ID bson.ObjectId `bson:"_id,omitempty" json:"-"` ULID string `bson:"ulid" json:"ulid"` Hostname string `bson:"hostame" json:"hostname"` ClientVersion string `bson:"client_version" json:"client_version"` Tags []string `bson:"tags" json:"tags"` LastPing time.Time `bson:"last_ping" json:"last_ping"` CreateAt time.Time `bson:"created_at" json:"created_at"` UpdateAt time.Time `bson:"updated_at" json:"updated_at"` }
Endpoint collection
type Error ¶
type Error struct { ID bson.ObjectId `bson:"_id,omitempty" json:"-"` ULID string `bson:"ulid" json:"ulid"` TaskID string `bson:"task_id" json:"task_id"` ErrorID errors.Error `bson:"error_id" json:"error_id"` ErrorMsg string `bson:"error_msg" json:"error_msg"` Acknowledge bool `bson:"acknowledge" json:"acknowledge"` CreateAt time.Time `bson:"created_at" json:"created_at"` UpdateAt time.Time `bson:"updated_at" json:"updated_at"` }
Error collection
type Report ¶
type Report struct { ID bson.ObjectId `bson:"_id,omitempty" json:"-"` ULID string `bson:"ulid" json:"ulid"` Reports []LReports `bson:"reports" json:"reports"` CreateAt time.Time `bson:"created_at" json:"created_at"` UpdateAt time.Time `bson:"updated_at" json:"updated_at"` }
Report collection
type Result ¶
type Result struct { File string `bson:"file" json:"file"` RuleName string `bson:"rule_name" json:"rule_name"` Namespace string `bson:"namespace" json:"namespace"` Tags []string `bson:"tags" json:"tags"` Meta map[string]interface{} `bson:"meta" json:"meta"` Strings []String `bson:"strings" json:"strings"` }
type Rule ¶
type Rule struct { ID bson.ObjectId `bson:"_id,omitempty" json:"-"` RuleID string `bson:"rule_id" json:"rule_id"` Name string `bson:"name" json:"name"` Tags []string `bson:"tags" json:"tags"` Data string `bson:"data" json:"data"` CreateAt time.Time `bson:"created_at" json:"created_at"` UpdateAt time.Time `bson:"updated_at" json:"updated_at"` }
Rule collection
type Schedule ¶
type Schedule struct { ID bson.ObjectId `bson:"_id,omitempty" json:"-"` ULID string `bson:"ulid" json:"ulid"` Tasks []Task `bson:"tasks" json:"tasks"` CreateAt time.Time `bson:"created_at" json:"created_at"` UpdateAt time.Time `bson:"updated_at" json:"updated_at"` }
Schedule collection
type Task ¶
type Task struct { TaskID string `bson:"task_id" json:"task_id"` Command command.Command `bson:"command" json:"command"` Rules []bson.ObjectId `bson:"rules" json:"rules"` Params string `bson:"params" json:"params"` When time.Time `bson:"when" json:"when"` Status State `bson:"status" json:"status"` CreateAt time.Time `bson:"created_at" json:"created_at"` UpdateAt time.Time `bson:"updated_at" json:"updated_at"` }
Task type
Click to show internal directories.
Click to hide internal directories.