caches

package
v0.0.0-...-679f9ba Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
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) AddTenant

func (c *Cache) AddTenant(tenant string)

AddTenant adds a tenant to the cache

func (*Cache) AddUserDetailsToCache

func (c *Cache) AddUserDetailsToCache(username, userId, tenant string, roles []string)

AddUserDetailsToCache stores user details in the cache

func (*Cache) CheckApiKey

func (c *Cache) CheckApiKey(app, apiKey string) bool

CheckApiKey checks if an API key is in the cache

func (*Cache) CheckTenant

func (c *Cache) CheckTenant(tenant string) bool

CheckTenant verifies if a tenant exists in the cache

func (*Cache) CheckTenantApiKey

func (c *Cache) CheckTenantApiKey(apiKey string) bool

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

func (c *Cache) GetOrganizationWebsiteHostingUrlPatters() []string

GetOrganizationWebsiteHostingUrlPatters retrieves organization URL patterns from the cache with local caching

func (*Cache) GetPersonalEmailProviders

func (c *Cache) GetPersonalEmailProviders() []string

GetPersonalEmailProviders retrieves personal email providers from the cache with local caching

func (*Cache) GetUserDetailsFromCache

func (c *Cache) GetUserDetailsFromCache(username string) (string, string, []string, bool)

GetUserDetailsFromCache retrieves user details from the cache

func (*Cache) IsPersonalEmailProvider

func (c *Cache) IsPersonalEmailProvider(domain string) bool

IsPersonalEmailProvider checks if a given domain is a personal email provider

func (*Cache) SetApiKey

func (c *Cache) SetApiKey(app, apiKey string)

SetApiKey adds an API key to the cache

func (*Cache) SetEmailExclusion

func (c *Cache) SetEmailExclusion(emailExclusionList []postgresEntity.TenantSettingsEmailExclusion)

func (*Cache) SetOrganizationWebsiteHostingUrlPatters

func (c *Cache) SetOrganizationWebsiteHostingUrlPatters(urlPatterns []string)

SetOrganizationWebsiteHostingUrlPatters caches URL patterns in chunks

func (*Cache) SetPersonalEmailProviders

func (c *Cache) SetPersonalEmailProviders(domains []string)

SetPersonalEmailProviders caches the list of personal email providers in chunks

func (*Cache) SetTenantApiKey

func (c *Cache) SetTenantApiKey(tenant, apiKey string)

SetTenantApiKey sets the tenant's API key in the cache

type UserDetail

type UserDetail struct {
	UserId string   `json:"userId"`
	Tenant string   `json:"tenant"`
	Roles  []string `json:"roles"`
}

Jump to

Keyboard shortcuts

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