Documentation ¶
Index ¶
- Constants
- func ApiKeyCheckerGRPC(ctx context.Context, appKeyRepo postgresRepository.AppKeyRepository, app App) bool
- 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 ( KEY_TENANT_NAME = "TenantName" KEY_USER_ID = "UserId" KEY_USER_EMAIL = "UserEmail" KEY_USER_ROLES = "UserRoles" KEY_IDENTITY_ID = "IdentityId" )
View Source
const ApiKeyHeader = "X-Openline-API-KEY"
View Source
const IdentityIdHeader = "X-Openline-IDENTITY-ID"
View Source
const TenantApiKeyHeader = "X-CUSTOMER-OS-API-KEY"
View Source
const TenantHeader = "X-Openline-TENANT"
View Source
const UsernameHeader = "X-Openline-USERNAME"
Variables ¶
This section is empty.
Functions ¶
func ApiKeyCheckerGRPC ¶
func ApiKeyCheckerGRPC(ctx context.Context, appKeyRepo postgresRepository.AppKeyRepository, app App) bool
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" ANTHROPIC_API App = "anthropic-api" OPENAI_API App = "openai-api" PLATFORM_ADMIN_API App = "platform-admin-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.