config

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v1.0.0

func Init()

Types

type AppConfig

type AppConfig struct {
	AppID       int     `toml:"app_id" mapstructure:"app_id"`
	AppHash     string  `toml:"app_hash" mapstructure:"app_hash"`
	BotToken    string  `toml:"bot_token" mapstructure:"bot_token"`
	Admins      []int64 `toml:"admins" mapstructure:"admins"`
	SkipCatchup bool    `toml:"skip_catchup" mapstructure:"skip_catchup"`
	Plugin      struct {
		Enable   bool     `toml:"enable" mapstructure:"enable"`
		Prefixes []string `toml:"prefixes" mapstructure:"prefixes"`
	} `toml:"plugin" mapstructure:"plugin"`
	Engine struct {
		Type     string `toml:"type" mapstructure:"type"` // "meilisearch" or "bleve"
		Url      string `toml:"url" mapstructure:"url"`
		Index    string `toml:"index" mapstructure:"index"` // For meilisearch: index uid
		Key      string `toml:"key" mapstructure:"key"`
		Embedder struct {
			Name             string `toml:"name" mapstructure:"name"`
			Source           string `toml:"source" mapstructure:"source"`
			Model            string `toml:"model" mapstructure:"model"`
			ApiKey           string `toml:"api_key" mapstructure:"api_key"`
			DocumentTemplate string `toml:"document_template" mapstructure:"document_template"`
			Dimensions       int    `toml:"dimensions" mapstructure:"dimensions"`
			URL              string `toml:"url" mapstructure:"url"`
		} `toml:"embedder" mapstructure:"embedder"`
	} `toml:"engine" mapstructure:"engine"`
	Ocr struct {
		Enable bool   `toml:"enable" mapstructure:"enable"`
		Type   string `toml:"type" mapstructure:"type"` // "paddle"
		Paddle struct {
			Url       string  `toml:"url" mapstructure:"url"`
			Threshold float64 `toml:"threshold" mapstructure:"threshold"`
		}
	}
	Api struct {
		Enable bool   `toml:"enable" mapstructure:"enable"`
		Addr   string `toml:"addr" mapstructure:"addr"`
		Key    string `toml:"key" mapstructure:"key"`
	}
	FileCache struct {
		Disable bool   `toml:"disable" mapstructure:"disable"`
		Dir     string `toml:"dir" mapstructure:"dir"`
		TTL     string `toml:"ttl" mapstructure:"ttl"`
	} `toml:"file_cache" mapstructure:"file_cache"`
}
var C AppConfig

Jump to

Keyboard shortcuts

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