config

package
v0.0.0-...-3ffe1d7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: ISC Imports: 8 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 {
	Space    Space    `json:"space" yaml:"space"`
	Database Database `json:"database" yaml:"database"`
	Wiki     Wiki     `json:"wiki" yaml:"wiki"`
}

Config is configuration data

func Global

func Global() Config

Global gets the global configuration, loading it if this is the first caller

func (*Config) Load

func (config *Config) Load(filename string) error

Load loads config stuff

func (*Config) LoadAny

func (config *Config) LoadAny(filenames ...string) error

LoadAny loads the first of these files it can find

func (*Config) LoadEnv

func (config *Config) LoadEnv()

type Database

type Database struct {
	Driver     string `json:"driver" yaml:"driver"`
	Host       string `json:"host" yaml:"host"`
	Port       int    `json:"port" yaml:"port"`
	Db         string `json:"db" yaml:"db"`
	Username   string `json:"username" yaml:"username"`
	Password   string `json:"password" yaml:"password"`
	Mechanism  string `json:"mechanism" yaml:"mechanism"`
	RestoreIDs bool   `json:"restoreIDs" yaml:"restoreIDs"`
	SSL        bool   `json:"ssl" yaml:"ssl"`
}

Database is configuration for spaces.

type Space

type Space struct {
	Enabled   bool   `json:"enabled" yaml:"enabled"`
	Host      string `json:"host" yaml:"host"`
	AccessKey string `json:"accessKey" yaml:"accessKey"`
	SecretKey string `json:"secretKey" yaml:"secretKey"`
	Bucket    string `json:"bucket" yaml:"bucket"`
	MaxSize   int64  `json:"maxSize" yaml:"maxSize"`
	Root      string `json:"root" yaml:"root"`
	URLRoot   string `json:"urlRoot" yaml:"urlRoot"`
}

Space is configuration for spaces.

type Wiki

type Wiki struct {
	URL string `json:"url" yaml:"url"`
}

Wiki is the wiki stuff.

Jump to

Keyboard shortcuts

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