interfaces

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppID

func GetAppID(ctx context.Context) xid.ID

GetAppID retrieves app ID from context

func GetEnvironmentID

func GetEnvironmentID(ctx context.Context) xid.ID

GetEnvironmentID retrieves environment ID from context

func GetOrganizationID

func GetOrganizationID(ctx context.Context) xid.ID

GetOrganizationID retrieves organization ID from context

func GetUserID

func GetUserID(ctx context.Context) xid.ID

GetUserID retrieves user ID from context

func HasAppID

func HasAppID(ctx context.Context) bool

HasAppID checks if app ID exists in context

func HasEnvironmentID

func HasEnvironmentID(ctx context.Context) bool

HasEnvironmentID checks if environment ID exists in context

func HasOrganizationID

func HasOrganizationID(ctx context.Context) bool

HasOrganizationID checks if organization ID exists in context

func HasUserID

func HasUserID(ctx context.Context) bool

HasUserID checks if user ID exists in context

func SetAppID

func SetAppID(ctx context.Context, appID xid.ID) context.Context

SetAppID sets app ID in context

func SetEnvironmentID

func SetEnvironmentID(ctx context.Context, envID xid.ID) context.Context

SetEnvironmentID sets environment ID in context

func SetOrganizationID

func SetOrganizationID(ctx context.Context, orgID xid.ID) context.Context

SetOrganizationID sets organization ID in context

func SetUserID

func SetUserID(ctx context.Context, userID xid.ID) context.Context

SetUserID sets user ID in context

Types

type ContextKey

type ContextKey string

ContextKey type for context keys

const (
	// AppIDKey is the context key for app ID
	AppIDKey ContextKey = "app_id"

	// EnvironmentIDKey is the context key for environment ID
	EnvironmentIDKey ContextKey = "environment_id"

	// OrganizationIDKey is the context key for organization ID
	OrganizationIDKey ContextKey = "organization_id"

	// UserIDKey is the context key for user ID
	UserIDKey ContextKey = "user_id"
)

Jump to

Keyboard shortcuts

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