legacy

package
v0.0.0-...-95c851e Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCfg string = `` /* 1207-byte string literal not displayed */

Default configuration

Functions

func ReadConfig

func ReadConfig(path string) (config.Config, bool, error)

Types

type Config

type Config struct {
	Server struct {
		Address  string
		Port     int
		CertFile string `gcfg:"cert-file"`
		KeyFile  string `gcfg:"key-file"`
		Devel    bool
	}
	Renderer struct {
		Base string
		Dir  string
	}
	Dispatcher struct {
		Middleware []string
	}
	Static struct {
		Dir      string
		Expires  string
		Prefix   string
		Index    string
		FileList bool `gcfg:"file-list"`
	}
	Session struct {
		Dir             string
		Secret          string
		Cipher          string   // optional: 16, 24 or 32 bytes, base64 encoded
		MaxAge          string   `gcfg:"max-age"`
		CleanupInterval string   `gcfg:"cleanup-interval"`
		CleanupMaxAge   string   `gcfg:"cleanup-max-age"`
		IgnoreURLPrefix []string `gcfg:"ignore-url-prefix"`
	}
	I18n struct {
		Dir              string
		Languages        []string `gcfg:"language"`
		FallbackLanguage string   `gcfg:"fallback-language"`
		IgnoreURLPrefix  []string `gcfg:"ignore-url-prefix"`
	}
	Sitemap struct {
		LocPrefix        string `gcfg:"location-prefix"`
		RelativeLocation string `gcfg:"relative-location"`
	}
	Logger struct {
		Level      string
		File       string
		AccessFile string `gcfg:"access-file"`
		Formatter  string
	}
	API struct {
		Version   int
		Emulators []string
	}
	Timeout struct {
		Connect   string
		ReadWrite string `gcfg:"read-write"`

		Converted struct {
			Connect   time.Duration
			ReadWrite time.Duration
		}
	}
	DB struct {
		Driver  string
		Connect string
	}
	Auth struct {
		Secret           string
		TokenStoragePath string   `gcfg:"token-storage-path"`
		IgnoreURLPrefix  []string `gcfg:"ignore-url-prefix"`
	}
	Hubbub struct {
		CallbackURL  string `gcfg:"callback-url"` // http://www.example.com
		RelativePath string `gcfg:"relative-path"`
		From         string
	}

	Popularity struct {
		Delay     string
		Providers []string

		TwitterConsumerKey       string `gcfg:"twitter-consumer-key"`
		TwitterConsumerSecret    string `gcfg:"twitter-consumer-secret"`
		TwitterAccessToken       string `gcfg:"twitter-access-token"`
		TwitterAccessTokenSecret string `gcfg:"twitter-access-token-secret"`

		Converted struct {
			Delay time.Duration
		}
	}

	FeedParser struct {
		Processors []string

		ProxyHTTPURLTemplate string `gcfg:"proxy-http-url-template"`
	} `gcfg:"feed-parser"`

	FeedManager struct {
		UpdateInterval string `gcfg:"update-interval"`

		Monitors []string

		Converted struct {
			UpdateInterval time.Duration
		}
	} `gcfg:"feed-manager"`

	Content struct {
		Extractor         string
		Thumbnailer       string
		SearchProvider    string   `gcfg:"search-provider"`
		ArticleProcessors []string `gcfg:"article-processors"`

		SearchBatchSize int64 `gcfg:"search-batch-size"`

		ReadabilityKey       string `gcfg:"readability-key"`
		BlevePath            string `gcfg:"bleve-path"`
		ElasticURL           string `gcfg:"elastic-url"`
		ProxyHTTPURLTemplate string `gcfg:"proxy-http-url-template"`
	}
}

Jump to

Keyboard shortcuts

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