config

package
v0.0.0-...-09d31aa Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: ISC Imports: 7 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

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