logic

package
v0.0.0-...-0d86eac Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepository

type UserRepository interface {
	InitialRepository(ctx context.Context) error

	CreateUser(ctx context.Context, user *model.User) error
	DeleteUser(ctx context.Context, user *model.User) error
	UpdateUser(ctx context.Context, user *model.User) error

	GetUserByID(ctx context.Context, id string) (*model.User, error)
	GetUserByEmail(ctx context.Context, email string) (*model.User, error)
	GetAllUsers(ctx context.Context) ([]*model.User, error)
}

type UserService

type UserService interface {
	Login(ctx context.Context, username, password string) (*model.User, error)
	Register(ctx context.Context, email string, password string) (*model.User, error)

	ActivateUser(ctx context.Context, userID string, activationCode string) error
	ForgotPassword(ctx context.Context, email string) error
	ResetPassword(ctx context.Context, userID string, passwordCode string, newPass string) error

	UpdatePassword(ctx context.Context, userID string, currentPass string, newPass string) error

	DeleteUser(ctx context.Context, id string) error

	GetAllUsers(ctx context.Context) ([]*model.User, error)
	GetUserByID(ctx context.Context, id string) (*model.User, error)
	GetUserByEmail(ctx context.Context, email string) (*model.User, error)
}

Jump to

Keyboard shortcuts

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