context_keys.go 645 B

12345678910111213141516171819202122232425
  1. // Copyright 2018 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package middleware // import "miniflux.app/middleware"
  5. // ContextKey represents a context key.
  6. type ContextKey int
  7. // List of context keys.
  8. const (
  9. UserIDContextKey ContextKey = iota
  10. UserTimezoneContextKey
  11. IsAdminUserContextKey
  12. IsAuthenticatedContextKey
  13. UserSessionTokenContextKey
  14. UserLanguageContextKey
  15. UserThemeContextKey
  16. SessionIDContextKey
  17. CSRFContextKey
  18. OAuth2StateContextKey
  19. FlashMessageContextKey
  20. FlashErrorMessageContextKey
  21. PocketRequestTokenContextKey
  22. )