service

package
v0.0.0-...-bef6861 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

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

func NewAuthService

func NewAuthService(repo repository.Authorization) *AuthService

func (*AuthService) CreateUser

func (s *AuthService) CreateUser(user domain.User) (int64, error)

func (*AuthService) GenerateToken

func (s *AuthService) GenerateToken(email, password string) (int64, string, error)

func (*AuthService) GetUserName

func (s *AuthService) GetUserName(id int64) (string, error)

func (*AuthService) ParseToken

func (s *AuthService) ParseToken(accessToken string) (int64, error)

type Authorization

type Authorization interface {
	CreateUser(user domain.User) (int64, error)
	GenerateToken(email, password string) (int64, string, error)
	ParseToken(token string) (int64, error)
	GetUserName(id int64) (string, error)
}

type Service

type Service struct {
	Authorization
}

func NewService

func NewService(repos *repository.Repository) *Service

type Verification

type Verification interface {
	GetVerificationCode(id int64) (int, error)
	SendCodeToBot(id int64, discord string) error
}

Directories

Path Synopsis
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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