user_context

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithUserContext

func WithUserContext(ctx context.Context, uc UserContext) context.Context

WithUserContext stores UserContext in the context.

Types

type UserContext

type UserContext struct {
	UserUuid uuid.UUID
	// TODO fill
	UserName string
	Roles    []string
}

UserContext encapsulates user-specific data.

func GetUserContext

func GetUserContext(ctx context.Context) (UserContext, bool)

GetUserContext retrieves UserContext from the context.

Jump to

Keyboard shortcuts

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