utils

package
v0.0.0-...-67365ed Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateCPUPercentUnix

func CalculateCPUPercentUnix(previousCPU, previousSystem uint64, v *types.StatsJSON) float64

CalculateCPUPercentUnix compute docker cpu percent

func ExtractUserID

func ExtractUserID(c *gin.Context) primitive.ObjectID

ExtractUserID from JWT token

func Response

func Response(c *gin.Context, statusCode int, err error, payload interface{})

Response parser

func SanitizeLog

func SanitizeLog(str string) string

func UnescapeString

func UnescapeString(str string) (unescapedString string)

UnescapeString util

Types

This section is empty.

Jump to

Keyboard shortcuts

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