aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Services/Interfaces
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-13 11:05:26 +0200
committertranstrike <transtrike@gmail.com>2021-01-13 11:05:26 +0200
commit6deaa6edcd8e347d5ed28ee3389cb8712cc64ea3 (patch)
tree620b8867f3b5f96aa76c0e5e38e985db91498696 /src/DevHive.Services/Interfaces
parent8a18cdf741bed465b4b24626e15370c33365cf11 (diff)
downloadDevHive-6deaa6edcd8e347d5ed28ee3389cb8712cc64ea3.tar
DevHive-6deaa6edcd8e347d5ed28ee3389cb8712cc64ea3.tar.gz
DevHive-6deaa6edcd8e347d5ed28ee3389cb8712cc64ea3.zip
The return of the interfaces
Diffstat (limited to 'src/DevHive.Services/Interfaces')
-rw-r--r--src/DevHive.Services/Interfaces/ILanguageService.cs17
-rw-r--r--src/DevHive.Services/Interfaces/IPostService.cs24
-rw-r--r--src/DevHive.Services/Interfaces/IRoleService.cs17
-rw-r--r--src/DevHive.Services/Interfaces/ITechnologyService.cs17
-rw-r--r--src/DevHive.Services/Interfaces/IUserService.cs31
5 files changed, 106 insertions, 0 deletions
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<bool> CreateLanguage(CreateLanguageServiceModel createLanguageServiceModel);
+
+ Task<LanguageServiceModel> GetLanguageById(Guid id);
+
+ Task<bool> UpdateLanguage(UpdateLanguageServiceModel languageServiceModel);
+
+ Task<bool> 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<bool> CreatePost(CreatePostServiceModel postServiceModel);
+ Task<bool> AddComment(CreateCommentServiceModel commentServiceModel);
+
+ Task<CommentServiceModel> GetCommentById(Guid id);
+ Task<PostServiceModel> GetPostById(Guid id);
+
+ Task<bool> UpdateComment(UpdateCommentServiceModel commentServiceModel);
+ Task<bool> UpdatePost(UpdatePostServiceModel postServiceModel);
+
+ Task<bool> DeleteComment(Guid id);
+ Task<bool> DeletePost(Guid id);
+
+ Task<bool> 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<bool> CreateRole(RoleModel roleServiceModel);
+
+ Task<RoleModel> GetRoleById(Guid id);
+
+ Task<bool> UpdateRole(RoleModel roleServiceModel);
+
+ Task<bool> 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<bool> Create(CreateTechnologyServiceModel technologyServiceModel);
+
+ Task<TechnologyServiceModel> GetTechnologyById(Guid id);
+
+ Task<bool> UpdateTechnology(UpdateTechnologyServiceModel updateTechnologyServiceModel);
+
+ Task<bool> 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<TokenModel> LoginUser(LoginServiceModel loginModel);
+ Task<TokenModel> RegisterUser(RegisterServiceModel registerModel);
+
+ Task<bool> AddFriend(Guid userId, Guid friendId);
+ Task<bool> AddLanguageToUser(Guid userId, LanguageServiceModel languageServiceModel);
+ Task<bool> AddTechnologyToUser(Guid userId, TechnologyServiceModel technologyServiceModel);
+
+ Task<UserServiceModel> GetFriendById(Guid friendId);
+ Task<UserServiceModel> GetUserById(Guid id);
+
+ Task<UserServiceModel> UpdateUser(UpdateUserServiceModel updateModel);
+
+ Task DeleteUser(Guid id);
+ Task<bool> RemoveFriend(Guid userId, Guid friendId);
+ Task<bool> RemoveLanguageFromUser(Guid userId, LanguageServiceModel languageServiceModel);
+ Task<bool> RemoveTechnologyFromUser(Guid userId, TechnologyServiceModel technologyServiceModel);
+
+ Task<bool> ValidJWT(Guid id, string rawTokenData);
+ }
+} \ No newline at end of file