services

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostService added in v1.0.1

type PostService interface {
	AddPost(newPost *types.Post) (types.Post, error)
	GetPost(id string) (types.Post, error)
	GetPosts() ([]types.Post, error)
}

PostService interface. Defines post-related business logic.

func CreatePostService added in v1.0.1

func CreatePostService(cont container.Container) PostService

CreatePostService instantiates the postService using the application container.

type UserService added in v1.0.1

type UserService interface {
	AuthenticateUser(user *types.UserLoginInput) (string, error)
	CheckUserPassword(user *types.UserLoginInput) bool
	GetUser(userName string) (types.User, error)
	GetUsers() ([]types.User, error)
	RegisterFirstUser() error
	RegisterUser(user *types.UserLoginInput) (types.User, error)
	UpdateUser(oldUser *types.UserLoginInput, newUser *types.UserLoginInput) (types.User, error)
}

UserService interface. Defines user-related business logic.

func CreateUserService added in v1.0.1

func CreateUserService(cont container.Container) UserService

CreateUserService instantiates the userService using the application container.

Jump to

Keyboard shortcuts

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