parser

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocaleConfig

type LocaleConfig struct {
	Lang        string `hcl:"lang,label" yaml:"lang"`
	PicturePath string `hcl:"picturePath" yaml:"picturePath"`
}

type ParsedConfig

type ParsedConfig struct {
	Domain string `hcl:"domain,optional" yaml:"domain"`
	Port   string `hcl:"port,optional" yaml:"port"`

	SessionTimeOut     int    `hcl:"sessionTimeOut,optional" yaml:"sessionTimeOut"`
	ServiceTimeOut     string `hcl:"serviceTimeOut,optional" yaml:"serviceTimeOut"`
	MaxMultipartMemory int64  `hcl:"maxMultipartMemory,optional" yaml:"maxMultipartMemory"`
	DateFormat         string `hcl:"dateFormat,optional" yaml:"dateFormat"`
	PageSize           uint64 `hcl:"pageSize,optional" yaml:"pageSize"`
	ExtractSize        uint64 `hcl:"extractSize,optional" yaml:"extractSize"`
	FeedFormat         string `hcl:"feedFormat,optional" yaml:"feedFormat"`
	FeedSize           uint64 `hcl:"feedSize,optional" yaml:"feedSize"`

	StaticPath  string `hcl:"staticPath,optional" yaml:"staticPath"`
	FaviconPath string `hcl:"faviconPath,optional" yaml:"faviconPath"`
	Page404Url  string `hcl:"page404Url,optional" yaml:"page404Url"`

	ProfileGroupId            uint64 `hcl:"profileGroupId,optional" yaml:"profileGroupId"`
	ProfileDefaultPicturePath string `hcl:"profileDefaultPicturePath,optional" yaml:"profileDefaultPicturePath"`

	SessionServiceAddr          string `hcl:"sessionServiceAddr,optional" yaml:"sessionServiceAddr"`
	TemplateServiceAddr         string `hcl:"templateServiceAddr,optional" yaml:"templateServiceAddr"`
	PasswordStrengthServiceAddr string `hcl:"passwordStrengthServiceAddr,optional" yaml:"passwordStrengthServiceAddr"`
	SaltServiceAddr             string `hcl:"saltServiceAddr,optional" yaml:"saltServiceAddr"`
	LoginServiceAddr            string `hcl:"loginServiceAddr,optional" yaml:"loginServiceAddr"`
	RightServiceAddr            string `hcl:"rightServiceAddr,optional" yaml:"rightServiceAddr"`
	SettingsServiceAddr         string `hcl:"settingsServiceAddr,optional" yaml:"settingsServiceAddr"`
	ProfileServiceAddr          string `hcl:"profileServiceAddr,optional" yaml:"profileServiceAddr"`
	ForumServiceAddr            string `hcl:"forumServiceAddr" yaml:"forumServiceAddr"`
	MarkdownServiceAddr         string `hcl:"markdownServiceAddr" yaml:"markdownServiceAddr"`
	BlogServiceAddr             string `hcl:"blogServiceAddr" yaml:"blogServiceAddr"`
	WikiServiceAddr             string `hcl:"wikiServiceAddr" yaml:"wikiServiceAddr"`

	Locales          []LocaleConfig          `hcl:"locale,block" yaml:"locales"`
	PermissionGroups []PermissionGroupConfig `hcl:"permission,block" yaml:"permissionGroups"`
	StaticPages      []StaticPagesConfig     `hcl:"staticPages,block" yaml:"staticPages"`
	Widgets          []WidgetConfig          `hcl:"widget,block" yaml:"widgets"`
	WidgetPages      []WidgetPageConfig      `hcl:"widgetPage,block" yaml:"widgetPages"`
}

func ParseConfig

func ParseConfig(path string) (ParsedConfig, error)

func (*ParsedConfig) WidgetsAsMap

func (frame *ParsedConfig) WidgetsAsMap() map[string]WidgetConfig

type PermissionGroupConfig

type PermissionGroupConfig struct {
	Name string `hcl:"name,label" yaml:"name"`
	Id   uint64 `hcl:"groupId" yaml:"id"`
}

type StaticPagesConfig

type StaticPagesConfig struct {
	GroupId   uint64   `hcl:"groupId" yaml:"groupId"`
	Hidden    bool     `hcl:"hidden,optional" yaml:"hidden"`
	Locations []string `hcl:"locations" yaml:"locations"`
}

type WidgetConfig

type WidgetConfig struct {
	Name        string   `hcl:"name,label" yaml:"name"`
	Kind        string   `hcl:"kind" yaml:"kind"`
	ObjectId    uint64   `hcl:"objectId" yaml:"objectId"`
	GroupId     uint64   `hcl:"groupId" yaml:"groupId"`
	ServiceAddr string   `hcl:"serviceAddr,optional" yaml:"serviceAddr"`
	Templates   []string `hcl:"templates,optional" yaml:"templates"`
}

type WidgetPageConfig

type WidgetPageConfig struct {
	Path      string `hcl:"path,label" yaml:"path"`
	WidgetRef string `hcl:"widgetRef" yaml:"widgetRef"`
}

Jump to

Keyboard shortcuts

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