bug

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 14 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

func GenerateHash

func GenerateHash(data string) string

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

	Posted 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 BugInput

type BugInput struct {
	Message string `json:"message,omitempty"`
	Level   string `json:"level,omitempty"`

	agent.Agent
}

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
}

func NewBug

func (ProcessBug) CreateBugHandler

func (p ProcessBug) CreateBugHandler(w http.ResponseWriter, r *http.Request)

func (ProcessBug) Fetch

func (p ProcessBug) Fetch() (Response, error)

func (ProcessBug) GetBugHandler

func (p ProcessBug) GetBugHandler(w http.ResponseWriter, r *http.Request)

func (ProcessBug) Parse

func (ProcessBug) Report

func (p ProcessBug) Report() (Response, error)

type ProcessFile

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

	CommsChannel string
}

func NewFile

func (ProcessFile) Fetch

func (p ProcessFile) Fetch() (Response, error)

func (ProcessFile) FileBugHandler

func (p ProcessFile) FileBugHandler(w http.ResponseWriter, r *http.Request)

func (ProcessFile) GenerateBugInfo

func (p ProcessFile) GenerateBugInfo(bug *Bug, agentID string) error

func (ProcessFile) GenerateComms

func (p ProcessFile) GenerateComms(bug *Bug) error

func (ProcessFile) GenerateTicket

func (p ProcessFile) GenerateTicket(bug *Bug) error

func (ProcessFile) Parse

func (ProcessFile) Report

func (p ProcessFile) Report() (Response, 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