apputil

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 8 Imported by: 0

README

apputil

Application utility functions for enterprise software development

  • Logger using uber-go/zap + gopkg.in/natefinch/lumberjack.v2

  • Unique ID using muyo/sno

  • General utility functions

    • IsEmptyJson: check if given data is an empty JSON object

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppZapConfig zapcore.EncoderConfig
View Source
var AppZapConsoleEncoder zapcore.Encoder
View Source
var AppZapCore zapcore.Core
View Source
var AppZapFileEncoder zapcore.Encoder
View Source
var AppZapWriter zapcore.WriteSyncer
View Source
var Logger *zap.Logger
View Source
var ZapLevel zapcore.Level

Functions

func ChangeLogLevel

func ChangeLogLevel(level string)

func GenerateRequestID

func GenerateRequestID() sno.ID

func GenerateRequestIDByte

func GenerateRequestIDByte() []byte

func GenerateRequestIDString

func GenerateRequestIDString() string

func GetIDMeta

func GetIDMeta() byte

func InitializeLogger

func InitializeLogger(maxSize int, maxBackups int, maxAge int, compress bool, logBaseDir string)

func IsEmptyJson added in v1.1.0

func IsEmptyJson(data interface{}) bool

func SetIDMeta

func SetIDMeta(b byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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