status-go/protocol/requests/initialize_application.go

25 lines
607 B
Go
Raw Normal View History

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-20 13:42:56 +00:00
// MediaServerEnableTLS is optional, if not provided, media server will use TLS by default
MediaServerEnableTLS *bool `json:"mediaServerEnableTLS"`
}
func (i *InitializeApplication) Validate() error {
if len(i.DataDir) == 0 {
return ErrInitializeApplicationInvalidDataDir
}
return nil
}