mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.6 KiB
Go
31 lines
1.6 KiB
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
"mime/multipart"
|
|
|
|
"github.com/go-sonic/sonic/model/dto"
|
|
)
|
|
|
|
type ThemeService interface {
|
|
GetThemeByID(ctx context.Context, themeID string) (*dto.ThemeProperty, error)
|
|
GetActivateTheme(ctx context.Context) (*dto.ThemeProperty, error)
|
|
ListAllTheme(ctx context.Context) ([]*dto.ThemeProperty, error)
|
|
ListThemeFiles(ctx context.Context, themeID string) ([]*dto.ThemeFile, error)
|
|
GetThemeFileContent(ctx context.Context, themeID, absPath string) (string, error)
|
|
UpdateThemeFile(ctx context.Context, themeID, absPath, content string) error
|
|
ListCustomTemplates(ctx context.Context, themeID, prefix string) ([]string, error)
|
|
ActivateTheme(ctx context.Context, themeID string) (*dto.ThemeProperty, error)
|
|
GetThemeConfig(ctx context.Context, themeID string) ([]*dto.ThemeConfigGroup, error)
|
|
GetThemeSettingMap(ctx context.Context, themeID string) (map[string]interface{}, error)
|
|
GetThemeGroupSettingMap(ctx context.Context, themeID, group string) (map[string]interface{}, error)
|
|
SaveThemeSettings(ctx context.Context, themeID string, settings map[string]interface{}) error
|
|
DeleteThemeSettings(ctx context.Context, themeID string) error
|
|
DeleteTheme(ctx context.Context, themeID string, deleteSettings bool) error
|
|
UploadTheme(ctx context.Context, file *multipart.FileHeader) (*dto.ThemeProperty, error)
|
|
UpdateThemeByUpload(ctx context.Context, themeID string, file *multipart.FileHeader) (*dto.ThemeProperty, error)
|
|
ReloadTheme(ctx context.Context) error
|
|
TemplateExist(ctx context.Context, template string) (bool, error)
|
|
Render(ctx context.Context, name string) (string, error)
|
|
}
|