Documentation
¶
Index ¶
- func ConvertLevelFromString(s string, logger *zap.SugaredLogger) int
- func GenerateHash(data string) string
- func GenerateIdentifier(l *zap.SugaredLogger) (string, error)
- func GetLevelCrash() int
- func GetLevelError() int
- func GetLevelInfo() int
- func GetLevelLog() int
- func GetLevelUnknown() int
- type Bug
- type Log
- type Process
- type ProcessBug
- func (p ProcessBug) BugHandler(w http.ResponseWriter, r *http.Request)
- func (p ProcessBug) Fetch() (Response, error)
- func (p ProcessBug) GenerateBugInfo(bug *Bug, agentID string) error
- func (p ProcessBug) GenerateComms(bug *Bug) error
- func (p ProcessBug) GenerateTicket(bug *Bug) error
- func (p ProcessBug) Parse(request events.APIGatewayProxyRequest) (Response, error)
- func (p ProcessBug) Report() (Response, error)
- type ProcessLog
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertLevelFromString ¶
func ConvertLevelFromString(s string, logger *zap.SugaredLogger) int
ConvertLevelFromString nolint: gocyclo
func GenerateHash ¶
func GenerateIdentifier ¶ added in v0.6.0
func GenerateIdentifier(l *zap.SugaredLogger) (string, error)
func GetLevelCrash ¶ added in v0.6.0
func GetLevelCrash() int
func GetLevelError ¶
func GetLevelError() int
func GetLevelInfo ¶
func GetLevelInfo() int
func GetLevelLog ¶
func GetLevelLog() int
func GetLevelUnknown ¶
func GetLevelUnknown() int
Types ¶
type Bug ¶
type Bug struct {
agent.Agent
File string `json:"file"`
Line string `json:"line"`
LineNumber int `json:"line_number"`
Bug string `json:"bug"`
Raw string `json:"raw"`
BugLine string `json:"bug_line"`
Level string `json:"level"`
LevelNumber int `json:"level_number"`
Hash string `json:"hash"`
Identifier string `json:"identifier"`
TimesReported int `json:"times_reported"`
RemoteLink string `json:"-"`
TicketSystem string `json:"-"`
FirstReported time.Time
LastReported time.Time
}
func (*Bug) GenerateHash ¶
func (b *Bug) GenerateHash(logger *zap.SugaredLogger) error
func (*Bug) GenerateIdentifier ¶
func (b *Bug) GenerateIdentifier(logger *zap.SugaredLogger) error
func (*Bug) ReportedTimes ¶
type Log ¶ added in v0.6.0
type Log struct {
agent.Agent
Line string `json:"line"`
Level string `json:"level"`
LevelNumber int `json:"level_number"`
File string `json:"file"`
Log string `json:"log"`
Identifier string `json:"identifier"`
Stack []byte `json:"stack"`
LogFmt string `json:"log_fmt"`
}
func (*Log) GenerateIdentifier ¶ added in v0.6.0
func (l *Log) GenerateIdentifier(logger *zap.SugaredLogger) error
type ProcessBug ¶
type ProcessBug struct {
Config config.Config
Logger zap.SugaredLogger
CommsChannel string
}
func NewBug ¶
func NewBug(c config.Config, l zap.SugaredLogger) ProcessBug
func (ProcessBug) BugHandler ¶ added in v0.6.0
func (p ProcessBug) BugHandler(w http.ResponseWriter, r *http.Request)
func (ProcessBug) Fetch ¶
func (p ProcessBug) Fetch() (Response, error)
func (ProcessBug) GenerateBugInfo ¶ added in v0.6.0
func (p ProcessBug) GenerateBugInfo(bug *Bug, agentID string) error
func (ProcessBug) GenerateComms ¶ added in v0.6.0
func (p ProcessBug) GenerateComms(bug *Bug) error
func (ProcessBug) GenerateTicket ¶ added in v0.6.0
func (p ProcessBug) GenerateTicket(bug *Bug) error
func (ProcessBug) Parse ¶
func (p ProcessBug) Parse(request events.APIGatewayProxyRequest) (Response, error)
func (ProcessBug) Report ¶
func (p ProcessBug) Report() (Response, error)
type ProcessLog ¶ added in v0.6.0
type ProcessLog struct {
Config config.Config
Logger zap.SugaredLogger
}
func NewLog ¶ added in v0.6.0
func NewLog(c config.Config, l zap.SugaredLogger) ProcessLog
func (ProcessLog) GenerateLogInfo ¶ added in v0.6.0
func (l ProcessLog) GenerateLogInfo(log *Log, agentID string) error
func (ProcessLog) LogHandler ¶ added in v0.6.0
func (l ProcessLog) LogHandler(w http.ResponseWriter, r *http.Request)
func (ProcessLog) StoreLog ¶ added in v0.6.0
func (l ProcessLog) StoreLog(log *Log) error
Click to show internal directories.
Click to hide internal directories.