diff --git a/internal/kurious/domain/error.go b/internal/kurious/domain/error.go deleted file mode 100644 index f78426b..0000000 --- a/internal/kurious/domain/error.go +++ /dev/null @@ -1,6 +0,0 @@ -package domain - -import "errors" - -// ErrNotImplemented is returned by interface stubs that have not been implemented yet. -var ErrNotImplemented = errors.New("not implemented") diff --git a/internal/kurious/domain/repository.go b/internal/kurious/domain/repository.go index e9e473c..9d33e34 100644 --- a/internal/kurious/domain/repository.go +++ b/internal/kurious/domain/repository.go @@ -4,6 +4,7 @@ import ( "context" "time" + cerrors "git.loyso.art/frx/kurious/internal/common/errors" "git.loyso.art/frx/kurious/internal/common/nullable" ) @@ -141,20 +142,20 @@ func (NotImplementedOrganizationRepository) ListStats( context.Context, ListOrganizationsParams, ) ([]OrganizationStat, error) { - return nil, ErrNotImplemented + return nil, cerrors.ErrNotImplemented } func (NotImplementedOrganizationRepository) List(context.Context, ListOrganizationsParams) ([]Organization, error) { - return nil, ErrNotImplemented + return nil, cerrors.ErrNotImplemented } func (NotImplementedOrganizationRepository) Get(context.Context, GetOrganizationParams) (Organization, error) { - return Organization{}, ErrNotImplemented + return Organization{}, cerrors.ErrNotImplemented } func (NotImplementedOrganizationRepository) Create(context.Context, CreateOrganizationParams) (Organization, error) { - return Organization{}, ErrNotImplemented + return Organization{}, cerrors.ErrNotImplemented } func (NotImplementedOrganizationRepository) Delete(ctx context.Context, id string) error { - return ErrNotImplemented + return cerrors.ErrNotImplemented } //go:generate mockery --name LearningCategoryRepository @@ -168,11 +169,11 @@ type LearningCategoryRepository interface { type NotImplementedLearningCategory struct{} func (NotImplementedLearningCategory) Upsert(context.Context, LearningCategory) error { - return ErrNotImplemented + return cerrors.ErrNotImplemented } func (NotImplementedLearningCategory) List(context.Context) ([]LearningCategory, error) { - return nil, ErrNotImplemented + return nil, cerrors.ErrNotImplemented } func (NotImplementedLearningCategory) Get(context.Context, string) (LearningCategory, error) { - return LearningCategory{}, ErrNotImplemented + return LearningCategory{}, cerrors.ErrNotImplemented }