add v2 compatible config.

This commit is contained in:
Miroslav Šedivý 2024-07-18 21:48:09 +02:00
parent b5c3f8d4a6
commit e0a4b39cd5
10 changed files with 889 additions and 0 deletions

View file

@ -87,6 +87,27 @@ func (c *serve) Init(cmd *cobra.Command) error {
return err
}
// V2 configuration
if err := c.configs.Desktop.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Capture.InitV2(cmd); err != nil {
return err
}
if err := c.configs.WebRTC.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Member.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Session.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Server.InitV2(cmd); err != nil {
return err
}
return nil
}
@ -100,6 +121,13 @@ func (c *serve) PreRun(cmd *cobra.Command, args []string) {
c.configs.Session.Set()
c.configs.Plugins.Set()
c.configs.Server.Set()
c.configs.Desktop.SetV2()
c.configs.Capture.SetV2()
c.configs.WebRTC.SetV2()
c.configs.Member.SetV2()
c.configs.Session.SetV2()
c.configs.Server.SetV2()
}
func (c *serve) Start(cmd *cobra.Command) {