ctx

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketID

func BucketID(ctx context.Context) uint64

BucketID returns the bucket ID stored in context or 0.

func Control

func Control(ctx context.Context) (map[string]any, bool)

Control returns the control claims stored in context.

func IsAdmin

func IsAdmin(ctx context.Context) bool

IsAdmin reports whether the caller has admin role.

func RequestID

func RequestID(ctx context.Context) string

RequestID returns the request ID stored in context.

func Role

func Role(ctx context.Context) string

Role returns the role from control claims or empty string.

func WithBucketID

func WithBucketID(ctx context.Context, id uint64) context.Context

WithBucketID adds bucket ID to the context.

func WithControl

func WithControl(ctx context.Context, control map[string]any) context.Context

WithControl adds control claims to the context.

func WithRequestID

func WithRequestID(ctx context.Context, id string) context.Context

WithRequestID adds a request ID 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