Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrorUnknownPlugin is the error returned when trying to get unknown plugin ErrorUnknownPlugin = errors.New("Unknown plugin") )
Functions ¶
Types ¶
type Disqus ¶
type Disqus struct{}
Disqus is https://disqus.com/ Plugin implementation
type ErrorConfiguring ¶
type ErrorConfiguring struct {
// contains filtered or unexported fields
}
ErrorConfiguring is the error returned when plugin configuring fails
func NewErrorConfiguring ¶
func NewErrorConfiguring(field string) *ErrorConfiguring
NewErrorConfiguring creates new ErrorConfiguring instance
func (*ErrorConfiguring) Error ¶
func (e *ErrorConfiguring) Error() string
func (*ErrorConfiguring) Field ¶
func (e *ErrorConfiguring) Field() string
Field returns configuring error field name
type GoogleAnalytics ¶
type GoogleAnalytics struct{}
GoogleAnalytics is http://www.google.com/analytics/ Plugin implementation
func (*GoogleAnalytics) Defaults ¶
func (p *GoogleAnalytics) Defaults() map[string]string
Defaults returns maps of default plugin configurations
type GoogleTagManager ¶
type GoogleTagManager struct{}
GoogleTagManager is https://tagmanager.google.com Plugin implementation
func (*GoogleTagManager) Defaults ¶
func (p *GoogleTagManager) Defaults() map[string]string
Defaults returns maps of default plugin configurations
type HighlightJS ¶
type HighlightJS struct{}
HighlightJS is https://highlightjs.org/ Plugin implementation
func (*HighlightJS) Defaults ¶
func (p *HighlightJS) Defaults() map[string]string
Defaults returns maps of default plugin configurations
type Plugin ¶
type Plugin interface { // Defaults returns maps of default plugin configurations Defaults() map[string]string // SetUp applies settings map to a plugin SetUp(settings map[string]string) (map[string]string, error) }
Plugin is the interface for plugins
type Settings ¶
type Settings struct { Disqus map[string]string `env:"PLUGINS_DISQUS"` Ga map[string]string `env:"PLUGINS_GA"` Gtm map[string]string `env:"PLUGINS_GTM"` Yamka map[string]string `env:"PLUGINS_YAMKA"` Highlightjs map[string]string `env:"PLUGINS_HIGHLIGHTJS"` Yasha map[string]string `env:"PLUGINS_YASHA"` }
Settings is the configuration for available plugins
type YandexMetrika ¶
type YandexMetrika struct{}
YandexMetrika is https://metrika.yandex.ru/ Plugin implementation
func (*YandexMetrika) Defaults ¶
func (p *YandexMetrika) Defaults() map[string]string
Defaults returns maps of default plugin configurations
type YandexShare ¶
type YandexShare struct{}
YandexShare is https://tech.yandex.ru/share/ Plugin implementation
func (*YandexShare) Defaults ¶
func (p *YandexShare) Defaults() map[string]string
Defaults returns maps of default plugin configurations