feat: use Client interface instead of client struct when interacting with UniFi SDK (#21)

* feat: use Client interface instead of client struct when interacting with UniFi SDK

Breaking change!

* chore: linting

* chore: linting
This commit is contained in:
Mateusz Filipowicz
2025-02-17 09:38:41 +01:00
committed by GitHub
parent fadc5ada8b
commit dca894e8e7
104 changed files with 1048 additions and 419 deletions

View File

@@ -93,7 +93,7 @@ func (dst *SettingMgmtXSshKeys) UnmarshalJSON(b []byte) error {
return nil
}
func (c *Client) getSettingMgmt(ctx context.Context, site string) (*SettingMgmt, error) {
func (c *client) getSettingMgmt(ctx context.Context, site string) (*SettingMgmt, error) {
var respBody struct {
Meta Meta `json:"meta"`
Data []SettingMgmt `json:"data"`
@@ -112,7 +112,7 @@ func (c *Client) getSettingMgmt(ctx context.Context, site string) (*SettingMgmt,
return &d, nil
}
func (c *Client) updateSettingMgmt(ctx context.Context, site string, d *SettingMgmt) (*SettingMgmt, error) {
func (c *client) updateSettingMgmt(ctx context.Context, site string, d *SettingMgmt) (*SettingMgmt, error) {
var respBody struct {
Meta Meta `json:"meta"`
Data []SettingMgmt `json:"data"`