Documentation
¶
Index ¶
- func GetEntity(entity string, id interface{}) interface{}
- func GetEntityAs[T any](entity string, id interface{}) *T
- func RegisterEntity(entity string, getter EntityGetter)
- type ContentTemplateService
- func (s *ContentTemplateService) CreateContentTemplate(template *domain.ContentTemplate) (*domain.ContentTemplate, error)
- func (s *ContentTemplateService) DeleteContentTemplate(id string) error
- func (s *ContentTemplateService) FindAll(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.ContentTemplate, error)
- func (s *ContentTemplateService) GetById(id string) (*domain.ContentTemplate, error)
- func (s *ContentTemplateService) GetByTypeAndSceneAndTenantId(typeName, scene, tenantId string) (*domain.ContentTemplate, error)
- func (s *ContentTemplateService) GetContentTemplate(typeName, scene string) (title, content string)
- func (s *ContentTemplateService) PatchContentTemplate(id string, data map[string]interface{}) (result *domain.ContentTemplate, err error)
- func (s *ContentTemplateService) UpdateContentTemplate(template *domain.ContentTemplate) (*domain.ContentTemplate, error)
- type EntityGetter
- type EntityHelper
- type EventService
- func (s *EventService) AccessEventCenter(userId string)
- func (s *EventService) Check(conds map[string]interface{}) (*domain.Event, error)
- func (s *EventService) CreateEvent(event *domain.Event) (*domain.Event, error)
- func (s *EventService) DeleteEvent(event *domain.Event) error
- func (s *EventService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Event, error)
- func (s *EventService) FormatEvent(event *domain.Event) *domain.Event
- func (s *EventService) GetById(id int64) (*domain.Event, error)
- func (s *EventService) HistoryEvents()
- func (s *EventService) OnAccessEventCenter(event string, args ...interface{})
- func (s *EventService) PatchEvent(id int64, data map[string]interface{}) (*domain.Event, error)
- func (s *EventService) TriggerEvent(event string, args ...interface{})
- type LocaleFieldService
- func (s *LocaleFieldService) GetEntityAll(entityName, entityId string) []*i18n.LocaleFieldValue
- func (s *LocaleFieldService) GetEntityFieldAll(entityName, entityId, field string) []*i18n.LocaleFieldValue
- func (s *LocaleFieldService) LoadTranslations(locale, entityName string, entityIds ...string) map[string][]*i18n.LocaleFieldValue
- func (s *LocaleFieldService) SaveAll(fields []*domain.LocaleField) []*domain.LocaleField
- func (s *LocaleFieldService) StoreTranslations(translations []*i18n.LocaleFieldValue)
- type MessageService
- func (s *MessageService) CreateMessage(message *domain.Message) (*domain.Message, error)
- func (s *MessageService) DeleteMessage(message *domain.Message) error
- func (s *MessageService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Message, error)
- func (s *MessageService) FindAvailable(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Message, error)
- func (s *MessageService) FindSimples(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.SimpleMessage, error)
- func (s *MessageService) FindSimplesAvailable(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.SimpleMessage, error)
- func (s *MessageService) GetById(id int64) (*domain.Message, error)
- func (s *MessageService) HistoryMessages()
- func (s *MessageService) PatchMessage(id int64, data map[string]interface{}) (*domain.Message, error)
- func (s *MessageService) ValidateMessages()
- type OperationLogService
- type SysOptionService
- func (s *SysOptionService) AddSysOption(option *domain.SysOption) (*domain.SysOption, error)
- func (s *SysOptionService) AddSysOptions(options []domain.SysOption) (*[]domain.SysOption, error)
- func (s *SysOptionService) DeleteSysOption(option *domain.SysOption) (*domain.SysOption, error)
- func (s *SysOptionService) GetDefaultOptions(tenantId string) (*domain.SysOptions, error)
- func (s *SysOptionService) GetSystemOptions() (*domain.SysOptions, error)
- func (s *SysOptionService) GetTenantOptions(tenantId string) (*domain.SysOptions, error)
- func (s *SysOptionService) RemoveAllTenantOptions(tenantId string) error
- func (s *SysOptionService) RemoveTenantOption(tenantId string, key string) (*domain.SysOption, error)
- func (s *SysOptionService) SetTenantOption(tenantId string, key string, value string) (*domain.SysOption, error)
- func (s *SysOptionService) SetTenantOptions(tenantOptions *domain.SysOptions) (*domain.SysOptions, error)
- type UserOptionService
- func (s *UserOptionService) AddUserOption(option *domain.UserOption) (*domain.UserOption, error)
- func (s *UserOptionService) AddUserOptions(options []domain.UserOption) (*[]domain.UserOption, error)
- func (s *UserOptionService) GetDefaultUserOptions() (*domain.UserOptions, error)
- func (s *UserOptionService) GetUserOptions(userId string) (*domain.UserOptions, error)
- func (s *UserOptionService) RemoveAllUserOptions(userId string) error
- func (s *UserOptionService) RemoveUserOption(userId string, key string) (*domain.UserOption, error)
- func (s *UserOptionService) SetUserOption(userId string, key string, value string) (*domain.UserOption, error)
- func (s *UserOptionService) SetUserOptions(userOptions *domain.UserOptions) (*domain.UserOptions, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEntityAs ¶
func RegisterEntity ¶
func RegisterEntity(entity string, getter EntityGetter)
Types ¶
type ContentTemplateService ¶
type ContentTemplateService struct {
service.BaseService
ContentTemplateRepository *repository.ContentTemplateRepository `inject:"contentTemplateRepository"`
}
func (*ContentTemplateService) CreateContentTemplate ¶
func (s *ContentTemplateService) CreateContentTemplate(template *domain.ContentTemplate) (*domain.ContentTemplate, error)
func (*ContentTemplateService) DeleteContentTemplate ¶
func (s *ContentTemplateService) DeleteContentTemplate(id string) error
func (*ContentTemplateService) FindAll ¶
func (s *ContentTemplateService) FindAll(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.ContentTemplate, error)
func (*ContentTemplateService) GetById ¶
func (s *ContentTemplateService) GetById(id string) (*domain.ContentTemplate, error)
func (*ContentTemplateService) GetByTypeAndSceneAndTenantId ¶
func (s *ContentTemplateService) GetByTypeAndSceneAndTenantId(typeName, scene, tenantId string) (*domain.ContentTemplate, error)
func (*ContentTemplateService) GetContentTemplate ¶
func (s *ContentTemplateService) GetContentTemplate(typeName, scene string) (title, content string)
func (*ContentTemplateService) PatchContentTemplate ¶
func (s *ContentTemplateService) PatchContentTemplate(id string, data map[string]interface{}) (result *domain.ContentTemplate, err error)
func (*ContentTemplateService) UpdateContentTemplate ¶
func (s *ContentTemplateService) UpdateContentTemplate(template *domain.ContentTemplate) (*domain.ContentTemplate, error)
type EntityGetter ¶
type EntityGetter func(id interface{}) interface{}
type EntityHelper ¶
type EntityHelper struct {
Getters map[string]EntityGetter
// contains filtered or unexported fields
}
func (*EntityHelper) GetEntity ¶
func (h *EntityHelper) GetEntity(entity string, id interface{}) interface{}
func (*EntityHelper) RegisterEntity ¶
func (h *EntityHelper) RegisterEntity(entity string, getter EntityGetter)
type EventService ¶
type EventService struct {
service.BaseService
EventRepository *repository.EventRepository `inject:"eventRepository"`
ContentTemplateService *ContentTemplateService `inject:"contentTemplateService"`
}
func (*EventService) AccessEventCenter ¶
func (s *EventService) AccessEventCenter(userId string)
func (*EventService) Check ¶
func (s *EventService) Check(conds map[string]interface{}) (*domain.Event, error)
func (*EventService) CreateEvent ¶
func (*EventService) DeleteEvent ¶
func (s *EventService) DeleteEvent(event *domain.Event) error
func (*EventService) FormatEvent ¶
func (s *EventService) FormatEvent(event *domain.Event) *domain.Event
func (*EventService) HistoryEvents ¶
func (s *EventService) HistoryEvents()
func (*EventService) OnAccessEventCenter ¶
func (s *EventService) OnAccessEventCenter(event string, args ...interface{})
func (*EventService) PatchEvent ¶
func (*EventService) TriggerEvent ¶
func (s *EventService) TriggerEvent(event string, args ...interface{})
type LocaleFieldService ¶
type LocaleFieldService struct {
service.BaseService
i18n.Translator
LocaleFieldRepository *repository.LocaleFieldRepository `inject:"localeFieldRepository"`
LocalCache *cache.Cache
}
func (*LocaleFieldService) GetEntityAll ¶
func (s *LocaleFieldService) GetEntityAll(entityName, entityId string) []*i18n.LocaleFieldValue
func (*LocaleFieldService) GetEntityFieldAll ¶
func (s *LocaleFieldService) GetEntityFieldAll(entityName, entityId, field string) []*i18n.LocaleFieldValue
func (*LocaleFieldService) LoadTranslations ¶
func (s *LocaleFieldService) LoadTranslations(locale, entityName string, entityIds ...string) map[string][]*i18n.LocaleFieldValue
func (*LocaleFieldService) SaveAll ¶
func (s *LocaleFieldService) SaveAll(fields []*domain.LocaleField) []*domain.LocaleField
func (*LocaleFieldService) StoreTranslations ¶
func (s *LocaleFieldService) StoreTranslations(translations []*i18n.LocaleFieldValue)
type MessageService ¶
type MessageService struct {
service.BaseService
MessageRepository *repository.MessageRepository `inject:"messageRepository"`
}
func (*MessageService) CreateMessage ¶
func (*MessageService) DeleteMessage ¶
func (s *MessageService) DeleteMessage(message *domain.Message) error
func (*MessageService) FindAvailable ¶
func (*MessageService) FindSimples ¶
func (s *MessageService) FindSimples(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.SimpleMessage, error)
func (*MessageService) FindSimplesAvailable ¶
func (s *MessageService) FindSimplesAvailable(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.SimpleMessage, error)
func (*MessageService) GetById ¶
func (s *MessageService) GetById(id int64) (*domain.Message, error)
func (*MessageService) HistoryMessages ¶
func (s *MessageService) HistoryMessages()
func (*MessageService) PatchMessage ¶
func (*MessageService) ValidateMessages ¶
func (s *MessageService) ValidateMessages()
type OperationLogService ¶
type OperationLogService struct {
service.BaseService
OperationLogRepository *repository.OperationLogRepository `inject:"operationLogRepository"`
ContentTemplateService *ContentTemplateService `inject:"contentTemplateService"`
}
func (*OperationLogService) Append ¶
func (s *OperationLogService) Append(log *domain.OperationLog)
func (*OperationLogService) Find ¶
func (s *OperationLogService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.OperationLog, error)
type SysOptionService ¶
type SysOptionService struct {
service.BaseService
SysOptionRepository *repository.SysOptionRepository `inject:"sysOptionRepository"`
}
func (*SysOptionService) AddSysOption ¶
func (*SysOptionService) AddSysOptions ¶
func (*SysOptionService) DeleteSysOption ¶
func (*SysOptionService) GetDefaultOptions ¶
func (s *SysOptionService) GetDefaultOptions(tenantId string) (*domain.SysOptions, error)
func (*SysOptionService) GetSystemOptions ¶
func (s *SysOptionService) GetSystemOptions() (*domain.SysOptions, error)
func (*SysOptionService) GetTenantOptions ¶
func (s *SysOptionService) GetTenantOptions(tenantId string) (*domain.SysOptions, error)
func (*SysOptionService) RemoveAllTenantOptions ¶
func (s *SysOptionService) RemoveAllTenantOptions(tenantId string) error
func (*SysOptionService) RemoveTenantOption ¶
func (*SysOptionService) SetTenantOption ¶
func (*SysOptionService) SetTenantOptions ¶
func (s *SysOptionService) SetTenantOptions(tenantOptions *domain.SysOptions) (*domain.SysOptions, error)
type UserOptionService ¶
type UserOptionService struct {
service.BaseService
UserOptionRepository *repository.UserOptionRepository `inject:"userOptionRepository"`
}
func (*UserOptionService) AddUserOption ¶
func (s *UserOptionService) AddUserOption(option *domain.UserOption) (*domain.UserOption, error)
func (*UserOptionService) AddUserOptions ¶
func (s *UserOptionService) AddUserOptions(options []domain.UserOption) (*[]domain.UserOption, error)
func (*UserOptionService) GetDefaultUserOptions ¶
func (s *UserOptionService) GetDefaultUserOptions() (*domain.UserOptions, error)
func (*UserOptionService) GetUserOptions ¶
func (s *UserOptionService) GetUserOptions(userId string) (*domain.UserOptions, error)
func (*UserOptionService) RemoveAllUserOptions ¶
func (s *UserOptionService) RemoveAllUserOptions(userId string) error
func (*UserOptionService) RemoveUserOption ¶
func (s *UserOptionService) RemoveUserOption(userId string, key string) (*domain.UserOption, error)
func (*UserOptionService) SetUserOption ¶
func (s *UserOptionService) SetUserOption(userId string, key string, value string) (*domain.UserOption, error)
func (*UserOptionService) SetUserOptions ¶
func (s *UserOptionService) SetUserOptions(userOptions *domain.UserOptions) (*domain.UserOptions, error)
Click to show internal directories.
Click to hide internal directories.