context

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSessionAccount

func WithSessionAccount(ctx context.Context, accountObj SessionModel) context.Context

WithSessionAccount puts to the context account model

Types

type SessionModel added in v0.5.0

type SessionModel interface {
	GetID() uint64
}

SessionModel is stored in request context for the active account.

func PermissionCheckAccountFromContext

func PermissionCheckAccountFromContext(ctx context.Context) SessionModel

PermissionCheckAccountFromContext returns the original account for permission checks from the given context, or nil if not found.

func SessionAccount

func SessionAccount(ctx context.Context) SessionModel

SessionAccount returns current account model

Jump to

Keyboard shortcuts

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