class Laspatule::Repositories::DB::Users
- Laspatule::Repositories::DB::Users
- Reference
- Object
Included Modules
Defined in:
laspatule/repositories/db/users.crConstructors
Instance Method Summary
-
#add_access_token(user_id : Int32, access_token : String) : Nil
Adds a new access token for the user user_id.
-
#create(user : Models::CreateUser) : Int32
Creates a new user
-
#get_by_access_token(access_token : String) : Models::User
Gets a user by its access token.
-
#get_by_email(email : String) : Models::UserWithPassword
Gets a user by its email.
-
#get_by_id(id : Int32) : Models::User
Gets a user by its id.
-
#get_by_renew_token(renew_token : String) : Models::User
Gets a user by its renew token.
-
#set_renew_token(user_id : Int32, token : String) : Nil
Sets the renew token for the user user_id.
Instance methods inherited from module Laspatule::Repositories::Users
add_access_token(user_id : Int32, access_token : String) : Nil
add_access_token,
create(user : Models::CreateUser) : Int32
create,
get_by_access_token(access_token : String) : Models::User
get_by_access_token,
get_by_email(email : String) : Models::UserWithPassword
get_by_email,
get_by_id(id : Int32) : Models::User
get_by_id,
get_by_renew_token(renew_token : String) : Models::User
get_by_renew_token,
set_renew_token(user_id : Int32, token : String) : Nil
set_renew_token
Constructor Detail
Instance Method Detail
def add_access_token(user_id : Int32, access_token : String) : Nil
#
Description copied from module Laspatule::Repositories::Users
Adds a new access token for the user user_id.
def create(user : Models::CreateUser) : Int32
#
Description copied from module Laspatule::Repositories::Users
Creates a new user
def get_by_access_token(access_token : String) : Models::User
#
Description copied from module Laspatule::Repositories::Users
Gets a user by its access token.
It raises an error UserNotFoundError
if teh user is not found.
def get_by_email(email : String) : Models::UserWithPassword
#
Description copied from module Laspatule::Repositories::Users
Gets a user by its email.
It raises an error UserNotFoundError
if the user is not found.
def get_by_id(id : Int32) : Models::User
#
Description copied from module Laspatule::Repositories::Users
Gets a user by its id.
It raises an error UserNotFoundError
if the user is not found.
def get_by_renew_token(renew_token : String) : Models::User
#
Description copied from module Laspatule::Repositories::Users
Gets a user by its renew token.
It raises an error UserNotFoundError
if the user is not found.
def set_renew_token(user_id : Int32, token : String) : Nil
#
Description copied from module Laspatule::Repositories::Users
Sets the renew token for the user user_id.