config

package
v0.0.0-...-e5aaa3f Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: GPL-3.0 Imports: 3 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 {
	HTTPS    HTTPS    `yaml:"https"`
	Telegram Telegram `yaml:"telegram"`
	Postgres Postgres `yaml:"postgres"`
}

func ParseConfig

func ParseConfig(data []byte) (*Config, error)

func ParseConfigFile

func ParseConfigFile(path string) (*Config, error)

type HTTPS

type HTTPS struct {
	Host    string   `yaml:"host"`
	Port    string   `yaml:"port"`
	Public  string   `yaml:"public"`
	Private string   `yaml:"private"`
	Cross   []string `yaml:"cross"`
}

func (HTTPS) Addr

func (h HTTPS) Addr() string

type Postgres

type Postgres struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	Schema   string `yaml:"schema"`
}

type Telegram

type Telegram struct {
	Master  int    `yaml:"master"`
	Forward int64  `yaml:"forward"`
	Token   string `yaml:"token"`
}

Jump to

Keyboard shortcuts

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