GetClientAPIKeyFromContext retrieves the client API key from the request context
(ctx context.Context)
| 166 | |
| 167 | // GetClientAPIKeyFromContext retrieves the client API key from the request context |
| 168 | func GetClientAPIKeyFromContext(ctx context.Context) *models.ClientAPIKey { |
| 169 | if key, ok := ctx.Value(ClientAPIKeyContextKey).(*models.ClientAPIKey); ok { |
| 170 | return key |
| 171 | } |
| 172 | return nil |
| 173 | } |
| 174 | |
| 175 | // GetInstanceIDFromContext retrieves the instance ID from the request context |
| 176 | func GetInstanceIDFromContext(ctx context.Context) int { |
no outgoing calls
no test coverage detected