Documentation ¶
Index ¶
- Constants
- func ApiKeyCheckerHTTP(tenantApiKeyRepo postgresRepository.TenantWebhookApiKeyRepository, ...) func(c *gin.Context)
- func TenantUserContextEnhancer(headerAllowance HeaderAllowance, cr *neo4jrepository.Repositories, ...) func(c *gin.Context)
- type App
- type CommonServiceOption
- type HeaderAllowance
- type Options
Constants ¶
View Source
const ( ApiKeyHeader = "X-Openline-API-KEY" TenantApiKeyHeader = "X-CUSTOMER-OS-API-KEY" )
View Source
const ( KEY_TENANT_NAME = "TenantName" KEY_USER_ID = "UserId" KEY_USER_EMAIL = "UserEmail" KEY_USER_ROLES = "UserRoles" KEY_APP_SOURCE = "AppSource" )
View Source
const TenantHeader = "X-Openline-TENANT"
View Source
const UsernameHeader = "X-Openline-USERNAME"
Variables ¶
This section is empty.
Functions ¶
func ApiKeyCheckerHTTP ¶
func ApiKeyCheckerHTTP(tenantApiKeyRepo postgresRepository.TenantWebhookApiKeyRepository, appKeyRepo postgresRepository.AppKeyRepository, app App, opts ...CommonServiceOption) func(c *gin.Context)
func TenantUserContextEnhancer ¶
func TenantUserContextEnhancer(headerAllowance HeaderAllowance, cr *neo4jrepository.Repositories, opts ...CommonServiceOption) func(c *gin.Context)
Types ¶
type App ¶
type App string
const ( CUSTOMER_OS_API App = "customer-os-api" CUSTOMER_OS_WEBHOOKS App = "customer-os-webhooks" FILE_STORE_API App = "file-store-api" SETTINGS_API App = "settings-api" VALIDATION_API App = "validation-api" AI_API App = "ai-api" PLATFORM_ADMIN_API App = "platform-admin-api" USER_ADMIN_API App = "user-admin-api" ENRICHMENT_API App = "enrichment-api" )
type CommonServiceOption ¶
type CommonServiceOption func(*Options)
func WithCache ¶
func WithCache(c *caches.Cache) CommonServiceOption
WithCache is an ApiKeyCheckerOption to set the cache
type HeaderAllowance ¶
type HeaderAllowance string
const ( USERNAME HeaderAllowance = "USERNAME" TENANT HeaderAllowance = "TENANT" USERNAME_OR_TENANT HeaderAllowance = "USERNAME_OR_TENANT" )
Click to show internal directories.
Click to hide internal directories.