feat(dondominio): allow any host values including wildcard

This commit is contained in:
Quentin McGaw
2024-01-28 09:42:39 +00:00
parent 8839db93dc
commit 417a26282e
3 changed files with 2 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
{
"provider": "dondominio",
"domain": "domain.com",
"host": "@",
"name": "something",
"username": "username",
"password": "password",
@@ -22,6 +23,7 @@
### Compulsory parameters
- `"domain"`
- `"host"` is the subdomain to update which can be `@`, `*` or a subdomain
- `"name"` is the name of the service/hosting
- `"username"`
- `"password"`

View File

@@ -14,7 +14,6 @@ var (
ErrEmailNotSet = errors.New("email is not set")
ErrEmailNotValid = errors.New("email address is not valid")
ErrGCPProjectNotSet = errors.New("GCP project is not set")
ErrHostOnlyAt = errors.New(`host can only be "@"`)
ErrHostOnlySubdomain = errors.New("host can only be a subdomain")
ErrHostWildcard = errors.New(`host cannot be a "*"`)
ErrIPv4KeyNotSet = errors.New("IPv4 key is not set")

View File

@@ -60,8 +60,6 @@ func (p *Provider) isValid() error {
return fmt.Errorf("%w", errors.ErrPasswordNotSet)
case p.name == "":
return fmt.Errorf("%w", errors.ErrNameNotSet)
case p.host != "@":
return fmt.Errorf("%w", errors.ErrHostOnlyAt)
}
return nil
}