Documentation ¶
Index ¶
- type BindUser
- type CacheAuthData
- func (c *CacheAuthData) ApiId() int32
- func (c *CacheAuthData) AppVersion() string
- func (c *CacheAuthData) AuthKeyId() int64
- func (c *CacheAuthData) ClientIp() string
- func (c *CacheAuthData) DateActivated() int64
- func (c *CacheAuthData) DateCreated() int64
- func (c *CacheAuthData) DeviceModel() string
- func (c *CacheAuthData) Hash() int64
- func (c *CacheAuthData) LangCode() string
- func (c *CacheAuthData) LangPack() string
- func (c *CacheAuthData) Layer() int32
- func (c *CacheAuthData) Params() string
- func (c *CacheAuthData) Proxy() string
- func (c *CacheAuthData) SystemLangCode() string
- func (c *CacheAuthData) SystemVersion() string
- func (c *CacheAuthData) UserId() int64
- type Dao
- func (d *Dao) BindAuthKeyUser(ctx context.Context, authKeyId int64, userId int64) int64
- func (d *Dao) GetApiLayer(ctx context.Context, authKeyId int64) int32
- func (d *Dao) GetAuthKeyUserId(ctx context.Context, authKeyId int64) int64
- func (d *Dao) GetAuthorization(ctx context.Context, authKeyId int64) (*mtproto.Authorization, error)
- func (d *Dao) GetAuthorizations(ctx context.Context, userId int64, excludeAuthKeyId int64) (authorizations []*mtproto.Authorization)
- func (d *Dao) GetCacheAuthData(ctx context.Context, authKeyId int64) (*CacheAuthData, error)
- func (d *Dao) GetClient(ctx context.Context, authKeyId int64) string
- func (d *Dao) GetFutureSalts(ctx context.Context, authKeyId int64, num int32) (*mtproto.TLFutureSalts, error)
- func (d *Dao) GetLangCode(ctx context.Context, authKeyId int64) string
- func (d *Dao) GetLangPack(ctx context.Context, authKeyId int64) string
- func (d *Dao) GetPermAuthKeyId(ctx context.Context, authKeyId int64) int64
- func (d *Dao) GetPushSessionId(ctx context.Context, userId int64, authKeyId int64, tokenType int32) int64
- func (d *Dao) GetSalts(ctx context.Context, keyId int64) (salts []*mtproto.TLFutureSalt, err error)
- func (d *Dao) PutSaltCache(ctx context.Context, keyId int64, salt *mtproto.TLFutureSalt) error
- func (d *Dao) PutSalts(ctx context.Context, keyId int64, salts []*mtproto.TLFutureSalt) (err error)
- func (d *Dao) QueryAuthKeyV2(ctx context.Context, authKeyId int64) (*mtproto.AuthKeyInfo, error)
- func (d *Dao) ResetAuthorization(ctx context.Context, userId int64, authKeyId, hash int64) []int64
- func (d *Dao) SetAuthKeyV2(ctx context.Context, authKey *mtproto.AuthKeyInfo, expiredIn int32) (err error)
- func (d *Dao) SetClientSessionInfo(ctx context.Context, session *authsession.ClientSession) bool
- func (d *Dao) UnbindAuthUser(ctx context.Context, authKeyId int64, userId int64) bool
- func (d *Dao) UnsafeBindKeyIdV2(ctx context.Context, keyId int64, bindType int32, bindKeyId int64) (err error)
- type Mysql
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheAuthData ¶ added in v0.87.2
type CacheAuthData struct { Client *authsession.ClientSession `json:"client"` BindUser *BindUser `json:"bind_user,omitempty"` }
func (*CacheAuthData) ApiId ¶ added in v0.87.2
func (c *CacheAuthData) ApiId() int32
func (*CacheAuthData) AppVersion ¶ added in v0.87.2
func (c *CacheAuthData) AppVersion() string
func (*CacheAuthData) AuthKeyId ¶ added in v0.87.2
func (c *CacheAuthData) AuthKeyId() int64
func (*CacheAuthData) ClientIp ¶ added in v0.87.2
func (c *CacheAuthData) ClientIp() string
func (*CacheAuthData) DateActivated ¶ added in v0.87.2
func (c *CacheAuthData) DateActivated() int64
func (*CacheAuthData) DateCreated ¶ added in v0.87.2
func (c *CacheAuthData) DateCreated() int64
func (*CacheAuthData) DeviceModel ¶ added in v0.87.2
func (c *CacheAuthData) DeviceModel() string
func (*CacheAuthData) Hash ¶ added in v0.87.2
func (c *CacheAuthData) Hash() int64
func (*CacheAuthData) LangCode ¶ added in v0.87.2
func (c *CacheAuthData) LangCode() string
func (*CacheAuthData) LangPack ¶ added in v0.87.2
func (c *CacheAuthData) LangPack() string
func (*CacheAuthData) Layer ¶ added in v0.87.2
func (c *CacheAuthData) Layer() int32
func (*CacheAuthData) Params ¶ added in v0.87.2
func (c *CacheAuthData) Params() string
func (*CacheAuthData) Proxy ¶ added in v0.87.2
func (c *CacheAuthData) Proxy() string
func (*CacheAuthData) SystemLangCode ¶ added in v0.87.2
func (c *CacheAuthData) SystemLangCode() string
func (*CacheAuthData) SystemVersion ¶ added in v0.87.2
func (c *CacheAuthData) SystemVersion() string
func (*CacheAuthData) UserId ¶ added in v0.87.2
func (c *CacheAuthData) UserId() int64
type Dao ¶
type Dao struct { *Mysql sqlc.CachedConn MMDB *geoip2.Reader // contains filtered or unexported fields }
func (*Dao) BindAuthKeyUser ¶
func (*Dao) GetAuthKeyUserId ¶
func (*Dao) GetAuthorization ¶
func (*Dao) GetAuthorizations ¶
func (*Dao) GetCacheAuthData ¶ added in v0.87.2
func (*Dao) GetFutureSalts ¶
func (*Dao) GetPermAuthKeyId ¶
func (*Dao) GetPushSessionId ¶
func (*Dao) PutSaltCache ¶ added in v0.87.2
func (*Dao) QueryAuthKeyV2 ¶ added in v0.87.2
func (*Dao) ResetAuthorization ¶
func (*Dao) SetAuthKeyV2 ¶ added in v0.87.2
func (*Dao) SetClientSessionInfo ¶
func (d *Dao) SetClientSessionInfo(ctx context.Context, session *authsession.ClientSession) bool
func (*Dao) UnbindAuthUser ¶
type Mysql ¶
type Mysql struct { *sqlx.DB *mysql_dao.AuthKeysDAO *mysql_dao.AuthUsersDAO *mysql_dao.AuthsDAO *mysql_dao.DevicesDAO *mysql_dao.AuthKeyInfosDAO *sqlx.CommonDAO }
Click to show internal directories.
Click to hide internal directories.