service

package
v0.0.0-...-9841d36 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 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 SessionService

type SessionService struct {
	Repository domain.SessionRepository
	Logger     *log.Logger
	// contains filtered or unexported fields
}

func NewSessionService

func NewSessionService(repository domain.SessionRepository, options map[string]interface{}) (*SessionService, error)

func (*SessionService) Start

func (s *SessionService) Start(payload domain.SessionPayload) (*domain.Session, error)

func (*SessionService) Terminate

func (s *SessionService) Terminate(id string) error

func (*SessionService) Valid

func (s *SessionService) Valid(id string) (*domain.Session, error)

type UserService

type UserService struct {
	Repository domain.Repository
	Logger     *log.Logger
}

func (UserService) CreateUser

func (s UserService) CreateUser(payload domain.UserPayload) (string, error)

func (UserService) GetByCredentials

func (s UserService) GetByCredentials(credentials domain.Credentials) (*domain.User, error)

func (UserService) GetByID

func (s UserService) GetByID(id string) (*domain.User, error)

func (UserService) LockUser

func (s UserService) LockUser(id string, payload domain.LockPayload) (*domain.User, error)

func (UserService) Login

func (s UserService) Login(payload domain.LoginPayload) (*domain.User, error)

func (UserService) ResetPassword

func (s UserService) ResetPassword(id, code, newPassword string) error

func (UserService) SetPassword

func (s UserService) SetPassword(id, newPassword string) error

func (UserService) UnlockUser

func (s UserService) UnlockUser(id string, payload domain.LockPayload) error

Jump to

Keyboard shortcuts

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