controllers

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BytesInOneGigabyte = 1073741824
	SecondsInOneMinute = 60
)

Variables

This section is empty.

Functions

func GetAppName

func GetAppName(c *gin.Context)

func GetMimeType

func GetMimeType(filename string) string

GetMimeType gets the mime type of a file by its name.

func GetStaticFile

func GetStaticFile(c *gin.Context)

GetStaticFile returns a static file that is requested by the front-end.

func LogList

func LogList(c *gin.Context)

func NoRouteResponseLogger

func NoRouteResponseLogger(c *gin.Context)

NoRouteResponseLogger logs an HTTP response to the DB and prints to Stdout for requests that match no route.

func ObtainBodyLogWriter

func ObtainBodyLogWriter(c *gin.Context) types.BodyLogWriterResponse

ObtainBodyLogWriter will read the request body and return a reader/writer.

func RequestList

func RequestList(c *gin.Context)

RequestList is the controller for the requests list page in GoScope API.

func ResponseLogger

func ResponseLogger(c *gin.Context)

ResponseLogger logs an HTTP response to the DB and print to Stdout.

func SearchLog

func SearchLog(c *gin.Context)

func SearchLogOptions

func SearchLogOptions(c *gin.Context)

func SearchRequest

func SearchRequest(c *gin.Context)

SearchRequest is the controller for the search requests list page in GoScope API.

func SearchRequestOptions

func SearchRequestOptions(c *gin.Context)

SearchRequestOptions is the controller for the search requests list OPTIONS method in GoScope API.

func ShowDashboard

func ShowDashboard(c *gin.Context)

ShowDashboard returns the front-end's index.html.

func ShowLog

func ShowLog(c *gin.Context)

func ShowRequest

func ShowRequest(c *gin.Context)

ShowRequest is the controller for a detailed request/response page in GoScope API.

func ShowSystemInfo

func ShowSystemInfo(c *gin.Context)

ShowSystemInfo is the controller to show system information of the current host in GoScope API.

Types

type LoggerGoScope

type LoggerGoScope struct {
	RoutingEngine *gin.Engine
}

LoggerGoScope is the main logger for the application.

func (LoggerGoScope) Write

func (logger LoggerGoScope) Write(p []byte) (n int, err error)

Write dumps the log to the database.

Jump to

Keyboard shortcuts

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