bug

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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 GenerateHash(data string) string

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"`
	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

func (b *Bug) ReportedTimes(c config.Config, logger *zap.SugaredLogger) error

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       string `json:"stack"`
}

func (*Log) GenerateIdentifier added in v0.6.0

func (l *Log) GenerateIdentifier(logger *zap.SugaredLogger) error

type Process

type Process interface {
	Parse(request events.APIGatewayProxyRequest) (Response, error)
	Report() (Response, error)
	Fetch() (Response, error)
}

type ProcessBug

type ProcessBug struct {
	Config config.Config
	Logger zap.SugaredLogger

	CommsChannel string
}

func NewBug

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 (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 (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

type Response

type Response struct {
	Body    string
	Headers map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL