common

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUserID

func CurrentUserID(ctx context.Context) string

func IsUserAdmin

func IsUserAdmin(ctx context.Context) bool

func IsUserLogged

func IsUserLogged(ctx context.Context) bool

func IsUserLoggedOrAdmin

func IsUserLoggedOrAdmin(ctx context.Context) bool

Types

type ContextKey

type ContextKey int
const (
	ContextKeyUserID ContextKey = iota
	ContextKeyUsername
	ContextKeyUserAdmin
)

Jump to

Keyboard shortcuts

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