Documentation
¶
Index ¶
Constants ¶
View Source
const ErrCodeEmailAlreadyExists = "email_exists"
View Source
const ErrCodeEmailEmpty = "email_empty"
View Source
const ErrCodeEmailTooLong = "email_too_long"
View Source
const ErrCodeFirstnameTooLong = "firstname_too_long"
View Source
const ErrCodeLastnameTooLong = "lastname_too_long"
View Source
const ErrCodePasswordEmpty = "password_empty"
View Source
const ErrCodePasswordTooLong = "password_too_long"
View Source
const ErrCodePasswordTooShort = "password_too_short"
View Source
const ErrCodeUserNotFound = "user_not_found"
View Source
const ErrCodeUsernameAlreadyExists = "username_exists"
View Source
const ErrCodeUsernameOrPasswordIncorrect = "username_or_password_incorrect"
View Source
const ErrCodeUsernameReserved = "username_reserved"
View Source
const ErrCodeUsernameTooLong = "username_too_long"
View Source
const ErrCodeUsernameTooShort = "username_too_short"
Variables ¶
View Source
var ErrEmailAlreadyExists = srvcerror.New( ErrCodeEmailAlreadyExists, "epasts jau eksistē", ).SetHttpStatusCode(http.StatusConflict)
View Source
var ErrUserNotFound = srvcerror.New( ErrCodeUserNotFound, "lietotājs netika atrasts", ).SetHttpStatusCode(http.StatusNotFound)
Functions ¶
func NewUserService ¶
Types ¶
type CreateUserParams ¶
type UserService ¶
type UserService interface {
GetUserByUsername(ctx context.Context, username string) (User, srvcerror.E)
GetUserByUUID(ctx context.Context, uuid uuid.UUID) (User, srvcerror.E)
GetUsernames(ctx context.Context, uuids []uuid.UUID) ([]string, srvcerror.E)
Login(ctx context.Context, username string, password string) (*User, srvcerror.E)
CreateUser(ctx context.Context, user CreateUserParams) (*User, srvcerror.E)
}
Click to show internal directories.
Click to hide internal directories.