reqcontext

package
v0.0.0-...-f464bf3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package reqcontext contains the request context. Each request will have its own instance of RequestContext filled by the middleware code in the api-context-wrapper.go (parent package).

Each value here should be assumed valid only per request only, with some exceptions like the logger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestContext

type RequestContext struct {
	// ReqUUID is the request unique ID
	ReqUUID uuid.UUID

	// Logger is a custom field logger for the request
	Logger logrus.FieldLogger

	User User
}

RequestContext is the context of the request, for request-dependent parameters

type User

type User struct {
	// Unique identifier of a user
	Id int

	// User name
	Username string
}

Jump to

Keyboard shortcuts

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