Back to godoc.org

Package legacy

v0.0.0-...-ffd16d0
Latest Go to latest

The latest major version is .

Published: Jul 8, 2020 | License: LGPL-3.0 | Module: github.com/urandom/readeef

Index

Variables

var DefaultCfg string = "" /* 1207 byte string literal not displayed */

Default configuration

func ReadConfig

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

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"`
	}
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier