service

package
v0.0.0-...-afd1d67 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 12 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 {
	GetUserByID(ctx context.Context, id string) (*model.User, error)
	GetUserByEmail(ctx context.Context, email string) (*model.User, error)
	AuthenticateUser(ctx context.Context, email, password string) (string, error)
	RefreshToken(ctx context.Context, userId, token string) (string, error)
	RefreshUserSnapshots(ctx context.Context, userId string) error

	GetUserSnapshot(ctx context.Context, userId, token string) (*model.UserSnapshot, error)
	VerifyJWT(ctx context.Context, token string) (*model.UserSnapshot, error)

	DeleteTokensByUserID(ctx context.Context, userId string) error
}

func NewAuthService

func NewAuthService(repo repository.UserRepository, tokenStore cache.TokenStore) AuthService

type UserService

type UserService interface {
	CreateUser(ctx context.Context, email string, password string) error
	GetUserByID(ctx context.Context, id string) (*model.User, error)
	GetUserByEmail(ctx context.Context, email string) (*model.User, error)
}

func NewUserService

func NewUserService(urepo repository.UserRepository) UserService

Jump to

Keyboard shortcuts

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