response

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success = "SUCCESS"
	Error   = "ERROR"
)

Variables

This section is empty.

Functions

func WriteHeader

func WriteHeader(rw http.ResponseWriter, statusCode int) http.ResponseWriter

Types

type ErrorLog

type ErrorLog struct {
	Scope         string `json:"scope,omitempty"`
	StatusCode    string `json:"status,omitempty"`
	Trace         string `json:"trace,omitempty"`
	RootCause     string `json:"rootCause,omitempty"`
	Query         string `json:"query,omitempty"`
	ExceptionType string `json:"exceptionType,omitempty"`
}

type ErrorLogs

type ErrorLogs []ErrorLog

func (ErrorLogs) GetHTTPStatus

func (errs ErrorLogs) GetHTTPStatus(lengthOfResults int) (status int)

type Message

type Message struct {
	ErrorLog  ErrorLogs `json:"errorLog,omitempty"`
	HostName  string    `json:"hostName,omitempty"`
	Status    string    `json:"status,omitempty"`
	TimeTaken string    `json:"timeTaken,omitempty"`
	Count     int       `json:"count,omitempty"`
}

func (*Message) AddMessageDetails

func (m *Message) AddMessageDetails(sw time.Time)

Jump to

Keyboard shortcuts

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