config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) error

Types

type BadgerSettings

type BadgerSettings struct {
	Path      string
	ValuePath string
}

type DBDriver

type DBDriver string
const (
	// DriverBadger    DBDriver = "badger"
	DriverCockroach DBDriver = "cockroach"
)

type IPAddress

type IPAddress string

func (IPAddress) Validate

func (a IPAddress) Validate() error

type Port

type Port int

func (Port) Validate

func (p Port) Validate() error

type PostgresSettings

type PostgresSettings struct {
	User               string
	Password           string
	Host               string
	Port               string
	Database           string
	SSLMode            string `toml:"ssl_mode"`
	SSLRootCert        string `toml:"ssl_root_cert"`
	Cluster            string
	MinimumConnections int32 `toml:"minimum_connections"`
	MaximumConnections int32 `toml:"maximum_connections"`
}

type Settings

type Settings struct {
	Debug bool
	User  struct {
		Email          string
		PublicKeyPath  string
		PrivateKeyPath string
		PreferredName  string
	}
	Instance struct {
		URL string
	}
	Daemon struct {
		IP   IPAddress
		Port Port
	}
	Database struct {
		Driver   DBDriver
		Badger   BadgerSettings
		Postgres PostgresSettings
	}
	Site SiteSettings
}

func GetSettings

func GetSettings() *Settings

type SiteSettings added in v0.3.0

type SiteSettings struct {
	Title      string
	PublicPath string `toml:"public_path"`
}

type SubjectKind

type SubjectKind string
const (
	KindUser SubjectKind = "user"
	KindPost SubjectKind = "post"
)

Jump to

Keyboard shortcuts

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