Documentation
¶
Index ¶
- type Tenant
- type TenantGetAllDTO
- type TenantHandlers
- type TenantRepository
- type TenantRepositoryImpl
- func (r *TenantRepositoryImpl) InsertTenant(tenant Tenant) error
- func (r *TenantRepositoryImpl) InsertUserAccess(userAccess TenantUserAccess) error
- func (r *TenantRepositoryImpl) SelectTenantAccessByUser(userId string) ([]TenantUserAccess, error)
- func (r *TenantRepositoryImpl) SelectTenantByUser(userId string) ([]Tenant, error)
- type TenantUserAccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TenantGetAllDTO ¶
type TenantHandlers ¶
type TenantHandlers struct { RabbitMqRouter *rabbitmq.RabbitMqRouter TenantRepository TenantRepository }
func NewHandlers ¶
func NewHandlers(rmq *rabbitmq.RabbitMqRouter, tenantRepository TenantRepository) *TenantHandlers
func (*TenantHandlers) GetAllTenantsHandler ¶
func (h *TenantHandlers) GetAllTenantsHandler(w http.ResponseWriter, r *http.Request)
func (*TenantHandlers) NewTenantHandler ¶
func (h *TenantHandlers) NewTenantHandler(w http.ResponseWriter, r *http.Request)
type TenantRepository ¶
type TenantRepository interface { InsertTenant(tenant Tenant) error InsertUserAccess(userAccess TenantUserAccess) error SelectTenantByUser(userId string) ([]Tenant, error) SelectTenantAccessByUser(userId string) ([]TenantUserAccess, error) }
type TenantRepositoryImpl ¶
func NewTenantRepository ¶
func NewTenantRepository(db *sql.DB) *TenantRepositoryImpl
func (*TenantRepositoryImpl) InsertTenant ¶
func (r *TenantRepositoryImpl) InsertTenant(tenant Tenant) error
InsertTenant inserts a new tenant into the database.
func (*TenantRepositoryImpl) InsertUserAccess ¶
func (r *TenantRepositoryImpl) InsertUserAccess(userAccess TenantUserAccess) error
func (*TenantRepositoryImpl) SelectTenantAccessByUser ¶
func (r *TenantRepositoryImpl) SelectTenantAccessByUser(userId string) ([]TenantUserAccess, error)
func (*TenantRepositoryImpl) SelectTenantByUser ¶
func (r *TenantRepositoryImpl) SelectTenantByUser(userId string) ([]Tenant, error)
type TenantUserAccess ¶
type TenantUserAccess struct { TenantId string `json:"tenant_id"` UserAccountId string `json:"user_account_id"` AccessLevel auth.AccessLevel `json:"access_level"` }
Click to show internal directories.
Click to hide internal directories.