Documentation
¶
Index ¶
- func ValidateConfiguration(creds []Credential, models []VendorModel) *errors.APIError
- func ValidateCredentials(creds []Credential) *errors.APIError
- func ValidateVendorModels(models []VendorModel) *errors.APIError
- type AppConfig
- type Credential
- type ValidatedCredential
- type ValidatedVendorModel
- type VendorModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfiguration ¶
func ValidateConfiguration(creds []Credential, models []VendorModel) *errors.APIError
ValidateConfiguration validates the complete application configuration
func ValidateCredentials ¶
func ValidateCredentials(creds []Credential) *errors.APIError
ValidateCredentials validates credential configuration
func ValidateVendorModels ¶
func ValidateVendorModels(models []VendorModel) *errors.APIError
ValidateVendorModels validates vendor model configuration
Types ¶
type AppConfig ¶
type AppConfig struct { Credentials []Credential `validate:"required,min=1,dive"` VendorModels []VendorModel `validate:"required,min=1,dive"` }
AppConfig represents the complete application configuration
type Credential ¶
type Credential struct { Platform string `json:"platform"` Type string `json:"type"` Value string `json:"value"` }
func LoadCredentials ¶
func LoadCredentials(filePath string) ([]Credential, error)
type ValidatedCredential ¶
type ValidatedCredential struct { Platform string `validate:"required,oneof=openai gemini anthropic"` Type string `validate:"required,oneof=api-key oauth"` Value string `validate:"required,min=1"` }
Credential validation tags
type ValidatedVendorModel ¶
type ValidatedVendorModel struct { Vendor string `validate:"required,oneof=openai gemini anthropic"` Model string `validate:"required,min=1"` }
VendorModel validation tags
type VendorModel ¶
func LoadVendorModels ¶
func LoadVendorModels(filePath string) ([]VendorModel, error)
Click to show internal directories.
Click to hide internal directories.