srv

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 11 Imported by: 4

README

Server

Some helpers nad middlewares for http server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorrelationID

func CorrelationID(ctx context.Context) (id string, ok bool)

func Debug

func Debug(ctx context.Context) bool

func EnableDebug

func EnableDebug(ctx context.Context) context.Context

func ErrorHandler

func ErrorHandler(ctx *fiber.Ctx, err error) error

func GetOutcome

func GetOutcome(status int) string

func Printer

func Printer(ctx context.Context) *message.Printer

func Tracer

func Tracer(ctx context.Context) trace.Tracer

func WithCorrelation

func WithCorrelation(ctx context.Context, id string) context.Context

func WithLocale

func WithLocale(ctx context.Context, tag language.Tag) context.Context

func WithPrinter

func WithPrinter(ctx context.Context, printer *message.Printer) context.Context

func WithTracer

func WithTracer(ctx context.Context, tracer trace.Tracer) context.Context

Types

type Lang

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

func Locale

func Locale(ctx context.Context) *Lang

func (Lang) Locale

func (l Lang) Locale() string

func (Lang) String

func (l Lang) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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