Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostService ¶
type PostService interface { AddPost(newPost repository.Post, authorName string) (repository.Post, error) UpdatePost(updatedPost repository.Post) (repository.Post, error) DeletePost(id string) error GetPost(id string) (repository.Post, error) GetPosts() ([]repository.Post, int, error) GetPostsPage(page int) ([]repository.Post, int, error) }
PostService interface. Defines post-related business logic.
func CreatePostService ¶
func CreatePostService(cont container.Container) PostService
CreatePostService instantiates the postService using the application container.
type UserService ¶
type UserService interface { AuthenticateUser(userID string, password string) (string, error) CheckUserPassword(userID string, password string) bool GetUser(userID string) (repository.User, error) GetUsers() ([]repository.User, int, error) GetUsersPage(page int) ([]repository.User, int, error) RegisterFirstUser() error RegisterUser(userID string, password string) (repository.User, error) UpdateUser(userID string, oldPassword string, newPassword string) (repository.User, error) DeleteUser(userID string) error }
UserService interface. Defines user-related business logic.
func CreateUserService ¶
func CreateUserService(cont container.Container) UserService
CreateUserService instantiates the userService using the application container.
Click to show internal directories.
Click to hide internal directories.