This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-16 20:41:39 +00:00
|
|
|
package ak
|
|
|
|
|
|
|
|
import (
|
2021-05-16 19:07:01 +00:00
|
|
|
"context"
|
|
|
|
|
|
|
|
"goauthentik.io/outpost/api"
|
2021-01-16 20:41:39 +00:00
|
|
|
)
|
|
|
|
|
2021-05-16 19:07:01 +00:00
|
|
|
func (a *APIController) Update() ([]api.ProxyOutpostConfig, error) {
|
2021-05-16 19:35:23 +00:00
|
|
|
providers, _, err := a.Client.OutpostsApi.OutpostsProxyList(context.Background()).Execute()
|
2021-01-16 20:41:39 +00:00
|
|
|
if err != nil {
|
|
|
|
a.logger.WithError(err).Error("Failed to fetch providers")
|
|
|
|
return nil, err
|
|
|
|
}
|
2021-05-16 19:07:01 +00:00
|
|
|
return providers.Results, nil
|
2021-01-16 20:41:39 +00:00
|
|
|
}
|