Documentation
¶
Index ¶
- func GenerateProfiles(userRepo contract.IUserRepository, pass string, count int, concurrency int) error
- func GetValidSignupDto(pass string) model.SignupDto
- func NewAuthService(cityRepo contract.ICityRepository, userRepo contract.IUserRepository, ...) contract.IAuthService
- func NewCityService(cityRepo contract.ICityRepository) contract.ICityService
- func NewUserService(userRepo contract.IUserRepository, authService contract.IAuthService, ...) contract.IUserService
- type AuthService
- func (as *AuthService) CleanSessions(ctx context.Context, lifeDurationThreshold time.Duration)
- func (as *AuthService) GetUserBySession(ctx context.Context, sessionId model.Session) (*model.User, error)
- func (as *AuthService) Login(ctx context.Context, credentials model.Credentials) (model.Session, *model.User, error)
- func (as *AuthService) Logout(ctx context.Context, sessionId model.Session) error
- func (as *AuthService) SignUp(ctx context.Context, dto model.SignupDto) (model.Session, *model.User, error)
- type CityService
- type UserService
- func (us *UserService) AddFriend(ctx context.Context, sessionId model.Session, friendId model.IntId) error
- func (us *UserService) GetById(ctx context.Context, sessionId model.Session, id model.IntId) (*model.User, error)
- func (us *UserService) GetByIds(ctx context.Context, sessionId model.Session, ids []model.IntId) ([]*model.User, error)
- func (us *UserService) GetFriends(ctx context.Context, sessionId model.Session, userId model.IntId) ([]*model.DisplayUserDto, error)
- func (us *UserService) GetRecommendations(ctx context.Context, sessionId model.Session) ([]*model.DisplayUserDto, error)
- func (us *UserService) RemoveFriend(ctx context.Context, sessionId model.Session, friendId model.IntId) error
- func (us *UserService) SaveUser(ctx context.Context, sessionId model.Session, user *model.User) (*model.User, error)
- func (us *UserService) Search(ctx context.Context, sessionId model.Session, searchDto model.SearchDto) ([]*model.DisplayUserDto, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateProfiles ¶
func GetValidSignupDto ¶
func NewAuthService ¶
func NewAuthService(cityRepo contract.ICityRepository, userRepo contract.IUserRepository, validator *validator2.Validator) contract.IAuthService
func NewCityService ¶
func NewCityService(cityRepo contract.ICityRepository) contract.ICityService
func NewUserService ¶
func NewUserService(userRepo contract.IUserRepository, authService contract.IAuthService, validator *validator.Validator) contract.IUserService
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func (*AuthService) CleanSessions ¶
func (as *AuthService) CleanSessions(ctx context.Context, lifeDurationThreshold time.Duration)
func (*AuthService) GetUserBySession ¶
func (*AuthService) Login ¶
func (as *AuthService) Login(ctx context.Context, credentials model.Credentials) (model.Session, *model.User, error)
type CityService ¶
type CityService struct {
// contains filtered or unexported fields
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) GetFriends ¶
func (us *UserService) GetFriends(ctx context.Context, sessionId model.Session, userId model.IntId) ([]*model.DisplayUserDto, error)
func (*UserService) GetRecommendations ¶
func (us *UserService) GetRecommendations(ctx context.Context, sessionId model.Session) ([]*model.DisplayUserDto, error)
func (*UserService) RemoveFriend ¶
Click to show internal directories.
Click to hide internal directories.