Files
opencloud/pkg/shared/errors.go
Ralf Haferkamp 37609e52df feat!: Make the url signing secret a mandatory config option
This is required for allowing the web office to download images to
insert into documents.

The secret is generated by `opencloud init` and the server refuses
to start now without a secret being set. (Breaking Change)

Also the setting is now moved to the shared options as all involved
services need the same secret to work properly.

Related: https://github.com/opencloud-eu/web/issues/704
2025-11-04 16:01:00 +01:00

104 lines
4.7 KiB
Go

package shared
import (
"fmt"
"github.com/opencloud-eu/opencloud/pkg/config/defaults"
)
func MissingMachineAuthApiKeyError(service string) error {
return fmt.Errorf("The Machineauth API key has not been configured for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingSystemUserApiKeyError(service string) error {
return fmt.Errorf("The SystemUser API key has not been configured for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingJWTTokenError(service string) error {
return fmt.Errorf("The jwt_secret has not been set properly in your config for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingRevaTransferSecretError(service string) error {
return fmt.Errorf("The transfer_secret has not been set properly in your config for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingLDAPBindPassword(service string) error {
return fmt.Errorf("The ldap bind_password has not been set properly in your config for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingServiceUserPassword(service, serviceUser string) error {
return fmt.Errorf("The password of service user %s has not been set properly in your config for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
serviceUser, service, defaults.BaseConfigPath())
}
func MissingSystemUserID(service string) error {
return fmt.Errorf("The system user ID has not been configured for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingAdminUserID(service string) error {
return fmt.Errorf("The admin user ID has not been configured for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingServiceAccountID(service string) error {
return fmt.Errorf("The service account id has not been configured for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingServiceAccountSecret(service string) error {
return fmt.Errorf("The service account secret has not been configured for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingWOPISecretError(service string) error {
return fmt.Errorf("The WOPI secret has not been set properly in your config for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}
func MissingURLSigningSecret(service string) error {
return fmt.Errorf("The URL signing secret has not been set properly in your config for %s. "+
"Make sure your %s config contains the proper values "+
"(e.g. by using 'opencloud init --diff' and applying the patch or setting a value manually in "+
"the config/corresponding environment variable).",
service, defaults.BaseConfigPath())
}