Documentation ¶
Index ¶
- func AppContext(ctx context.Context) context.Context
- func Hostname(ctx context.Context) string
- func Logger(ctx context.Context) *logger.SupportLogger
- func RequestContext(ginCtx *gin.Context) context.Context
- func RequestID(ctx context.Context) string
- func WithContext(ctx context.Context, c context.Context) context.Context
- func WithHostname(ctx context.Context, hostname string) context.Context
- func WithLogger(ctx context.Context, logger *logger.SupportLogger) context.Context
- func WithRequestContext(ctx context.Context, ginCtx *gin.Context)
- func WithRequestID(ctx context.Context, id string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppContext ¶
AppContext retrieves application context
func Logger ¶
func Logger(ctx context.Context) *logger.SupportLogger
Logger returns the CreditsLogger from context
func RequestContext ¶
RequestContext returns a context.Context from a gin.Context
func WithContext ¶
WithContext sets the application context
func WithHostname ¶
WithHostname adds the hostname to request context
func WithLogger ¶
WithLogger stores a CreditsLogger in context
func WithRequestContext ¶
WithRequestContext returns a context.Context from a gin.Context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.