From 9cd13c802d6983e2ed896883a266be09717d99f1 Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Wed, 11 Dec 2024 00:31:53 +0100 Subject: [PATCH] return unimplemented error --- management/server/networks/manager.go | 11 ++++++----- management/server/networks/resources/manager.go | 11 ++++++----- management/server/networks/routers/manager.go | 11 ++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/management/server/networks/manager.go b/management/server/networks/manager.go index 44e1f864c8a..5086ca19be0 100644 --- a/management/server/networks/manager.go +++ b/management/server/networks/manager.go @@ -2,6 +2,7 @@ package networks import ( "context" + "errors" "github.com/netbirdio/netbird/management/server/networks/resources" "github.com/netbirdio/netbird/management/server/networks/routers" @@ -33,23 +34,23 @@ func NewManager(store store.Store) Manager { } func (m *managerImpl) GetAllNetworks(ctx context.Context, accountID, userID string) ([]*Network, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) CreateNetwork(ctx context.Context, userID string, network *Network) (*Network, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) GetNetwork(ctx context.Context, accountID, userID, networkID string) (*Network, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) UpdateNetwork(ctx context.Context, userID string, network *Network) (*Network, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) DeleteNetwork(ctx context.Context, accountID, userID, networkID string) error { - return nil + return errors.New("not implemented") } func (m *managerImpl) GetResourceManager() resources.Manager { diff --git a/management/server/networks/resources/manager.go b/management/server/networks/resources/manager.go index eb12c2d8e54..b5ac22f3885 100644 --- a/management/server/networks/resources/manager.go +++ b/management/server/networks/resources/manager.go @@ -2,6 +2,7 @@ package resources import ( "context" + "errors" "github.com/netbirdio/netbird/management/server/store" ) @@ -25,21 +26,21 @@ func NewManager(store store.Store) Manager { } func (m *managerImpl) GetAllResources(ctx context.Context, accountID, userID, networkID string) ([]*NetworkResource, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) CreateResource(ctx context.Context, accountID string, resource *NetworkResource) (*NetworkResource, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) GetResource(ctx context.Context, accountID, userID, networkID, resourceID string) (*NetworkResource, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) UpdateResource(ctx context.Context, userID string, resource *NetworkResource) (*NetworkResource, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) DeleteResource(ctx context.Context, accountID, userID, networkID, resourceID string) error { - return nil + return errors.New("not implemented") } diff --git a/management/server/networks/routers/manager.go b/management/server/networks/routers/manager.go index 61eac115cd0..1dd9ec7fbf1 100644 --- a/management/server/networks/routers/manager.go +++ b/management/server/networks/routers/manager.go @@ -2,6 +2,7 @@ package routers import ( "context" + "errors" "github.com/netbirdio/netbird/management/server/store" ) @@ -25,21 +26,21 @@ func NewManager(store store.Store) Manager { } func (m *managerImpl) GetAllRouters(ctx context.Context, accountID, userID, networkID string) ([]*NetworkRouter, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) CreateRouter(ctx context.Context, userID string, router *NetworkRouter) (*NetworkRouter, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) GetRouter(ctx context.Context, accountID, userID, networkID, routerID string) (*NetworkRouter, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) UpdateRouter(ctx context.Context, userID string, router *NetworkRouter) (*NetworkRouter, error) { - return nil, nil + return nil, errors.New("not implemented") } func (m *managerImpl) DeleteRouter(ctx context.Context, accountID, userID, networkID, routerID string) error { - return nil + return errors.New("not implemented") }