Documentation
¶
Index ¶
- func GetAppID(ctx context.Context) xid.ID
- func GetEnvironmentID(ctx context.Context) xid.ID
- func GetOrganizationID(ctx context.Context) xid.ID
- func GetUserID(ctx context.Context) xid.ID
- func HasAppID(ctx context.Context) bool
- func HasEnvironmentID(ctx context.Context) bool
- func HasOrganizationID(ctx context.Context) bool
- func HasUserID(ctx context.Context) bool
- func SetAppID(ctx context.Context, appID xid.ID) context.Context
- func SetEnvironmentID(ctx context.Context, envID xid.ID) context.Context
- func SetOrganizationID(ctx context.Context, orgID xid.ID) context.Context
- func SetUserID(ctx context.Context, userID xid.ID) context.Context
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvironmentID ¶
GetEnvironmentID retrieves environment ID from context
func GetOrganizationID ¶
GetOrganizationID retrieves organization ID from context
func HasEnvironmentID ¶
HasEnvironmentID checks if environment ID exists in context
func HasOrganizationID ¶
HasOrganizationID checks if organization ID exists in context
func SetEnvironmentID ¶
SetEnvironmentID sets environment ID in context
func SetOrganizationID ¶
SetOrganizationID sets organization 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" )
Click to show internal directories.
Click to hide internal directories.