From 6deaa6edcd8e347d5ed28ee3389cb8712cc64ea3 Mon Sep 17 00:00:00 2001 From: transtrike Date: Wed, 13 Jan 2021 11:05:26 +0200 Subject: The return of the interfaces --- .../Interfaces/ILanguageService.cs | 17 ++++++++++++ src/DevHive.Services/Interfaces/IPostService.cs | 24 +++++++++++++++++ src/DevHive.Services/Interfaces/IRoleService.cs | 17 ++++++++++++ .../Interfaces/ITechnologyService.cs | 17 ++++++++++++ src/DevHive.Services/Interfaces/IUserService.cs | 31 ++++++++++++++++++++++ 5 files changed, 106 insertions(+) create mode 100644 src/DevHive.Services/Interfaces/ILanguageService.cs create mode 100644 src/DevHive.Services/Interfaces/IPostService.cs create mode 100644 src/DevHive.Services/Interfaces/IRoleService.cs create mode 100644 src/DevHive.Services/Interfaces/ITechnologyService.cs create mode 100644 src/DevHive.Services/Interfaces/IUserService.cs (limited to 'src/DevHive.Services/Interfaces') diff --git a/src/DevHive.Services/Interfaces/ILanguageService.cs b/src/DevHive.Services/Interfaces/ILanguageService.cs new file mode 100644 index 0000000..f62bce7 --- /dev/null +++ b/src/DevHive.Services/Interfaces/ILanguageService.cs @@ -0,0 +1,17 @@ +using System; +using System.Threading.Tasks; +using DevHive.Services.Models.Language; + +namespace DevHive.Services.Interfaces +{ + public interface ILanguageService + { + Task CreateLanguage(CreateLanguageServiceModel createLanguageServiceModel); + + Task GetLanguageById(Guid id); + + Task UpdateLanguage(UpdateLanguageServiceModel languageServiceModel); + + Task DeleteLanguage(Guid id); + } +} \ No newline at end of file diff --git a/src/DevHive.Services/Interfaces/IPostService.cs b/src/DevHive.Services/Interfaces/IPostService.cs new file mode 100644 index 0000000..9cb21ed --- /dev/null +++ b/src/DevHive.Services/Interfaces/IPostService.cs @@ -0,0 +1,24 @@ +using System; +using System.Threading.Tasks; +using DevHive.Services.Models.Post.Comment; +using DevHive.Services.Models.Post.Post; + +namespace DevHive.Services.Interfaces +{ + public interface IPostService + { + Task CreatePost(CreatePostServiceModel postServiceModel); + Task AddComment(CreateCommentServiceModel commentServiceModel); + + Task GetCommentById(Guid id); + Task GetPostById(Guid id); + + Task UpdateComment(UpdateCommentServiceModel commentServiceModel); + Task UpdatePost(UpdatePostServiceModel postServiceModel); + + Task DeleteComment(Guid id); + Task DeletePost(Guid id); + + Task ValidateJwtForComment(Guid commentId, string rawTokenData); + } +} \ No newline at end of file diff --git a/src/DevHive.Services/Interfaces/IRoleService.cs b/src/DevHive.Services/Interfaces/IRoleService.cs new file mode 100644 index 0000000..3bf236c --- /dev/null +++ b/src/DevHive.Services/Interfaces/IRoleService.cs @@ -0,0 +1,17 @@ +using System; +using System.Threading.Tasks; +using DevHive.Common.Models.Identity; + +namespace DevHive.Services.Interfaces +{ + public interface IRoleService + { + Task CreateRole(RoleModel roleServiceModel); + + Task GetRoleById(Guid id); + + Task UpdateRole(RoleModel roleServiceModel); + + Task DeleteRole(Guid id); + } +} \ No newline at end of file diff --git a/src/DevHive.Services/Interfaces/ITechnologyService.cs b/src/DevHive.Services/Interfaces/ITechnologyService.cs new file mode 100644 index 0000000..33032e2 --- /dev/null +++ b/src/DevHive.Services/Interfaces/ITechnologyService.cs @@ -0,0 +1,17 @@ +using System; +using System.Threading.Tasks; +using DevHive.Services.Models.Technology; + +namespace DevHive.Services.Interfaces +{ + public interface ITechnologyService + { + Task Create(CreateTechnologyServiceModel technologyServiceModel); + + Task GetTechnologyById(Guid id); + + Task UpdateTechnology(UpdateTechnologyServiceModel updateTechnologyServiceModel); + + Task DeleteTechnology(Guid id); + } +} \ No newline at end of file diff --git a/src/DevHive.Services/Interfaces/IUserService.cs b/src/DevHive.Services/Interfaces/IUserService.cs new file mode 100644 index 0000000..ba53563 --- /dev/null +++ b/src/DevHive.Services/Interfaces/IUserService.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using DevHive.Common.Models.Identity; +using DevHive.Services.Models.Identity.User; +using DevHive.Services.Models.Language; +using DevHive.Services.Models.Technology; + +namespace DevHive.Services.Interfaces +{ + public interface IUserService + { + Task LoginUser(LoginServiceModel loginModel); + Task RegisterUser(RegisterServiceModel registerModel); + + Task AddFriend(Guid userId, Guid friendId); + Task AddLanguageToUser(Guid userId, LanguageServiceModel languageServiceModel); + Task AddTechnologyToUser(Guid userId, TechnologyServiceModel technologyServiceModel); + + Task GetFriendById(Guid friendId); + Task GetUserById(Guid id); + + Task UpdateUser(UpdateUserServiceModel updateModel); + + Task DeleteUser(Guid id); + Task RemoveFriend(Guid userId, Guid friendId); + Task RemoveLanguageFromUser(Guid userId, LanguageServiceModel languageServiceModel); + Task RemoveTechnologyFromUser(Guid userId, TechnologyServiceModel technologyServiceModel); + + Task ValidJWT(Guid id, string rawTokenData); + } +} \ No newline at end of file -- cgit v1.2.3