config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Version  string      `mapstructure:"version"`
	Resource APIResource `mapstructure:"resource"`
	Metadata APIMetadata `mapstructure:"metadata"`
}

type APIMetadata

type APIMetadata struct {
	Filename string `mapstructure:"filename"`
	Public   string `mapstructure:"public"`
}

type APIResource

type APIResource struct {
	Filename string `mapstructure:"filename"`
	Public   string `mapstructure:"public"`
}

type AppTemplate

type AppTemplate struct {
	Name string
	URL  string
}

type IConfig

type IConfig interface {
	GetProjectRoot() string
	GetBuildPath() string
	GetConfigPath() string
	GetContentPath() string
	GetStaticPath() string
	GetSrcPath() string
	GetAPIPath() string
	GetAPIVersion() string
	GetAPIFilename() string
	GetPublicAPIFilename() string
	GetLibPath() string
	GetRoutesPath() string
	GetThemesPath() string
	GetThemeConfigFilename() string
	GetThemeComponentsPath() string
	GetThemePartialsPath() string
	GetIndexPageFilename() string
	GetSlugPageFilename() string
	GetContentPageFilename() string
}
type MenuConfig struct {
	Resources   []*ResourceItem
	Pages       []string
	WithContent bool
}

type NoPage

type NoPage struct {
	Config *SiteConfig
	Items  *NoPageItems
}

type NoPageItems

type NoPageItems struct {
	Resources []string
	Content   map[string][]string
	Metadata  map[string][]string
	Pages     []string
}

type Pages

type Pages struct {
	Content string `mapstructure:"content"`
	Index   string `mapstructure:"index"`
	Slug    string `mapstructure:"slug"`
}

type Paths

type Paths struct {
	Build   string `mapstructure:"build"`
	Config  string `mapstructure:"config"`
	Content string `mapstructure:"content"`
	Static  string `mapstructure:"static"`
	Src     string `mapstructure:"src"`
	Routes  string `mapstructure:"routes"`
	Lib     string `mapstructure:"lib"`
	API     string `mapstructure:"api"`
	Themes  string `mapstructure:"themes"`
}

type PromptContent

type PromptContent struct {
	ErrorMsg string
	Label    string
}

type ResourceItem

type ResourceItem struct {
	// contains filtered or unexported fields
}

func NewResourceItem

func NewResourceItem(name string) *ResourceItem

func (*ResourceItem) AddChild

func (r *ResourceItem) AddChild(name string)

func (*ResourceItem) GetContents

func (r *ResourceItem) GetContents() []string

func (*ResourceItem) GetName

func (r *ResourceItem) GetName() string

type SettingItem added in v0.2.0

type SettingItem struct {
	PackageManager string `yaml:"packageManager"`
}

type SiteConfig

type SiteConfig struct {
	BaseURL           string `mapstructure:"VITE_PUBLIC_BASE_PATH"`
	SitemapChangeFreq string `mapstructure:"sitemapChangeFreq"`
	SitemapPriority   string `mapstructure:"sitemapPriority"`
}

type SveltinConfig

type SveltinConfig struct {
	Pages Pages `mapstructure:"pages"`
	Paths Paths `mapstructure:"paths"`
	API   API   `mapstructure:"api"`
	Theme Theme `mapstructure:"theme"`
}

func (*SveltinConfig) GetAPIFilename

func (c *SveltinConfig) GetAPIFilename() string

func (*SveltinConfig) GetAPIPath

func (c *SveltinConfig) GetAPIPath() string

func (*SveltinConfig) GetAPIVersion

func (c *SveltinConfig) GetAPIVersion() string

func (*SveltinConfig) GetBuildPath

func (c *SveltinConfig) GetBuildPath() string

func (*SveltinConfig) GetConfigPath

func (c *SveltinConfig) GetConfigPath() string

func (*SveltinConfig) GetContentPageFilename

func (c *SveltinConfig) GetContentPageFilename() string

func (*SveltinConfig) GetContentPath

func (c *SveltinConfig) GetContentPath() string

func (*SveltinConfig) GetIndexPageFilename

func (c *SveltinConfig) GetIndexPageFilename() string

func (*SveltinConfig) GetLibPath

func (c *SveltinConfig) GetLibPath() string

func (*SveltinConfig) GetMetadataAPIFilename

func (c *SveltinConfig) GetMetadataAPIFilename() string

func (*SveltinConfig) GetProjectRoot

func (c *SveltinConfig) GetProjectRoot() string

func (*SveltinConfig) GetPublicAPIFilename

func (c *SveltinConfig) GetPublicAPIFilename() string

func (*SveltinConfig) GetPublicMetadataAPIFilename

func (c *SveltinConfig) GetPublicMetadataAPIFilename() string

func (*SveltinConfig) GetRoutesPath

func (c *SveltinConfig) GetRoutesPath() string

func (*SveltinConfig) GetSlugPageFilename

func (c *SveltinConfig) GetSlugPageFilename() string

func (*SveltinConfig) GetSrcPath

func (c *SveltinConfig) GetSrcPath() string

func (*SveltinConfig) GetStaticPath

func (c *SveltinConfig) GetStaticPath() string

func (*SveltinConfig) GetThemeComponentsPath

func (c *SveltinConfig) GetThemeComponentsPath() string

func (*SveltinConfig) GetThemeConfigFilename

func (c *SveltinConfig) GetThemeConfigFilename() string

func (*SveltinConfig) GetThemePartialsPath

func (c *SveltinConfig) GetThemePartialsPath() string

func (*SveltinConfig) GetThemesPath

func (c *SveltinConfig) GetThemesPath() string

type SveltinSettings added in v0.2.0

type SveltinSettings struct {
	Item SettingItem `yaml:"Settings"`
}

func (*SveltinSettings) GetPackageManager added in v0.2.0

func (s *SveltinSettings) GetPackageManager() string

type TemplateData

type TemplateData struct {
	ProjectName string
	Name        string
	Resource    string
	Type        string
	Config      *SveltinConfig
	Menu        *MenuConfig
	NoPage      *NoPage
	Misc        string
}

type Theme

type Theme struct {
	File       string `mapstructure:"file"`
	Components string `mapStructure:"components"`
	Partials   string `mapstructure:"partials"`
}

type TplConfig

type TplConfig struct {
	PathToTplFile string
	Funcs         template.FuncMap
	Data          TemplateData
}

Jump to

Keyboard shortcuts

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