utils

package
v0.0.0-...-d7ba09a Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeResponse

func EncodeResponse[T any](w http.ResponseWriter, statusCode int, v any) error

Types

type ContextKey

type ContextKey string
const (
	RequestIdName ContextKey = "RequestId"
)

type CustomJsonLogger

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

func NewCustomJsonLogger

func NewCustomJsonLogger(w io.Writer, logLevel slog.Leveler) CustomJsonLogger

func (*CustomJsonLogger) Debug

func (l *CustomJsonLogger) Debug(ctx context.Context, message string, args ...any)

func (*CustomJsonLogger) Error

func (l *CustomJsonLogger) Error(ctx context.Context, message string, args ...any)

func (*CustomJsonLogger) Info

func (l *CustomJsonLogger) Info(ctx context.Context, message string, args ...any)

func (*CustomJsonLogger) Warn

func (l *CustomJsonLogger) Warn(ctx context.Context, message string, args ...any)

Jump to

Keyboard shortcuts

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