Documentation ¶
Index ¶
- Constants
- type Cache
- func (c *Cache) AddTenant(tenant string)
- func (c *Cache) AddUserDetailsToCache(username, userId, tenant string, roles []string)
- func (c *Cache) CheckApiKey(app, apiKey string) bool
- func (c *Cache) CheckTenant(tenant string) bool
- func (c *Cache) CheckTenantApiKey(apiKey string) bool
- func (c *Cache) GetEmailExclusion(tenant string) []postgresEntity.TenantSettingsEmailExclusion
- func (c *Cache) GetOrganizationWebsiteHostingUrlPatters() []string
- func (c *Cache) GetPersonalEmailProviders() []string
- func (c *Cache) GetUserDetailsFromCache(username string) (string, string, []string, bool)
- func (c *Cache) IsPersonalEmailProvider(domain string) bool
- func (c *Cache) SetApiKey(app, apiKey string)
- func (c *Cache) SetEmailExclusion(emailExclusionList []postgresEntity.TenantSettingsEmailExclusion)
- func (c *Cache) SetOrganizationWebsiteHostingUrlPatters(urlPatterns []string)
- func (c *Cache) SetPersonalEmailProviders(domains []string)
- func (c *Cache) SetTenantApiKey(tenant, apiKey string)
- type UserDetail
Constants ¶
const (
KB = 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func NewCommonCache ¶
func NewCommonCache() *Cache
func (*Cache) AddUserDetailsToCache ¶
AddUserDetailsToCache stores user details in the cache
func (*Cache) CheckApiKey ¶
CheckApiKey checks if an API key is in the cache
func (*Cache) CheckTenant ¶
CheckTenant verifies if a tenant exists in the cache
func (*Cache) CheckTenantApiKey ¶
CheckTenantApiKey checks if a tenant API key exists in the cache
func (*Cache) GetEmailExclusion ¶
func (c *Cache) GetEmailExclusion(tenant string) []postgresEntity.TenantSettingsEmailExclusion
func (*Cache) GetOrganizationWebsiteHostingUrlPatters ¶
GetOrganizationWebsiteHostingUrlPatters retrieves organization URL patterns from the cache with local caching
func (*Cache) GetPersonalEmailProviders ¶
GetPersonalEmailProviders retrieves personal email providers from the cache with local caching
func (*Cache) GetUserDetailsFromCache ¶
GetUserDetailsFromCache retrieves user details from the cache
func (*Cache) IsPersonalEmailProvider ¶
IsPersonalEmailProvider checks if a given domain is a personal email provider
func (*Cache) SetEmailExclusion ¶
func (c *Cache) SetEmailExclusion(emailExclusionList []postgresEntity.TenantSettingsEmailExclusion)
func (*Cache) SetOrganizationWebsiteHostingUrlPatters ¶
SetOrganizationWebsiteHostingUrlPatters caches URL patterns in chunks
func (*Cache) SetPersonalEmailProviders ¶
SetPersonalEmailProviders caches the list of personal email providers in chunks
func (*Cache) SetTenantApiKey ¶
SetTenantApiKey sets the tenant's API key in the cache