config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*viper.Viper
	Log *logrus.Logger

	Site       Site
	OutputDir  string
	ContentDir string
	Languages  map[string]bool
	// contains filtered or unexported fields
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) GetHighlightStyle

func (conf *Config) GetHighlightStyle() string

func (*Config) GetRelURL

func (conf *Config) GetRelURL(path string, lang string) string

func (*Config) GetSlug

func (conf *Config) GetSlug(name string) string

func (*Config) GetSummary

func (conf *Config) GetSummary(text string) string

func (*Config) GetURL

func (conf *Config) GetURL(path string) string

func (*Config) Init

func (conf *Config) Init()

func (*Config) Load

func (conf *Config) Load(path string) error

func (*Config) Reset

func (conf *Config) Reset(m map[string]interface{})

func (*Config) SetDebug

func (conf *Config) SetDebug()

func (*Config) SetFilter

func (conf *Config) SetFilter(filter string)

func (*Config) SetMode

func (conf *Config) SetMode(mode string) error

func (*Config) SetOutput

func (conf *Config) SetOutput(output string)

func (*Config) SetWriter

func (conf *Config) SetWriter(w Writer)

func (*Config) Unmarshal

func (conf *Config) Unmarshal(key string, val interface{}) error

func (*Config) Watch

func (conf *Config) Watch(file string) error

func (*Config) With

func (conf *Config) With(lang string) *Config

func (*Config) Write

func (conf *Config) Write(file string, r io.Reader) error

type Site

type Site struct {
	URL      string
	Title    string
	SubTitle string
	Language string
}

type Writer

type Writer interface {
	Write(string, io.Reader) error
	Watch(string) error
}

Jump to

Keyboard shortcuts

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