diff options
| author | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2026-02-12 12:34:08 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2026-02-12 12:59:03 +0100 |
| commit | a30ef6b27e578a4cf0a674b24f5b52b4c1516c63 (patch) | |
| tree | 27c7321cbceac2a487c1ba17151711de3d438a53 /internal/server/custom.go | |
| parent | b00ce8214479c50e137db73c77b0cc1393c5e7d4 (diff) | |
All: Rename packages that sound useless or clash with std
Diffstat (limited to 'internal/server/custom.go')
| -rw-r--r-- | internal/server/custom.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/server/custom.go b/internal/server/custom.go index a9a26b9..0837c86 100644 --- a/internal/server/custom.go +++ b/internal/server/custom.go @@ -5,8 +5,8 @@ import ( "log/slog" "time" - "codeberg.org/eduVPN/eduvpn-common/internal/api" "codeberg.org/eduVPN/eduvpn-common/internal/config/v2" + "codeberg.org/eduVPN/eduvpn-common/internal/eduvpnapi" "codeberg.org/eduVPN/eduvpn-common/types/server" "codeberg.org/jwijenbergh/eduoauth-go/v2" ) @@ -16,7 +16,7 @@ import ( // `id` is the identifier of the server, the base URL // `ot` specifies specifies the start time OAuth was already triggered func (s *Servers) AddCustom(ctx context.Context, id string, ot *int64) error { - sd := api.ServerData{ + sd := eduvpnapi.ServerData{ ID: id, Type: server.TypeCustom, BaseWK: id, @@ -40,7 +40,7 @@ func (s *Servers) AddCustom(ctx context.Context, id string, ot *int64) error { } // Authorize by creating the API object - _, err = api.NewAPI(ctx, s.clientID, sd, s.cb, nil) + _, err = eduvpnapi.NewAPI(ctx, s.clientID, sd, s.cb, nil) if err != nil { // authorization has failed, remove the server again rerr := s.config.RemoveServer(id, server.TypeCustom) @@ -58,7 +58,7 @@ func (s *Servers) AddCustom(ctx context.Context, id string, ot *int64) error { // `tok` are the tokens such that we can initialize the API // `disableAuth` is set to True when authorization should not be triggered func (s *Servers) GetCustom(ctx context.Context, id string, tok *eduoauth.Token, disableAuth bool) (*Server, error) { - sd := api.ServerData{ + sd := eduvpnapi.ServerData{ ID: id, Type: server.TypeCustom, BaseWK: id, @@ -71,7 +71,7 @@ func (s *Servers) GetCustom(ctx context.Context, id string, tok *eduoauth.Token, if err != nil { return nil, err } - a, err := api.NewAPI(ctx, s.clientID, sd, s.cb, tok) + a, err := eduvpnapi.NewAPI(ctx, s.clientID, sd, s.cb, tok) if err != nil { return nil, err } |
