conf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilePath

func FilePath() string

func Sample

func Sample() []byte

Types

type Conf

type Conf struct {
	Translate   ConfTranslate   `toml:"translate"`
	Translators ConfTranslators `toml:"translators"`
}

func Load

func Load() Conf

type ConfTranslate

type ConfTranslate struct {
	Source string `toml:"source"`
	Target string `toml:"target"`
}

type ConfTranslator

type ConfTranslator struct {
	Enabled bool   `toml:"enabled"`
	Proxy   string `toml:"proxy"`
	URI     string `toml:"uri"`
	ApiKey  string `toml:"api-key"`
}

type ConfTranslators

type ConfTranslators struct {
	Bing              ConfTranslator `toml:"bing"`
	Google            ConfTranslator `toml:"google"`
	DeeplAPI          ConfTranslator `toml:"deepl-api"`
	LibreTranslateAPI ConfTranslator `toml:"libretranslate-api"`
}

Jump to

Keyboard shortcuts

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