config

package
v0.0.0-...-d9311aa Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password,omitempty" yaml:"password"`
}

type Config

type Config struct {
	Basedir  string     `json:"basedir" yaml:"basedir"`
	Servers  []*Server  `json:"servers" yaml:"servers"`
	Logging  *Logging   `json:"logging" yaml:"logging"`
	Storage  *Storage   `json:"storage" yaml:"storage"`
	Plugins  []*Plugin  `json:"plugins" yaml:"plugins"`
	Accounts []*Account `json:"accounts" yaml:"accounts"`
	Database *Database  `json:"database" yaml:"database"`
}

func OpenFile

func OpenFile(name string) *Config

type Database

type Database struct {
	Engine string          `json:"engine" yaml:"engine"`
	Config *DatabaseConfig `json:"config" yaml:"config"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Path     string `json:"path,omitempty" yaml:"path"`
	Host     string `json:"host,omitempty" yaml:"host"`
	Port     string `json:"port,omitempty" yaml:"port"`
	Database string `json:"database,omitempty" yaml:"database"`
	Username string `json:"username,omitempty" yaml:"username"`
	Password string `json:"password,omitempty" yaml:"password"`
}

type Logging

type Logging struct {
	Basedir string `json:"basedir,omitempty" yaml:"basedir"`
	Level   string `json:"level,omitempty" yaml:"level"`
}

type Plugin

type Plugin struct {
	Plugin string       `json:"engine" yaml:"engine"`
	Config PluginConfig `json:"config" yaml:"config"`
}

type PluginConfig

type PluginConfig = any

type Server

type Server struct {
	Type    string `json:"type" yaml:"type"`
	Address string `json:"address" yaml:"address"`
}

type Storage

type Storage struct {
	Cache *StorageBackend `json:"cache" yaml:"cache"`
	Media *StorageBackend `json:"media" yaml:"media"`
}

type StorageBackend

type StorageBackend struct {
	Engine string `json:"engine" yaml:"engine"`
	Config any    `json:"config" yaml:"config"`
}

Jump to

Keyboard shortcuts

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