Update to network version 9.0.114
This commit is contained in:
27
unifi/setting_doh.generated.go
generated
27
unifi/setting_doh.generated.go
generated
@@ -27,8 +27,9 @@ type SettingDoh struct {
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
ServerNames []string `json:"server_names,omitempty"`
|
||||
State string `json:"state,omitempty"` // off|auto|manual
|
||||
CustomServers []SettingDohCustomServers `json:"custom_servers,omitempty"`
|
||||
ServerNames []string `json:"server_names,omitempty"`
|
||||
State string `json:"state,omitempty"` // off|auto|manual|custom
|
||||
}
|
||||
|
||||
func (dst *SettingDoh) UnmarshalJSON(b []byte) error {
|
||||
@@ -47,6 +48,28 @@ func (dst *SettingDoh) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettingDohCustomServers struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
SdnsStamp string `json:"sdns_stamp,omitempty"`
|
||||
ServerName string `json:"server_name,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingDohCustomServers) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingDohCustomServers
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingDoh(ctx context.Context, site string) (*SettingDoh, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
|
||||
Reference in New Issue
Block a user