logins

package
v0.0.0-...-24ccd8c Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 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 JwtToken

type JwtToken struct {
	Token        string
	RefreshToken string
	Status       string
	CreatedAt    time.Time
	ExpiredAt    time.Time
	UpdatedAt    time.Time
}

JwtToken session

type Login

type Login struct {
	Email    string
	Password string
}

Login user

type LoginRepository

type LoginRepository interface {
	LoginUser(ctx context.Context, login *Login) (*JwtToken, error)
}

LoginRepository to authentication and authorization methods

type LoginService

type LoginService interface {
	LoginUser(ctx context.Context, login *Login) (*JwtToken, error)
}

LoginService authentication and authorization services

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service struct handles authentication and authorization business logic task.

func NewService

func NewService(repository LoginRepository) *Service

NewService creates a new service struct

func (*Service) LoginUser

func (svc *Service) LoginUser(ctx context.Context, login *Login) (*JwtToken, error)

LoginUser user method

Jump to

Keyboard shortcuts

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