Documentation
¶
Index ¶
- Constants
- func CheckOrganisation(h http.Handler) http.Handler
- func CheckSuperOrganisation(h http.Handler) http.Handler
- func CheckUser(h http.Handler) http.Handler
- func GetOrganisation(ctx context.Context) (int, error)
- func GetRequest(url string) error
- func GetSuperOrganisationID() (int, error)
- func GetUser(ctx context.Context) (int, error)
- func GormRequestID(h http.Handler) http.Handler
- func KavachChecker() error
- func KetoChecker() error
- func KratosChecker() error
- func MeiliChecker() error
Constants ¶
View Source
const OrganisationIDKey ctxKeyOrganisationID = 0
OrganisationIDKey is the key that holds the unique Organisation ID in a request context.
View Source
const UserIDKey ctxKeyUserID = 0
UserIDKey is the key that holds the unique user ID in a request context.
Variables ¶
This section is empty.
Functions ¶
func CheckOrganisation ¶
CheckOrganisation check X-Organisation in header
func CheckSuperOrganisation ¶
CheckSuperOrganisation checks weather organisation of user is super org or not
func GetOrganisation ¶
GetOrganisation return Organisation ID
func GetRequest ¶
GetRequest returns error if error in status code
func GetSuperOrganisationID ¶
GetSuperOrganisationID get superorganisation id from keto policy
func GormRequestID ¶
GormRequestID returns middleware to add request_id in gorm context
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.