config

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name  string
	Files []string
}

type Auth

type Auth struct {
	Username string
	Password string
	Secret   string
}

type BunnyCDN

type BunnyCDN struct {
	Zone string
	Key  string
	Base string
}

type Config

type Config struct {
	Development       bool
	Port              int
	SourceDirectory   string
	Site              Site
	User              User
	WebhookSecret     string
	XRayEndpoint      string
	WebmentionsSecret string
	Assets            []*Asset
	Auth              Auth
	PostgreSQL        PostgreSQL
	Tor               *Tor
	BunnyCDN          *BunnyCDN
	Telegram          *Telegram
	Twitter           *Twitter
	Miniflux          *Miniflux
}

func Parse

func Parse() (*Config, error)

Parse parses the configuration from the default files and paths.

type MenuItem struct {
	Name  string
	Emoji string
	Link  string
}

type Miniflux

type Miniflux struct {
	Endpoint string
	Key      string
}

type PostgreSQL

type PostgreSQL struct {
	User     string
	Password string
	Host     string
	Port     string
	Database string
}

type Site

type Site struct {
	Language      string
	Title         string
	BaseURL       string
	Description   string
	Sections      []string
	MicropubTypes map[mf2.Type][]string
	IndexSections []string
	Paginate      int
	Menus         map[string][]MenuItem
}

type Telegram

type Telegram struct {
	Token  string
	ChatID int64
}

type Tor

type Tor struct {
	ConfDir string
	Logging bool
}

type Twitter

type Twitter struct {
	User        string
	Key         string
	Secret      string
	Token       string
	TokenSecret string
}

type User

type User struct {
	Name     string
	Nickname string
	Twitter  string
	Photo    string
	Email    string
	URL      string
	Rels     []string
	PGP      string
}

Jump to

Keyboard shortcuts

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