app

package
v0.0.0-...-18d628c Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetRequestId

func SetRequestId(ctx context.Context, requestId string) context.Context

SetRequestId adds a RequestId to the GRPCServerContext and returns a new context with this data.

func SetUser

func SetUser(ctx context.Context, user *model.User) context.Context

SetUser adds a SignedInUser to the GRPCServerContext and returns a new context with this data.

Types

type GRPCServerContext

type GRPCServerContext struct {
	SignedInUser *model.User
	RequestId    string
}

GRPCServerContext holds the custom context data for gRPC requests.

func FromContext

func FromContext(ctx context.Context) *GRPCServerContext

FromContext retrieves GRPCServerContext from the given context, or returns an empty GRPCServerContext if none is found.

Jump to

Keyboard shortcuts

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