internal

package
v0.0.0-...-1b0d4df Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configuration = struct {
	Bot      BotConfiguration      `yaml:"bot"`
	Telegram TelegramConfiguration `yaml:"telegram"`
	Database DatabaseConfiguration `yaml:"database"`
	Lnbits   LnbitsConfiguration   `yaml:"lnbits"`
	//	Generate GenerateConfiguration `yaml:"generate"`
	Nostr NostrConfiguration `yaml:"nostr"`
}{}

Functions

func IsAuthorized

func IsAuthorized(userID int64) bool

Types

type BotConfiguration

type BotConfiguration struct {
	SocksProxy     *SocksConfiguration `yaml:"socks_proxy,omitempty"`
	TorProxy       *SocksConfiguration `yaml:"tor_proxy,omitempty"`
	LNURLServer    string              `yaml:"lnurl_server"`
	LNURLServerUrl *url.URL            `yaml:"-"`
	LNURLHostName  string              `yaml:"lnurl_public_host_name"`
	LNURLHostUrl   *url.URL            `yaml:"-"`
	LNURLSendImage bool                `yaml:"lnurl_image"`
	AdminAPIHost   string              `yaml:"admin_api_host"`
	Name           string              `yaml:"name"`
	Username       string              `yaml:"username"`
	Botadmin       string              `yaml:"botadmin"`
	AuthorizedIDs  []string            `yaml:"authorized_ids"`
}

type DatabaseConfiguration

type DatabaseConfiguration struct {
	DbPath           string `yaml:"db_path"`
	BuntDbPath       string `yaml:"buntdb_path"`
	TransactionsPath string `yaml:"transactions_path"`
}

type LnbitsConfiguration

type LnbitsConfiguration struct {
	AdminId          string   `yaml:"admin_id"`
	AdminKey         string   `yaml:"admin_key"`
	Url              string   `yaml:"url"`
	LnbitsPublicUrl  string   `yaml:"lnbits_public_url"`
	WebhookServer    string   `yaml:"webhook_server"`
	WebhookServerUrl *url.URL `yaml:"-"`
}

type NostrConfiguration

type NostrConfiguration struct {
	PrivateKey string `yaml:"private_key"`
}

type SocksConfiguration

type SocksConfiguration struct {
	Host     string `yaml:"host"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type TelegramConfiguration

type TelegramConfiguration struct {
	MessageDisposeDuration int64  `yaml:"message_dispose_duration"`
	ApiKey                 string `yaml:"api_key"`
}

Directories

Path Synopsis
api
telegram

Jump to

Keyboard shortcuts

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