Documentation
¶
Index ¶
- 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) GetAuthKey(ctx context.Context, keyId int64) (keyData *mtproto.AuthKeyInfo, err error)
- 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) 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) InsertAuthKey(ctx context.Context, authKey *mtproto.AuthKeyInfo, salt *mtproto.TLFutureSalt, ...) (err error)
- func (d *Dao) PutAuthKey(ctx context.Context, keyId int64, keyData *mtproto.AuthKeyInfo, ...) (err error)
- func (d *Dao) PutSalts(ctx context.Context, keyId int64, salts []*mtproto.TLFutureSalt) (err error)
- func (d *Dao) QueryAuthKey(ctx context.Context, authKeyId int64) (*mtproto.AuthKeyInfo, error)
- func (d *Dao) ResetAuthorization(ctx context.Context, userId int64, authKeyId, hash int64) []int64
- 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) UnsafeBindKeyId(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 Dao ¶
type Dao struct { *Mysql sqlc.CachedConn MMDB *geoip2.Reader // contains filtered or unexported fields }
func (*Dao) BindAuthKeyUser ¶
func (*Dao) GetAuthKey ¶
func (*Dao) GetAuthKeyUserId ¶
func (*Dao) GetAuthorization ¶
func (*Dao) GetAuthorizations ¶
func (*Dao) GetFutureSalts ¶
func (*Dao) GetPermAuthKeyId ¶
func (*Dao) GetPushSessionId ¶
func (*Dao) InsertAuthKey ¶
func (d *Dao) InsertAuthKey(ctx context.Context, authKey *mtproto.AuthKeyInfo, salt *mtproto.TLFutureSalt, expiredIn int32) (err error)
func (*Dao) PutAuthKey ¶
func (*Dao) QueryAuthKey ¶
func (*Dao) ResetAuthorization ¶
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.