services

package
v0.0.0-...-d9ff776 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	RegisterUser(username, email, password string) error
	AuthenticateUser(email, password string) (*models.User, error)
}

func NewAuthService

func NewAuthService(authRepo repository.AuthRepository) AuthService

type PostService

type PostService interface {
	CreatePost(post models.Post) error
	FetchPost(id int) (*models.Post, error)
	FetchAllPost() (*[]models.Post, error)
	UpdatePost(id int, post models.Post) error
	DeletePost(id int) error
}

func NewPostService

func NewPostService(postRepo repository.PostRepository) PostService

type UserService

type UserService interface {
	FetchUser(id int) (*models.UpdateProfileInput, error)
	FetchAllUser() (*[]models.UpdateProfileInput, error)
	UpdateProfile(id int, user models.UpdateProfileInput) error
}

func NewUserService

func NewUserService(userRepo repository.UserRepository) UserService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL