config

package
v0.0.0-...-0ad932f Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Context string `toml:"context"`
	Name    string `toml:"name"`
	Value   string `toml:"value"`
}

type Config

type Config struct {
	Telegram   Telegram   `toml:"telegram"`
	DataSource DataSource `toml:"datasource"`
}

func Load

func Load(path string) (Config, error)

type DataSource

type DataSource struct {
	Host      string `toml:"host"`
	Port      int    `toml:"port"`
	Method    string `toml:"method"`
	Auth      Auth   `toml:"auth"`
	Interval  string `toml:"interval"`
	Params    Params `toml:"params"`
	TokenPath string `toml:"token_path"`
}

type Params

type Params map[string]string

type Telegram

type Telegram struct {
	AppId       int    `toml:"app_id"`
	AppHash     string `toml:"app_hash"`
	PhoneNumber string `toml:"phone_number"`

	TrojanContactName string `toml:"trojan_contact_name"`
}

Jump to

Keyboard shortcuts

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