utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTxIDFromCtx

func GetTxIDFromCtx(ctx context.Context) (uuid.UUID, error)

func SetTxIDToCtx

func SetTxIDToCtx(ctx context.Context, value any) context.Context

Types

type DateTime

type DateTime struct{}

func NewDateTime

func NewDateTime() *DateTime

func (DateTime) Now

func (DateTime) Now() time.Time

type KeyLogger

type KeyLogger string
const (
	KeyLogError      KeyLogger = "error"
	KeyAsynqTypeTask KeyLogger = "task.name"
	KeyAsynqRetry    KeyLogger = "task.retry"
	KeyAsynqTaskID   KeyLogger = "task.id"
	KeyAsynqElapsed  KeyLogger = "task.elapsed"
)

func (KeyLogger) String

func (k KeyLogger) String() string

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(prefix string) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, keysAndValues ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string, keysAndValues ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, keysAndValues ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string, keysAndValues ...interface{})

Jump to

Keyboard shortcuts

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