appcontext

package
v0.0.0-testrgm6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustUser

func MustUser(ctx context.Context) *user.SignedInUser

MustUser extracts the SignedInUser from the supplied context, and panics if a user is not found. Supports context set by appcontext.WithUser, gRPC server context, and HTTP ReqContext.

func User

func User(ctx context.Context) (*user.SignedInUser, error)

User extracts the SignedInUser from the supplied context. Supports context set by appcontext.WithUser, gRPC server context, and HTTP ReqContext.

func WithUser

func WithUser(ctx context.Context, usr *user.SignedInUser) context.Context

WithUser adds the supplied SignedInUser to the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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