util

package
v0.0.0-...-643f1d8 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const OrganisationIDKey ctxKeyOrganisationID = 0

OrganisationIDKey is the key that holds the unique Organisation ID in a request context.

Variables

This section is empty.

Functions

func CheckOrganisation

func CheckOrganisation(h http.Handler) http.Handler

CheckOrganisation check X-Organisation in header

func CheckOwnerFromKavach

func CheckOwnerFromKavach(uID, oID int) (bool, error)

CheckOwnerFromKavach checks if user is owner of organisation

func CheckSuperOrganisation

func CheckSuperOrganisation(h http.Handler) http.Handler

CheckSuperOrganisation checks weather organisation of user is super org or not

func GenerateFilters

func GenerateFilters(tagIDs []string) string

func GetOrganisation

func GetOrganisation(ctx context.Context) (int, error)

GetOrganisation return Organisation ID

func GetRequest

func GetRequest(url string) error

GetRequest returns error if error in status code

func KavachChecker

func KavachChecker() error

KavachChecker checks if Kavach is ready

func KetoChecker

func KetoChecker() error

KetoChecker checks if keto is ready

func KratosChecker

func KratosChecker() error

KratosChecker checks if Kratos is ready

func MeiliChecker

func MeiliChecker() error

MeiliChecker checks if Meilisearch is ready

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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