config

package
v1.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultServerPort = 8000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auto added in v1.0.3

type Auto struct {
	Domains []string `mapstructure:"domains"`
	Email   string   `mapstructure:"email"`
}

type LlmConfig

type LlmConfig struct {
	ChatGPT string `mapstructure:"chat-gpt"`
}

type Provided added in v1.0.3

type Provided struct {
	Cert string `mapstructure:"cert"`
	Key  string `mapstructure:"key"`
}

type ServerConfig

type ServerConfig struct {
	Port                 int      `mapstructure:"port"`
	CheckHealthOnStartup bool     `mapstructure:"check-health-on-startup"`
	Passwords            []string `mapstructure:"passwords"`
	DemoMode             bool     `mapstructure:"demo-mode"`
	Tls                  TLS      `mapstructure:"tls"`
}

type SpeechToTextConfig

type SpeechToTextConfig struct {
	Whisper string `mapstructure:"whisper"`
	Google  string `mapstructure:"google"`
}

type TLS added in v1.0.1

type TLS struct {
	Auto       Auto     `mapstructure:"auto"`
	Provided   Provided `mapstructure:"provided"`
	SelfSigned bool     `mapstructure:"self-signed"`
}

type TLSPolicy added in v1.0.3

type TLSPolicy int
const (
	TLSPolicyNone            TLSPolicy = iota
	TLSPolicyProvided        TLSPolicy = iota
	TLSPolicySelfSignedOnFly TLSPolicy = iota
	TLSPolicyAuto            TLSPolicy = iota
)

func WhichTLSPolicy added in v1.0.3

func WhichTLSPolicy(tls TLS) TLSPolicy

type TalkConfig

type TalkConfig struct {
	Server       ServerConfig       `mapstructure:"server"`
	SpeechToText SpeechToTextConfig `mapstructure:"speech-to-text"`
	TextToSpeech TextToSpeechConfig `mapstructure:"text-to-speech"`
	Llm          LlmConfig          `mapstructure:"llm"`

	Creds map[string]string `mapstructure:"creds"`
}

func LoadConfig

func LoadConfig(logger *zap.Logger) (*TalkConfig, error)

func MustLoadConfig

func MustLoadConfig(logger *zap.Logger) *TalkConfig

type TextToSpeechConfig

type TextToSpeechConfig struct {
	ElevenLabs string `mapstructure:"elevenlabs"`
	Google     string `mapstructure:"google"`
}

Jump to

Keyboard shortcuts

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