config

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogConfig

type BlogConfig struct {
	BlogService     blogservice.BlogService
	CommentService  forumservice.CommentService
	MarkdownService markdownimpl.MarkdownService
	Domain          string
	Port            string
	DateFormat      string
	PageSize        uint64
	ExtractSize     uint64
	FeedFormat      string
	FeedSize        uint64
	Args            []string
}

type ForumConfig

type ForumConfig struct {
	ForumService forumservice.ForumService
	PageSize     uint64
	Args         []string
}

type GlobalConfig

type GlobalConfig struct {
	Domain string
	Port   string

	DefaultLang        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

	LangPicturePaths map[string]string

	ProfileGroupId            uint64
	ProfileDefaultPicturePath string

	PageGroups  []PageGroup
	Widgets     map[string]WidgetConfig
	WidgetPages []WidgetPageConfig

	GinReleaseMode bool
}

type GlobalServiceConfig

type GlobalServiceConfig struct {
	*GlobalConfig
	LoggerGetter            common.LoggerGetter
	VersionName             string
	AllLang                 []string
	StaticFileSystem        http.FileSystem
	SessionService          sessionimpl.SessionService
	TemplateService         templatesimpl.TemplateService
	SettingsService         settingsimpl.SettingsService
	PasswordStrengthService passwordstrengthimpl.PasswordStrengthService
	SaltService             saltimpl.SaltService
	LoginService            service.LoginService
	AdminService            adminimpl.AdminService
	ProfileService          service.ProfileService
	ForumService            forumimpl.RemoteForumService
	MarkdownService         markdownimpl.MarkdownService
	BlogService             blogimpl.RemoteBlogService
	WikiService             wikiimpl.RemoteWikiService
	WidgetService           remotewidgetimpl.RemoteWidgetService
}

func New

func New(conf *GlobalConfig, loggerGetter common.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.RemoteWidgetService) (*GlobalServiceConfig, error)

func (*GlobalServiceConfig) CreateBlogConfig

func (c *GlobalServiceConfig) CreateBlogConfig(blogId uint64, groupId uint64, args ...string) BlogConfig

func (*GlobalServiceConfig) CreateForumConfig

func (c *GlobalServiceConfig) CreateForumConfig(forumId uint64, groupId uint64, args ...string) ForumConfig

func (*GlobalServiceConfig) CreateWidgetConfig

func (c *GlobalServiceConfig) CreateWidgetConfig(widgetName string, objectId uint64, groupId uint64) remotewidgetservice.WidgetService

func (*GlobalServiceConfig) CreateWikiConfig

func (c *GlobalServiceConfig) CreateWikiConfig(wikiId uint64, groupId uint64, args ...string) WikiConfig

type PageGroup

type PageGroup struct {
	Id    uint64
	Pages []string
}

type WidgetConfig

type WidgetConfig struct {
	Kind       string
	WidgetName string
	ObjectId   uint64
	GroupId    uint64
	Templates  []string
}

type WidgetPageConfig

type WidgetPageConfig struct {
	Emplacement string
	Name        string
	WidgetRef   string
}

type WikiConfig

type WikiConfig struct {
	WikiService     wikiservice.WikiService
	MarkdownService markdownimpl.MarkdownService
	Args            []string
}

Jump to

Keyboard shortcuts

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