service

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MPL-2.0 Imports: 10 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 interface {
	Login(context.Context, *entity.User) (string, error)
}

AuthService interface

func NewAuthService

func NewAuthService() AuthService

NewAuthService func

type JWTService

type JWTService interface {
	Create(*entity.User) (*entity.Token, error)
	GetUser(context.Context, string) (*entity.User, error)
}

JWTService interface

func NewJWTService

func NewJWTService() JWTService

NewJWTService func

type Service

type Service struct {
	Auth  AuthService
	User  UserService
	Token TokenService
}

Service struct

func NewService

func NewService() (service *Service)

NewService func

type TokenService

type TokenService interface {
	Create(*entity.Token) (*entity.Token, error)
	FindByUserID(uuid.UUID) (*entity.Token, error)
	FindByToken(string) (*entity.Token, error)
}

TokenService interface

func NewTokenService

func NewTokenService() TokenService

NewTokenService func

type UserService

type UserService interface {
	All(context.Context) ([]*entity.User, error)
	Create(context.Context, *entity.User) (*entity.User, error)
	FindByID(context.Context, uuid.UUID) (*entity.User, error)
	FindByEmail(context.Context, string) (*entity.User, error)
	ChangePassword(context.Context, uuid.UUID, string) (*entity.User, error)
}

UserService interface

func NewUserService

func NewUserService() UserService

NewUserService func

Jump to

Keyboard shortcuts

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