user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToContext

func AddToContext(ctx context.Context, user *User) context.Context

AddToContext adds a user to the context.

Types

type User

type User struct {
	ID   xid.ID
	Name string
}

User holds information about a user.

func FromContext

func FromContext(ctx context.Context) *User

FromContext retrieves a user from the context.

func New

func New() *User

New creates a new User.

Jump to

Keyboard shortcuts

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