Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogRoutes = utils.Routes{ utils.Route{ Name: "GetLogLevels", Method: "GET", Pattern: "/rest/log/levels", HandlerFunc: getLogLevels, }, utils.Route{ Name: "GetLogTargets", Method: "GET", Pattern: "/rest/log/targets", HandlerFunc: getLogTargets, }, utils.Route{ Name: "GetLevel", Method: "GET", Pattern: "/rest/log/{target}/level", HandlerFunc: getLogLevel, }, utils.Route{ Name: "SetLogLevel", Method: "PUT", Pattern: "/rest/log/{target}/level", HandlerFunc: setLogLevel, }, utils.Route{ Name: "GetLogSize", Method: "GET", Pattern: "/rest/log/{target}/{level}", HandlerFunc: getLogSize, }, utils.Route{ Name: "GetLogEntries", Method: "GET", Pattern: "/rest/log/{target}/{level}/{limit}/{offset}", HandlerFunc: getLogEntries, }, utils.Route{ Name: "DeleteLogEntries", Method: "DELETE", Pattern: "/rest/log/{target}", HandlerFunc: deleteLogEntries, }, utils.Route{ Name: "GetLogFile", Method: "GET", Pattern: "/rest/log/{target}/{level}/export", HandlerFunc: getLogFile, }, }
LogRoutes routes
Functions ¶
Types ¶
type LogEntry ¶
type LogEntry struct {
ID int `json:"id"`
Time int64 `json:"time"`
Host string `json:"host"`
TargetName string `json:"targetName"`
SourceMethod string `json:"sourceMethod"`
Level string `json:"level"`
Message string `json:"message"`
Thrown string `json:"thrown"`
}
LogEntry log entry structure
type Message ¶
type Message struct {
Ref string `json:"ref,omitempty"`
// PENDING, SUCCESS, FAILURE
Status string `json:"status,omitempty"`
Text string `json:"text,omitempty"`
}
Message notification message
type TargetMessage ¶
TargetMessage target mqtt message
Click to show internal directories.
Click to hide internal directories.