Skip to content

Commit

Permalink
use viper&yaml configuration (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
joschahenningsen authored Dec 12, 2021
1 parent 300d5d3 commit 8ff078a
Show file tree
Hide file tree
Showing 20 changed files with 150 additions and 126 deletions.
4 changes: 2 additions & 2 deletions api/courses.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func createLecture(c *gin.Context) {
}
// name for folder for premiere file if needed
premiereFolder := fmt.Sprintf("%s/%d/%s/%s",
tools.Cfg.MassStorage,
tools.Cfg.Paths.Mass,
tumLiveContext.Course.Year,
tumLiveContext.Course.TeachingTerm,
tumLiveContext.Course.Slug)
Expand Down Expand Up @@ -555,7 +555,7 @@ func courseInfo(c *gin.Context) {
return
}
var courseInfo tum.CourseInfo
for _, token := range tools.Cfg.CampusToken {
for _, token := range tools.Cfg.Campus.Tokens {
courseInfo, err = tum.GetCourseInformation(req.CourseID, token)
if err == nil {
break
Expand Down
4 changes: 2 additions & 2 deletions api/lecture_halls.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func notifyCourseCreated(d MailTmpl, mailAddr string, subject string) error {
log.Println(mailAddr)
var body bytes.Buffer
_ = templ.ExecuteTemplate(&body, "mail-course-registered.gotemplate", d)
return tools.SendMail(tools.Cfg.MailServer, "[email protected]", subject, body.String(), []string{mailAddr})
return tools.SendMail(tools.Cfg.Mail.Server, tools.Cfg.Mail.Sender, subject, body.String(), []string{mailAddr})
}

func getSchedule(c *gin.Context) {
Expand All @@ -188,7 +188,7 @@ func getSchedule(c *gin.Context) {
return
}
//todo figure out right token
campus, err := campusonline.New(tools.Cfg.CampusToken[0], "")
campus, err := campusonline.New(tools.Cfg.Campus.Tokens[0], "")
if err != nil {
log.WithError(err).Error("Can't create campus client")
return
Expand Down
4 changes: 2 additions & 2 deletions api/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func pauseStream(c *gin.Context) {
log.WithError(err).Error("request to pause stream without lecture hall")
return
}
ge := goextron.New(fmt.Sprintf("http://%s", strings.ReplaceAll(lectureHall.CombIP, "extron3", "")), tools.Cfg.SMPUser, tools.Cfg.SMPPassword) // todo
ge := goextron.New(fmt.Sprintf("http://%s", strings.ReplaceAll(lectureHall.CombIP, "extron3", "")), tools.Cfg.Auths.SmpUser, tools.Cfg.Auths.SmpUser) // todo
err = ge.SetMute(pause)
client := go_anel_pwrctrl.New(lectureHall.PwrCtrlIp, tools.Cfg.PWRCTRLAuth)
client := go_anel_pwrctrl.New(lectureHall.PwrCtrlIp, tools.Cfg.Auths.PwrCrtlAuth)
if pause {
err := client.TurnOff(lectureHall.LiveLightIndex)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func forgotPassword(email string) {
body := fmt.Sprintf("Hello!\n"+
"You have been invited to use TUM-Live. You can set a password for your account here: https://live.rbg.tum.de/setPassword/%v\n"+
"After setting a password you can log in with the email this message was sent to. Please note that this is not your TUMOnline account.\n"+
"If you have any further questions please reach out to [email protected]", registerLink.RegisterSecret)
"If you have any further questions please reach out to "+tools.Cfg.Mail.Sender, registerLink.RegisterSecret)
err = tools.SendPasswordMail(email, body)
if err != nil {
log.Println("couldn't send password mail")
Expand Down
4 changes: 2 additions & 2 deletions api_grpc/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (s server) NotifyStreamFinished(ctx context.Context, request *pb.StreamFini
if lectureHall, err := dao.GetLectureHallByID(stream.LectureHallID); err != nil {
return nil, err
} else {
client := go_anel_pwrctrl.New(lectureHall.PwrCtrlIp, tools.Cfg.PWRCTRLAuth)
client := go_anel_pwrctrl.New(lectureHall.PwrCtrlIp, tools.Cfg.Auths.PwrCrtlAuth)
lightLock.Lock()
err := client.TurnOff(lectureHall.LiveLightIndex)
if err != nil {
Expand Down Expand Up @@ -273,7 +273,7 @@ func (s server) NotifyStreamStarted(ctx context.Context, request *pb.StreamStart
return nil, err
} else {
lightLock.Lock()
client := go_anel_pwrctrl.New(lectureHall.PwrCtrlIp, tools.Cfg.PWRCTRLAuth)
client := go_anel_pwrctrl.New(lectureHall.PwrCtrlIp, tools.Cfg.Auths.PwrCrtlAuth)
go func() {
err := client.TurnOn(lectureHall.LiveLightIndex)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions app/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func main() {
}
db, err := gorm.Open(mysql.Open(fmt.Sprintf(
"%v:%v@tcp(db:3306)/%v?parseTime=true&loc=Local",
tools.Cfg.DatabaseUser,
tools.Cfg.DatabasePassword,
tools.Cfg.DatabaseName),
tools.Cfg.Db.User,
tools.Cfg.Db.Password,
tools.Cfg.Db.Database),
), &gorm.Config{})
if err != nil {
sentry.CaptureException(err)
Expand Down
36 changes: 36 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
lrz:
name: "Erika Mustermann"
email: "[email protected]"
phone: "0123456789"
uploadUrl: "https://example.lrz.de/upload"
subDir: "RBG"
mail:
sender: "[email protected]"
server: "mailrelay.example.org"
SMIMECert: "/path/to/cert.pem"
SMIMEKey: "/path/to/key.pem"
db:
user: "root"
password: "example"
database: "tumlive"
campus:
base: "https://example.tum.de/api/v1/"
tokens:
- "secret1"
- "secret2"
ldap:
url: "ldap://abc.de"
user: "user"
password: "secret"
baseDn: "dc=example,dc=de"
userDn: "uid=%s,ou=people,dc=example,dc=de"
paths:
static: "/var/www/static"
mass: "/srv/ceph/live"
auths:
smpUser: "username"
smpPassword: "password"
pwrCrtlAuth: "user:password"
camAuth: "user:password"
ingestBase: "rtmp://ingest.tum.live/"
cookieStoreSecret: "put 40 random characters here"
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/viper v1.3.2
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
google.golang.org/genproto v0.0.0-20211206220100-3cb06788ce7f // indirect
Expand All @@ -47,6 +48,7 @@ require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
Expand All @@ -55,12 +57,20 @@ require (
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.4 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/afero v1.1.2 // indirect
github.com/spf13/cast v1.3.0 // indirect
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect
golang.org/x/text v0.3.7 // indirect
Expand Down
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/gabstv/melody v1.0.2 h1:wAc9xFmBCBX3jimwtkml5Z5nfyfur5q5uW8DHmW5gK0=
github.com/gabstv/melody v1.0.2/go.mod h1:fvJW9enOHGIN1E4nCuBZ3lIZxHiPbnMIIYEXcSKQq9o=
Expand Down Expand Up @@ -185,6 +186,7 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
Expand Down Expand Up @@ -246,6 +248,7 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/makasim/sentryhook v0.4.0/go.mod h1:HJj/vA0i8r42hfx3UwlzaO0ZcVS+sY94W4dz4C7VxoQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
Expand All @@ -265,6 +268,7 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le
github.com/microcosm-cc/bluemonday v1.0.16 h1:kHmAq2t7WPWLjiGvzKa5o3HzSfahUKiOq7fAPUiMNIc=
github.com/microcosm-cc/bluemonday v1.0.16/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
Expand All @@ -284,6 +288,7 @@ github.com/olahol/melody v0.0.0-20180227134253-7bd65910e5ab/go.mod h1:3lo03f1jM3
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
Expand Down Expand Up @@ -320,11 +325,16 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
8 changes: 4 additions & 4 deletions tools/cameras.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func FetchCameraPresets(ctx context.Context) {

func FetchLHPresets(lectureHall model.LectureHall) {
if lectureHall.CameraIP != "" {
cam := camera.NewCamera(lectureHall.CameraIP, Cfg.CameraAuthentication)
cam := camera.NewCamera(lectureHall.CameraIP, Cfg.Auths.CamAuth)
presets, err := cam.GetPresets()
if err != nil {
log.WithError(err).WithField("Camera", cam.Ip).Warn("FetchCameraPresets: failed to get Presets")
Expand All @@ -43,7 +43,7 @@ func UsePreset(preset model.CameraPreset) {
sentry.CaptureException(err)
return
}
c := camera.NewCamera(lectureHall.CameraIP, Cfg.CameraAuthentication)
c := camera.NewCamera(lectureHall.CameraIP, Cfg.Auths.CamAuth)
err = c.SetPreset(preset.PresetID)
if err != nil {
log.WithError(err).Error("UsePreset: unable to set preset for camera")
Expand All @@ -60,8 +60,8 @@ func TakeSnapshot(preset model.CameraPreset) {
sentry.CaptureException(err)
return
}
c := camera.NewCamera(lectureHall.CameraIP, Cfg.CameraAuthentication)
fileName, err := c.TakeSnapshot(Cfg.StaticPath)
c := camera.NewCamera(lectureHall.CameraIP, Cfg.Auths.CamAuth)
fileName, err := c.TakeSnapshot(Cfg.Paths.Static)
if err != nil {
log.WithField("Camera", c.Ip).WithError(err).Error("TakeSnapshot: failed to get camera snapshot")
return
Expand Down
128 changes: 63 additions & 65 deletions tools/config.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package tools

import (
"fmt"
log "github.com/sirupsen/logrus"
"os"
"strings"
"github.com/spf13/viper"
"time"
)

Expand All @@ -17,71 +17,69 @@ func init() {
if err != nil {
log.WithError(err).Error("tools.config.init: can't get time.location")
}
Cfg = Config{
MailUser: os.Getenv("MAIL_USER"),
MailServer: os.Getenv("MAIL_SERVER"),
DatabaseUser: os.Getenv("MYSQL_USER"),
DatabasePassword: os.Getenv("MYSQL_PASSWORD"),
DatabaseName: os.Getenv("MYSQL_DATABASE"),
VersionTag: os.Getenv("VERSION_TAG"),
LrzServerIngest: os.Getenv("LRZ_SERVER_INGEST"),
LrzServerHls: os.Getenv("LRZ_SERVER_HLS"),
LrzPassword: os.Getenv("LRZ_PASSWORD"),
CampusBase: os.Getenv("CAMPUS_API_BASE"),
CampusToken: strings.Split(os.Getenv("CAMPUS_API_TOKEN"), ";"),
CookieStoreSecret: os.Getenv("COOKIE_STORE_SECRET"),
LdapUrl: os.Getenv("LDAP_URL"),
LdapUser: os.Getenv("LDAP_USER"),
LdapPassword: os.Getenv("LDAP_PASSWORD"),
LdapBaseDN: os.Getenv("LDAP_BASE_DN"),
LdapUserDN: os.Getenv("LDAP_USER_DN"),
IngestBase: os.Getenv("IngestBase"),
CameraAuthentication: os.Getenv("CAMERA_AUTH"),
StaticPath: os.Getenv("STATIC_PATH"),
MassStorage: os.Getenv("MASS_STORAGE"),
SMPUser: os.Getenv("SMP_USER"),
SMPPassword: os.Getenv("SMP_PASSWORD"),
PWRCTRLAuth: os.Getenv("PWRCTRL_AUTH"),
SMIMECert: os.Getenv("SMIMECRT"),
SMIMEKey: os.Getenv("SMIMEKEY"),
LRZUploadURL: os.Getenv("LRZ_UPLOAD_URL"),
LrzUser: os.Getenv("LRZ_USER"),
LRZPhone: os.Getenv("LRZ_PHONE"),
LRZMail: os.Getenv("LRZ_MAIL"),
LRZSubDir: os.Getenv("LRZ_SUBDIR"),
initConfig()
}

func initConfig() {
viper.SetConfigName("config")
viper.SetConfigType("yaml")
viper.AddConfigPath("/etc/TUM-Live/")
viper.AddConfigPath("$HOME/.TUM-Live")
viper.AddConfigPath(".")
err := viper.ReadInConfig()
if err != nil {
if err == err.(viper.ConfigFileNotFoundError) {
log.WithError(err).Warn("tools.config.init: can't find config file")
} else {
panic(fmt.Errorf("fatal error config file: %v", err))
}
}
err = viper.Unmarshal(&Cfg)
if err != nil {
panic(fmt.Errorf("fatal error config file: %v", err))
}
}

type Config struct {
MailUser string
MailServer string
DatabaseUser string
DatabasePassword string
DatabaseName string
VersionTag string
LrzServerIngest string
LrzServerHls string
LrzUser string
LrzPassword string
CampusBase string
CampusToken []string
CookieStoreSecret string
LdapUrl string
LdapUser string
LdapPassword string
LdapBaseDN string
LdapUserDN string
IngestBase string
CameraAuthentication string
StaticPath string
MassStorage string
SMPUser string
SMPPassword string
PWRCTRLAuth string
SMIMECert string
SMIMEKey string
LRZUploadURL string
LRZPhone string
LRZMail string
LRZSubDir string
Lrz struct {
Name string `yaml:"name"`
Email string `yaml:"email"`
Phone string `yaml:"phone"`
UploadURL string `yaml:"uploadUrl"`
SubDir string `yaml:"subDir"`
} `yaml:"lrz"`
Mail struct {
Sender string `yaml:"sender"`
Server string `yaml:"server"`
SMIMECert string `yaml:"SMIMECert"`
SMIMEKey string `yaml:"SMIMEKey"`
} `yaml:"mail"`
Db struct {
User string `yaml:"user"`
Password string `yaml:"password"`
Database string `yaml:"database"`
} `yaml:"db"`
Campus struct {
Base string `yaml:"base"`
Tokens []string `yaml:"tokens"`
} `yaml:"campus"`
Ldap struct {
URL string `yaml:"url"`
User string `yaml:"user"`
Password string `yaml:"password"`
BaseDn string `yaml:"baseDn"`
UserDn string `yaml:"userDn"`
} `yaml:"ldap"`
Paths struct {
Static string `yaml:"static"`
Mass string `yaml:"mass"`
} `yaml:"paths"`
Auths struct {
SmpUser string `yaml:"smpUser"`
SmpPassword string `yaml:"smpPassword"`
PwrCrtlAuth string `yaml:"pwrCrtlAuth"`
CamAuth string `yaml:"camAuth"`
} `yaml:"auths"`
IngestBase string `yaml:"ingestBase"`
CookieStoreSecret string `yaml:"cookieStoreSecret"`
}
Loading

0 comments on commit 8ff078a

Please sign in to comment.