config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 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
}

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

func GetSettings

func GetSettings() *Settings

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