Documentation ¶
Index ¶
- type PromptDetail
- type SettingsMetaData
- type TenantSettings
- func (tenant *TenantSettings) GetSettings() (map[string]interface{}, error)
- func (tenant *TenantSettings) GetSettingsMap() (map[string]string, error)
- func (tenant *TenantSettings) GetTenantSettings(metadatas []SettingsMetaData, globalTenantSettings map[string]interface{}) error
- func (tenant *TenantSettings) SetTenantSettings(metadatas []SettingsMetaData, values map[string]interface{}) error
- func (tenant *TenantSettings) Update(configuration map[string]interface{}, metadatas []SettingsMetaData) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromptDetail ¶ added in v1.1.19
type PromptDetail struct { PromptType string `json:"promptType"` PromptTitle string `json:"promptTitle"` PromptMessage string `json:"promptMessage"` ShowPromptWhenValues []interface{} `json:"showPromptWhenValues"` // If blank, shows prompt on every value change }
PromptDetail contains the metadata regarding prompt for data change
type SettingsMetaData ¶
type SettingsMetaData struct { Code string `json:"code"` DisplayName string `json:"displayName"` Description string `json:"description"` GroupName string `json:"groupName"` DisplaySequence int `json:"displaySequence"` Type string `json:"type"` TypeParam string `json:"typeParam"` Default string `json:"default"` Required bool `json:"required"` Validation string `json:"validation"` MaxValue float32 `json:"maxValue"` MinValue float32 `json:"minValue"` Hidden bool `json:"hidden"` ModuleName string `json:"moduleName"` SettingsLevel string `json:"settingsLevel"` AccessLevel string `json:"accessLevel"` ReadOnly bool `json:"readOnly"` ShowPrompt bool `json:"showPrompt"` PromptDetail PromptDetail `json:"promptDetail"` }
SettingsMetaData contains the metadata regarding settings
func (*SettingsMetaData) ParseAndValidate ¶
func (metadata *SettingsMetaData) ParseAndValidate(value interface{}) (interface{}, error)
ParseAndValidate checks if the supplied value matches the metadata
type TenantSettings ¶
type TenantSettings struct { microappModel.Base Settings string `gorm:"column:settings;type:text;"` }
Tenant supports different organisations from the same micro service.
func NewTenant ¶
func NewTenant(context microappCtx.ExecutionContext, tenantID uuid.UUID, configuration map[string]interface{}, metadata []SettingsMetaData) (*TenantSettings, error)
NewTenant creates new instance of Tenant with specified parameters and returns it
func (*TenantSettings) GetSettings ¶
func (tenant *TenantSettings) GetSettings() (map[string]interface{}, error)
GetSettings gets unmarshalled settings for tenant
func (*TenantSettings) GetSettingsMap ¶
func (tenant *TenantSettings) GetSettingsMap() (map[string]string, error)
GetSettingsMap
func (*TenantSettings) GetTenantSettings ¶
func (tenant *TenantSettings) GetTenantSettings(metadatas []SettingsMetaData, globalTenantSettings map[string]interface{}) error
GetTenantSettings gets the tenant settings with default
func (*TenantSettings) SetTenantSettings ¶
func (tenant *TenantSettings) SetTenantSettings(metadatas []SettingsMetaData, values map[string]interface{}) error
SetTenantSettings updates the tenant settings
func (*TenantSettings) Update ¶
func (tenant *TenantSettings) Update(configuration map[string]interface{}, metadatas []SettingsMetaData) error
Update tenant data
Click to show internal directories.
Click to hide internal directories.