models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Version string   `yaml:"version"`
	Servers *Servers `yaml:"servers"`
	AI      struct {
		Provider    string  `yaml:"provider"`
		BaseURL     string  `yaml:"base_url"`
		ApiKey      string  `yaml:"api_key"`
		Model       string  `yaml:"model"`
		MaxTokens   int     `yaml:"max_tokens"`
		Temperature float64 `yaml:"temperature"`
		Timeout     int     `yaml:"timeout"`
	} `yaml:"ai"`
	Output struct {
		Format string `yaml:"format"`
	} `yaml:"output"`
	Log struct {
		Level      string `yaml:"level"`
		MaxSize    int    `yaml:"maxSize"`
		MaxBackups int    `yaml:"maxBackups"`
		MaxAge     int    `yaml:"maxAge"`
		Compress   bool   `yaml:"compress"`
	} `yaml:"log"`
}

func (*AppConfig) AddServer

func (c *AppConfig) AddServer(name string, inst *ServerInstance)

func (*AppConfig) GetDefaultServer

func (c *AppConfig) GetDefaultServer() *ServerInstance

func (*AppConfig) GetOutputFormat

func (c *AppConfig) GetOutputFormat() string

func (*AppConfig) GetServer

func (c *AppConfig) GetServer(name string) *ServerInstance

func (*AppConfig) ListServers

func (c *AppConfig) ListServers() []string

func (*AppConfig) RemoveServer

func (c *AppConfig) RemoveServer(name string)

func (*AppConfig) SetDefault

func (c *AppConfig) SetDefault(name string)

type ServerInstance

type ServerInstance struct {
	URL         string `yaml:"url"`
	DeviceToken string `yaml:"device_token"`
	DeviceKey   string `yaml:"device_key"`
	Token       string `yaml:"token"`
	Timeout     int    `yaml:"timeout"`
}

type Servers

type Servers struct {
	Default   string                     `yaml:"default"`
	Instances map[string]*ServerInstance `yaml:"instances"`
}

Jump to

Keyboard shortcuts

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