Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddCookie(c context.Context, cookie *model.Cookie, now time.Time) (affected int64, err error)
- func (d *Dao) AddOldCookie(c context.Context, cookie *model.OldCookie) (affected int64, err error)
- func (d *Dao) AddOldToken(c context.Context, token *model.OldToken, t time.Time) (affected int64, err error)
- func (d *Dao) AddRefresh(c context.Context, refresh *model.Refresh, t time.Time) (affected int64, err error)
- func (d *Dao) AddToken(c context.Context, token *model.Token, t time.Time) (affected int64, err error)
- func (d *Dao) Close()
- func (d *Dao) CookieCache(c context.Context, session string) (res *model.CookieProto, err error)
- func (d *Dao) DelCookie(c context.Context, session []byte, t time.Time) (affected int64, err error)
- func (d *Dao) DelCookieByMid(c context.Context, mid int64, t time.Time) (affected int64, err error)
- func (d *Dao) DelCookieCache(c context.Context, session string) (err error)
- func (d *Dao) DelOldCookie(c context.Context, session string, mid int64) (affected int64, err error)
- func (d *Dao) DelOldCookieByMid(c context.Context, mid int64) (affected int64, err error)
- func (d *Dao) DelOldToken(c context.Context, token string, t time.Time) (affected int64, err error)
- func (d *Dao) DelOldTokenByMid(c context.Context, mid int64, t time.Time) (affected int64, err error)
- func (d *Dao) DelRefresh(c context.Context, refresh []byte, t time.Time) (affected int64, err error)
- func (d *Dao) DelRefreshByMid(c context.Context, mid int64, t time.Time) (affected int64, err error)
- func (d *Dao) DelToken(c context.Context, token []byte, t time.Time) (affected int64, err error)
- func (d *Dao) DelTokenByMid(c context.Context, mid int64, t time.Time) (affected int64, err error)
- func (d *Dao) DelTokenCache(c context.Context, token string) (err error)
- func (d *Dao) GetCookie(c context.Context, session []byte, t time.Time) (res *model.Cookie, err error)
- func (d *Dao) GetRefresh(c context.Context, refresh []byte, t time.Time) (res *model.Refresh, err error)
- func (d *Dao) GetToken(c context.Context, token []byte, t time.Time) (res *model.Token, err error)
- func (d *Dao) GetUserBaseByUserID(c context.Context, userID string) (res int64, err error)
- func (d *Dao) GetUserByMid(c context.Context, mid int64) (res *model.User, err error)
- func (d *Dao) GetUserMailByMail(c context.Context, mail []byte) (res int64, err error)
- func (d *Dao) GetUserTelByTel(c context.Context, tel []byte) (res int64, err error)
- func (d *Dao) LoadSecret(c context.Context) (res []*model.Secret, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) SetCookieCache(c context.Context, res *model.CookieProto) (err error)
- func (d *Dao) SetRefreshCache(c context.Context, refresh *model.RefreshProto) (err error)
- func (d *Dao) SetTokenCache(c context.Context, res *model.TokenProto) (err error)
- func (d *Dao) TokenCache(c context.Context, token string) (res *model.TokenProto, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao
func (*Dao) AddCookie ¶
func (d *Dao) AddCookie(c context.Context, cookie *model.Cookie, now time.Time) (affected int64, err error)
AddCookie add cookie
func (*Dao) AddOldCookie ¶
AddOldCookie add old cookie
func (*Dao) AddOldToken ¶
func (d *Dao) AddOldToken(c context.Context, token *model.OldToken, t time.Time) (affected int64, err error)
AddOldToken add old token
func (*Dao) AddRefresh ¶
func (d *Dao) AddRefresh(c context.Context, refresh *model.Refresh, t time.Time) (affected int64, err error)
AddRefresh add refresh
func (*Dao) AddToken ¶
func (d *Dao) AddToken(c context.Context, token *model.Token, t time.Time) (affected int64, err error)
AddToken add token
func (*Dao) CookieCache ¶
CookieCache get cookie info from cache
func (*Dao) DelCookieByMid ¶
DelCookieByMid del cookie by mid
func (*Dao) DelCookieCache ¶
DelCookieCache delete cookie cache
func (*Dao) DelOldCookie ¶
func (d *Dao) DelOldCookie(c context.Context, session string, mid int64) (affected int64, err error)
DelOldCookie del old cookie by session_data
func (*Dao) DelOldCookieByMid ¶
DelOldCookieByMid del old cookie by mid
func (*Dao) DelOldToken ¶
DelOldToken del old token by access_token
func (*Dao) DelOldTokenByMid ¶
func (d *Dao) DelOldTokenByMid(c context.Context, mid int64, t time.Time) (affected int64, err error)
DelOldTokenByMid del old token by mid
func (*Dao) DelRefresh ¶
func (d *Dao) DelRefresh(c context.Context, refresh []byte, t time.Time) (affected int64, err error)
DelRefresh del refresh
func (*Dao) DelRefreshByMid ¶
func (d *Dao) DelRefreshByMid(c context.Context, mid int64, t time.Time) (affected int64, err error)
DelRefreshByMid del refresh by mid
func (*Dao) DelTokenByMid ¶
DelTokenByMid del token by mid
func (*Dao) DelTokenCache ¶
DelTokenCache delete token cache
func (*Dao) GetCookie ¶
func (d *Dao) GetCookie(c context.Context, session []byte, t time.Time) (res *model.Cookie, err error)
GetCookie get cookie by session
func (*Dao) GetRefresh ¶
func (d *Dao) GetRefresh(c context.Context, refresh []byte, t time.Time) (res *model.Refresh, err error)
GetRefresh get refresh by refresh_token
func (*Dao) GetUserBaseByUserID ¶
GetUserBaseByUserID get user base by userID
func (*Dao) GetUserByMid ¶
GetUserByMid get user by userID
func (*Dao) GetUserMailByMail ¶
GetUserMailByMail get user mail by mail
func (*Dao) GetUserTelByTel ¶
GetUserTelByTel get user tel by tel
func (*Dao) LoadSecret ¶
LoadSecret load secret
func (*Dao) SetCookieCache ¶
SetCookieCache set cookie info to cache
func (*Dao) SetRefreshCache ¶
SetRefreshCache set refresh token to cache .
func (*Dao) SetTokenCache ¶
SetTokenCache set token to cache
func (*Dao) TokenCache ¶
TokenCache get token info from cache