chore: add sqlite init and config, add repository for sql
ci-agent / build (push) Failing after 26s

This commit is contained in:
d3m0k1d
2026-04-03 22:48:31 +03:00
parent 2ebf374413
commit 28ef2dc1fd
12 changed files with 206 additions and 1 deletions
+20
View File
@@ -1 +1,21 @@
package config
import (
"fmt"
"gopkg.in/yaml.v3"
"os"
)
func ImportSettings(path string) (*HellreigN, error) {
data, err := os.ReadFile(path)
if err != nil {
fmt.Println(err)
}
var cfg HellreigN
if err := yaml.Unmarshal(data, &cfg); err != nil {
return nil, err
}
return &cfg, nil
}
+10 -1
View File
@@ -1,4 +1,13 @@
package config
type Config struct {
type HellreigN struct {
Database Databases `yaml:"database"`
}
type Databases struct {
Token_db string `yaml:"token_db"`
Clickhouse_host string `yaml:"clickhouse_host"`
Clickhouse_user string `yaml:"clickhouse_user"`
Clickhouse_password string `yaml:"clickhouse_password"`
}