config

package
v3.0.1-0...-781ade8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 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
	Me                Me
	WebhookSecret     string
	XRayEndpoint      string
	WebmentionsSecret string
	Assets            []*Asset
	Auth              Auth
	PostgreSQL        PostgreSQL
	Tor               *Tor
	BunnyCDN          *BunnyCDN
	Telegram          *Telegram
	Twitter           *Twitter
	Miniflux          *Miniflux
	MapBox            *MapBox
}

func Parse

func Parse() (*Config, error)

Parse parses the configuration from the default files and paths.

func (*Config) ID

func (c *Config) ID() string

type MapBox

type MapBox struct {
	AccessToken string
	MapStyle    string
	PinColor    string
	Size        string
	Zoom        int
	Use2X       bool
}

type Me

type Me struct {
	Name     string
	Nickname string
	Twitter  string
	Photo    string
	Email    string
	Rels     []string
	PGP      string
}
type MenuItem struct {
	Name  string
	Emoji string
	Link  string
}

type Miniflux

type Miniflux struct {
	Endpoint string
	Key      string
}

type PostType

type PostType struct {
	Type       string   `json:"type"`
	Name       string   `json:"name"`
	Properties []string `json:"properties,omitempty"`
	Required   []string `json:"required-properties,omitempty"`
}

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
	PostTypes     []PostType
}

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
}

Jump to

Keyboard shortcuts

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