2024-07-03 11:51:14 +00:00
|
|
|
package requests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrInitializeApplicationInvalidDataDir = errors.New("initialize-centralized-metric: no dataDir")
|
|
|
|
)
|
|
|
|
|
|
|
|
type InitializeApplication struct {
|
|
|
|
DataDir string `json:"dataDir"`
|
|
|
|
MixpanelAppID string `json:"mixpanelAppId"`
|
|
|
|
MixpanelToken string `json:"mixpanelToken"`
|
2024-11-22 02:23:17 +00:00
|
|
|
// MediaServerEnableTLS is optional, if not provided, media server will use TLS by default
|
2024-11-25 12:13:47 +00:00
|
|
|
MediaServerEnableTLS *bool `json:"mediaServerEnableTLS"`
|
|
|
|
SentryDSN string `json:"sentryDSN"`
|
2024-07-03 11:51:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (i *InitializeApplication) Validate() error {
|
|
|
|
if len(i.DataDir) == 0 {
|
|
|
|
return ErrInitializeApplicationInvalidDataDir
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|