Versions in this module Expand all Collapse all v0 v0.1.3 Aug 10, 2023 v0.1.2 Jul 12, 2023 v0.1.1 Jul 12, 2023 v0.1.0 Jul 12, 2023 Changes in this version + var EXP_PATTERN = time.Hour + type Auth struct + Client *sqlx.DB + func New(client *sqlx.DB) *Auth + func (y *Auth) Create(u AuthCreateRequest) (uid string, devm string, id int, err error) + func (y *Auth) EnsureSingleSession(id int) + func (y *Auth) FindAll(page, limit int) (res []AuthResponse, err error) + func (y *Auth) FindById(id int) (res AuthResponse, err error) + func (y *Auth) FindByToken(token string) (res AuthAndUserResponse, err error) + func (y *Auth) FindByUserId(id int) (output *AuthFindStruct, err error) + func (y *Auth) FindByUserIdAndActive(id int) (output []AuthResponse, err error) + func (y *Auth) FindByUserIdAndActiveWithUserData(id int) (output *AuthFindStruct, err error) + func (y *Auth) UpdateStatus(id int, status bool) (err error) + type AuthAndUserResponse struct + Exp int64 + ID int + Iat int64 + Status bool + Token string + UserId int + type AuthCreateRequest struct + Exp int64 + Token string + UserId int + type AuthFindStruct struct + func (y *AuthFindStruct) First() AuthAndUserResponse + func (y *AuthFindStruct) Get() []AuthAndUserResponse + func (y *AuthFindStruct) Last() AuthAndUserResponse + type AuthResponse struct + Exp int64 + ID int + Iat int64 + Status bool + Token string + UserId int