Documentation
¶
Index ¶
- type AppConfig
- func (ac *AppConfig) AddProvider(provider *typ.Provider) error
- func (ac *AppConfig) AddProviderByName(name, apiBase, token string) error
- func (ac *AppConfig) ConfigDir() string
- func (ac *AppConfig) DeleteProvider(name string) error
- func (ac *AppConfig) FetchAndSaveProviderModels(providerName string) error
- func (ac *AppConfig) GetDebug() bool
- func (ac *AppConfig) GetGUIDebug() bool
- func (ac *AppConfig) GetGUIPort() int
- func (ac *AppConfig) GetGUIVerbose() bool
- func (ac *AppConfig) GetGlobalConfig() *config.Config
- func (ac *AppConfig) GetJWTSecret() string
- func (ac *AppConfig) GetOpenBrowser() bool
- func (ac *AppConfig) GetProviderByName(name string) (*typ.Provider, error)
- func (ac *AppConfig) GetProviderByUUID(uuid string) (*typ.Provider, error)
- func (ac *AppConfig) GetServerPort() int
- func (ac *AppConfig) GetVerbose() bool
- func (ac *AppConfig) GetVersion() string
- func (ac *AppConfig) ListProviders() []*typ.Provider
- func (ac *AppConfig) Save() error
- func (ac *AppConfig) SetDebug(debug bool) error
- func (ac *AppConfig) SetGUIDebug(debug bool) error
- func (ac *AppConfig) SetGUIPort(port int) error
- func (ac *AppConfig) SetGUIVerbose(verbose bool) error
- func (ac *AppConfig) SetOpenBrowser(v bool) error
- func (ac *AppConfig) SetServerPort(port int) error
- func (ac *AppConfig) SetVerbose(verbose bool) error
- func (ac *AppConfig) SetVersion(version string)
- func (ac *AppConfig) UpdateProvider(uuid string, provider *typ.Provider) error
- type AppConfigOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
// contains filtered or unexported fields
}
AppConfig holds the application configuration
func NewAppConfig ¶
func NewAppConfig(opts ...AppConfigOption) (*AppConfig, error)
NewAppConfig creates a new application configuration with default options
func (*AppConfig) AddProviderByName ¶
func (*AppConfig) DeleteProvider ¶
func (*AppConfig) FetchAndSaveProviderModels ¶
func (*AppConfig) GetGUIDebug ¶
func (*AppConfig) GetGUIPort ¶
func (*AppConfig) GetGUIVerbose ¶
func (*AppConfig) GetGlobalConfig ¶
GetGlobalConfig returns the underlying configuration manager
func (*AppConfig) GetJWTSecret ¶
func (*AppConfig) GetOpenBrowser ¶
func (*AppConfig) GetProviderByName ¶
func (*AppConfig) GetProviderByUUID ¶
func (*AppConfig) GetServerPort ¶
func (*AppConfig) GetVerbose ¶
func (*AppConfig) GetVersion ¶
func (*AppConfig) ListProviders ¶
func (*AppConfig) Save ¶
Save saves the configuration to file with pretty-printed, HTML-unescaped JSON.
func (*AppConfig) SetGUIDebug ¶
func (*AppConfig) SetGUIPort ¶
func (*AppConfig) SetGUIVerbose ¶
func (*AppConfig) SetOpenBrowser ¶
func (*AppConfig) SetServerPort ¶
func (*AppConfig) SetVerbose ¶
func (*AppConfig) SetVersion ¶
type AppConfigOption ¶
type AppConfigOption func(*appConfigOptions)
AppConfigOption defines a functional option for AppConfig
func WithConfigDir ¶
func WithConfigDir(dir string) AppConfigOption
WithConfigDir sets a custom config directory for AppConfig