service

package
v0.0.0-...-7f3b7f6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(userRepo repository.UserRepository) *authService

Types

type AuthService

type AuthService interface {
	Login(ctx context.Context, email, password string) (model.User, error)
	GenerateToken(userID int64) (string, error)
	ValidateToken(token string) (*jwt.Token, error)
}

type UserService

type UserService interface {
	Get(ctx context.Context) ([]model.User, error)
	Save(ctx context.Context, user *model.User) (int64, error)
	Update(ctx context.Context, id int64, user *model.User) (int64, error)
	Delete(ctx context.Context, id int64) (int64, error)
}

func NewServiceRepository

func NewServiceRepository(uRepo repository.UserRepository, t time.Duration) UserService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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