globalconfig

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalConfig

type GlobalConfig struct {
	*ParsedConfig
	LoggerGetter            log.LoggerGetter
	Logger                  log.Logger
	VersionName             string
	AllLang                 []string
	LangPicturePaths        map[string]string
	StaticFileSystem        http.FileSystem
	SessionService          sessionservice.SessionService
	TemplateService         templateservice.TemplateService
	SettingsService         sessionservice.SessionService
	PasswordStrengthService passwordstrengthimpl.PasswordStrengthService
	LoginService            loginservice.FullLoginService
	AdminService            adminservice.AdminService
	ProfileService          profileservice.AdvancedProfileService
	ForumImpl               forumimpl.RemoteForumService
	MarkdownImpl            markdownimpl.MarkdownService
	BlogImpl                blogimpl.RemoteBlogService
	WikiImpl                wikiimpl.RemoteWikiService
	WidgetImpl              remotewidgetimpl.CustomWidgetService
}

func New

func New(conf *ParsedConfig, loggerGetter servicecommon.LoggerGetter, logger *slog.Logger, version string, sessionService sessionimpl.SessionService, templateService templatesimpl.TemplateService, settingsService settingsimpl.SettingsService, passwordStrengthService passwordstrengthimpl.PasswordStrengthService, saltService saltimpl.SaltService, loginService loginimpl.RemoteLoginService, adminService adminimpl.AdminService, profileService profileimpl.RemoteProfileService, forumService forumimpl.RemoteForumService, markdownService markdownimpl.MarkdownService, blogService blogimpl.RemoteBlogService, wikiService wikiimpl.RemoteWikiService, widgetService remotewidgetimpl.CustomWidgetService) (*GlobalConfig, error)

func (*GlobalConfig) ExtractAdminConfig

func (c *GlobalConfig) ExtractAdminConfig() config.AdminConfig

func (*GlobalConfig) ExtractAuthConfig

func (c *GlobalConfig) ExtractAuthConfig() config.AuthConfig

func (*GlobalConfig) ExtractLocalesConfig

func (c *GlobalConfig) ExtractLocalesConfig() config.LocalesConfig

func (*GlobalConfig) ExtractLoginConfig

func (c *GlobalConfig) ExtractLoginConfig() config.LoginConfig

func (*GlobalConfig) ExtractProfileConfig

func (c *GlobalConfig) ExtractProfileConfig() config.ProfileConfig

func (*GlobalConfig) ExtractSettingsConfig

func (c *GlobalConfig) ExtractSettingsConfig() config.SettingsConfig

func (*GlobalConfig) ExtractSiteConfig

func (c *GlobalConfig) ExtractSiteConfig() config.SiteConfig

func (*GlobalConfig) GetLogger

func (c *GlobalConfig) GetLogger() log.Logger

func (*GlobalConfig) GetLoggerGetter

func (c *GlobalConfig) GetLoggerGetter() log.LoggerGetter

func (*GlobalConfig) MakeBlogConfig

func (c *GlobalConfig) MakeBlogConfig(widgetConfig parser.WidgetConfig) (config.BlogConfig, bool)

func (*GlobalConfig) MakeForumConfig

func (c *GlobalConfig) MakeForumConfig(widgetConfig parser.WidgetConfig) (config.ForumConfig, bool)

func (*GlobalConfig) MakeWidgetConfig

func (c *GlobalConfig) MakeWidgetConfig(widgetConfig parser.WidgetConfig) (config.RemoteWidgetConfig, bool)

func (*GlobalConfig) MakeWikiConfig

func (c *GlobalConfig) MakeWikiConfig(widgetConfig parser.WidgetConfig) (config.WikiConfig, bool)

type ParsedConfig

type ParsedConfig struct {
	Domain string
	Port   string

	SessionTimeOut     int
	ServiceTimeOut     time.Duration
	MaxMultipartMemory int64
	DateFormat         string
	PageSize           uint64
	ExtractSize        uint64
	FeedFormat         string
	FeedSize           uint64

	FsConf      fsclient.FsConf
	StaticPath  string
	FaviconPath string
	Page404Url  string

	ProfileGroupId            uint64
	ProfileDefaultPicturePath string

	Locales     []parser.LocaleConfig
	StaticPages []parser.StaticPagesConfig
	Widgets     map[string]parser.WidgetConfig
	WidgetPages []parser.WidgetPageConfig

	GinReleaseMode bool
}

func (*ParsedConfig) GetServiceTimeOut

func (c *ParsedConfig) GetServiceTimeOut() time.Duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL