GetRequestSubdomain extracts subdomain from referring URL.
GetSubdomainFromHost extracts the subdomain from the requesting URL.
Handler contains the runtime information such as logging and database.
Get returns the requested organization.
Update saves organization amends.
UploadLogo stores log for organization.
Store provides data access to organization (tenant) information.
AddOrganization inserts the passed organization record into the organization table.
CheckDomain makes sure there is an organisation with the correct domain
DeleteOrganization deletes the orgID organization from the organization table.
func (s Store) GetOrganization(ctx domain.RequestContext, id string) (org org.Organization, err error)
GetOrganization returns the Organization record from the organization database table with the given id.
GetOrganizationByDomain returns the organization matching a given URL subdomain. No context is required because user might not be authenticated yet.
Logo fetchs stored image from store or NULL.
RemoveOrganization sets the orgID organization to be inactive, thus executing a "soft delete" operation.
UpdateAuthConfig updates the given organization record in the database with the auth config details.
UpdateOrganization updates the given organization record in the database to the values supplied.
UploadLogo saves custom logo to the organization record.