service

package
v0.0.0-...-7e06a17 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionsService

type SessionsService interface {
	Login(rw http.ResponseWriter, r *http.Request)
	Logout(rw http.ResponseWriter, r *http.Request)
	IsAuthenticated(rw http.ResponseWriter, r *http.Request) bool
}

SessionsService implements sessions management.

func NewSessionsService

func NewSessionsService(ssns *sessions.Sessions) SessionsService

NewSessionsService creates a new instance of SessionsService.

type UserService

type UserService interface {
	// ValidateUserPassword validates user authentication.
	ValidateUserPassword(ctx context.Context, email, password string) error
	// CreateUser creates a new user in the application.
	CreateUser(ctx context.Context, email, password string) error
}

UserService implements User handling use case.

func NewUserService

func NewUserService(repository repository.UserRepository) UserService

NewUserService creates an new UserService.

Jump to

Keyboard shortcuts

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