app

package
v0.0.0-...-f2344d4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 6 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 {
	SignIn(credentials *domain.Credentials) (string, error)
}

AuthService is an interface that defines the opearations related to authentication

func NewAuthService

func NewAuthService(us UserService) (AuthService, error)

NewAuthService creates a new AuthService implementation

type Services

type Services struct {
	User UserService
	Auth AuthService
}

Services is a struct containing all of the services nedded by the API

func InitServices

func InitServices(cfg *conf.Config) (*Services, error)

InitServices returns a Services struct with all the needed services initialized

type UserService

type UserService interface {
	FindByID(ID uuid.UUID) (*domain.User, error)
	FindByUsername(username string) (*domain.User, error)
	CreateUser(user *domain.Credentials) (*domain.User, error)
	CheckEmail(email string) bool
	CheckUsername(username string) bool
}

UserService is an interface that defines the opearations that you can do with the User domain entity

func NewUserService

func NewUserService(conf *conf.Config) (UserService, error)

NewUserService creates a new UserService implementation

Jump to

Keyboard shortcuts

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