goscopetypes

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyLogWriter

type BodyLogWriter struct {
	gin.ResponseWriter
	Body *bytes.Buffer
}

func (BodyLogWriter) Write

func (w BodyLogWriter) Write(b []byte) (int, error)

HTTP request body object.

type BodyLogWriterResponse

type BodyLogWriterResponse struct {
	Blw *BodyLogWriter
	Rdr io.ReadCloser
}

type DetailedRequest

type DetailedRequest struct {
	Body      string `json:"body"`
	ClientIP  string `json:"clientIP"`
	Headers   string `json:"headers"`
	Host      string `json:"host"`
	Method    string `json:"method"`
	Path      string `json:"path"`
	Referrer  string `json:"referrer"`
	Time      int    `json:"time"`
	UID       string `json:"uid"`
	URL       string `json:"url"`
	UserAgent string `json:"userAgent"`
}

type DetailedResponse

type DetailedResponse struct {
	Body       string `json:"body"`
	ClientIP   string `json:"clientIP"`
	Headers    string `json:"headers"`
	Path       string `json:"path"`
	Size       int    `json:"size"`
	Status     string `json:"status"`
	Time       int    `json:"time"`
	RequestUID string `json:"requestUID"`
	UID        string `json:"uid"`
}

type DumpResponsePayload

type DumpResponsePayload struct {
	Headers http.Header
	Body    *bytes.Buffer
	Status  int
}

type ExceptionRecord

type ExceptionRecord struct {
	Error string `json:"error"`
	Time  int    `json:"time"`
	UID   string `json:"uid"`
}

type GoScopeApplicationEnvironment

type GoScopeApplicationEnvironment struct {
	// ApplicationID is a string used to identify your application.
	// This allows having a single go_scope database for several applications.
	ApplicationID string
	// ApplicationName is the name to display in the header of the frontend and in API responses.
	ApplicationName string
	// ApplicationTimezone is the Go formatted timezone, e.g. Europe/Amsterdam
	ApplicationTimezone string
	// GoScopeDatabaseConnection is the string to connect to the desired database
	GoScopeDatabaseConnection string
	// GoScopeDatabaseType is the type of DB to connect to, e.g. the connector name, mysql
	GoScopeDatabaseType string
	// GoScopeEntriesPerPage is how many logs & requests to show per page
	GoScopeEntriesPerPage int
	// HasFrontendDisabled decides if the frontend should be accessible
	HasFrontendDisabled bool
	// GoScopeDatabaseMaxOpenConnections is the maximum open connections of the DB pool
	GoScopeDatabaseMaxOpenConnections int
	// GoScopeDatabaseMaxIdleConnections is the maximum idle connections of the DB pool
	GoScopeDatabaseMaxIdleConnections int
	// GoScopeDatabaseMaxConnLifetime is the maximum connection lifetime of each connection of the DB pool
	GoScopeDatabaseMaxConnLifetime int
}

GoScopeApplicationEnvironment is the required application environment variables.

type GoScopeInitData

type GoScopeInitData struct {
	// Router represents the gin.Engine to attach the routes to
	Router *gin.Engine
	// RouteGroup represents the gin.RouterGroup to attach the GoScope routes to
	RouteGroup *gin.RouterGroup
	// Config represents the required variables to initialize GoScope
	Config *GoScopeApplicationEnvironment
}

type RecordByURI

type RecordByURI struct {
	UID string `uri:"id" binding:"required"`
}

type RequestFilter

type RequestFilter struct {
	Method []string `json:"method"`
	Status []int    `json:"status"`
}

type SearchRequestPayload

type SearchRequestPayload struct {
	Query  string        `json:"query"`
	Filter RequestFilter `json:"filter"`
}

type SummarizedRequest

type SummarizedRequest struct {
	Method         string `json:"method"`
	Path           string `json:"path"`
	Time           int    `json:"time"`
	UID            string `json:"uid"`
	ResponseStatus int    `json:"responseStatus"`
}

type SummarizedResponse

type SummarizedResponse struct {
	RequestUID string `json:"requestUID"`
	ClientIP   string `json:"clientIP"`
	Path       string `json:"path"`
	Status     string `json:"status"`
	Time       int    `json:"time"`
	UID        string `json:"uid"`
}

type SystemInformationResponse

type SystemInformationResponse struct {
	ApplicationName string                          `json:"applicationName"`
	CPU             SystemInformationResponseCPU    `json:"cpu"`
	Disk            SystemInformationResponseDisk   `json:"disk"`
	Host            SystemInformationResponseHost   `json:"host"`
	Memory          SystemInformationResponseMemory `json:"memory"`
	Environment     map[string]string               `json:"environment"`
}

type SystemInformationResponseCPU

type SystemInformationResponseCPU struct {
	CoreCount string `json:"coreCount"`
	ModelName string `json:"modelName"`
}

type SystemInformationResponseDisk

type SystemInformationResponseDisk struct {
	FreeSpace     string `json:"freeSpace"`
	MountPath     string `json:"mountPath"`
	PartitionType string `json:"partitionType"`
	TotalSpace    string `json:"totalSpace"`
}

type SystemInformationResponseHost

type SystemInformationResponseHost struct {
	HostOS        string `json:"hostOS"`
	HostPlatform  string `json:"hostPlatform"`
	Hostname      string `json:"hostname"`
	KernelArch    string `json:"kernelArch"`
	KernelVersion string `json:"kernelVersion"`
	Uptime        string `json:"uptime"`
}

type SystemInformationResponseMemory

type SystemInformationResponseMemory struct {
	Available string `json:"availableMemory"`
	Total     string `json:"totalMemory"`
	UsedSwap  string `json:"usedSwap"`
}

Jump to

Keyboard shortcuts

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