feat: initial commit

This commit is contained in:
2025-02-21 18:42:56 +01:00
commit ee4a65b345
81 changed files with 3441 additions and 0 deletions

25
internal/config/config.go Normal file
View File

@ -0,0 +1,25 @@
package config
import (
"github.com/caarlos0/env/v11"
"github.com/pkg/errors"
)
type Config struct {
Logger Logger `envPrefix:"LOGGER_"`
Auth Auth `envPrefix:"AUTH_"`
HTTP HTTP `envPrefix:"HTTP_"`
Storage Storage `envPrefix:"STORAGE_"`
LLM LLM `envPrefix:"LLM_"`
}
func Parse() (*Config, error) {
conf, err := env.ParseAsWithOptions[Config](env.Options{
Prefix: "CLEARCASE_",
})
if err != nil {
return nil, errors.WithStack(err)
}
return &conf, nil
}