config

package
v0.0.0-...-c0cef93 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StrToLang

func StrToLang(str string) language.Tag

Types

type Config

type Config struct {
	OCR         ocr.Engine
	Translators []translator.Engine
}

type OCRConfig

type OCRConfig struct {
	Type      string   `yaml:"type"`
	ScanDelay int      `yaml:"scan-delay"`
	Lang      []string `yaml:"lang"`
}

type RawConfig

type RawConfig struct {
	OCR         OCRConfig          `yaml:"ocr"`
	Translators []TranslatorConfig `yaml:"translators"`
}

func LoadRawConfig

func LoadRawConfig(path string) (*RawConfig, error)

type TranslatorConfig

type TranslatorConfig struct {
	Type       string `yaml:"type"`
	APIKey     string `yaml:"api"`
	TargetLang string `yaml:"target"`
	SourceLang string `yaml:"source"`
	Socks5     string `yaml:"socks5"`
}

Jump to

Keyboard shortcuts

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