From fff5946683c99c72d85e317e7c6e94e010a30b9b Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Mon, 20 Sep 2021 15:26:00 +0200 Subject: [PATCH] hound fixes --- pkg/auth/manager/nextcloud/nextcloud.go | 2 ++ pkg/user/manager/nextcloud/nextcloud.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/auth/manager/nextcloud/nextcloud.go b/pkg/auth/manager/nextcloud/nextcloud.go index 797e40411ee..c355f4a5a8d 100644 --- a/pkg/auth/manager/nextcloud/nextcloud.go +++ b/pkg/auth/manager/nextcloud/nextcloud.go @@ -44,6 +44,7 @@ type mgr struct { endPoint string } +// AuthManagerConfig contains config for a Nextcloud-based AuthManager type AuthManagerConfig struct { EndPoint string `mapstructure:"endpoint" docs:";The Nextcloud backend endpoint for user check"` } @@ -78,6 +79,7 @@ func New(m map[string]interface{}) (auth.Manager, error) { return NewAuthManager(c, &http.Client{}) } +// NewAuthManager returns a new Nextcloud-based AuthManager func NewAuthManager(c *AuthManagerConfig, hc *http.Client) (auth.Manager, error) { return &mgr{ endPoint: c.EndPoint, // e.g. "http://nc/apps/sciencemesh/" diff --git a/pkg/user/manager/nextcloud/nextcloud.go b/pkg/user/manager/nextcloud/nextcloud.go index d35b746f415..db002871d1b 100644 --- a/pkg/user/manager/nextcloud/nextcloud.go +++ b/pkg/user/manager/nextcloud/nextcloud.go @@ -46,6 +46,7 @@ type manager struct { endPoint string } +// UserManagerConfig contains config for a Nextcloud-based UserManager type UserManagerConfig struct { EndPoint string `mapstructure:"endpoint" docs:";The Nextcloud backend endpoint for user management"` } @@ -82,6 +83,7 @@ func New(m map[string]interface{}) (user.Manager, error) { return NewUserManager(c, &http.Client{}) } +// NewUserManager returns a new Nextcloud-based UserManager func NewUserManager(c *UserManagerConfig, hc *http.Client) (user.Manager, error) { return &manager{ endPoint: c.EndPoint, // e.g. "http://nc/apps/sciencemesh/"