config

package
v0.0.0-...-7fb66d3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB struct {
		Path string `toml:"path"`
	} `toml:"db"`
	Admin struct {
		Email    string `toml:"email"`
		Name     string `toml:"name"`
		Password string `toml:"password"`
	} `toml:"admin"`
	Storage struct {
		Path string `toml:"path"`
	} `toml:"storage"`
	Web struct {
		Port        int64  `toml:"port"`
		Host        string `toml:"host"`
		PublicLink  string `toml:"public_link"`
		SessionName string `toml:"session_name"`
		SecretKey   string `toml:"secret_key"`
	} `toml:"web"`
	CSRF struct {
		CsrfString string `toml:"csrf_string"`
	} `toml:"csrf"`
}

config reader from toml file

func ParseConfig

func ParseConfig(config_path string) (*Config, error)

TODO: tests for web port

Jump to

Keyboard shortcuts

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