dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

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 New

func New(c *conf.Config) (d *Dao)

New dao

func (*Dao) AccountInfo

func (d *Dao) AccountInfo(c context.Context, mid int64) (res *model.AsoAccount, err error)

AccountInfo get account info.

func (*Dao) AddToken

func (d *Dao) AddToken(c context.Context, t *model.Perm) (affected int64, err error)

AddToken add token.

func (*Dao) Apps

func (d *Dao) Apps(c context.Context) (res []*model.App, err error)

Apps get all apps.

func (*Dao) AsoAccount

func (d *Dao) AsoAccount(c context.Context, identify, identifyHash string) (res []*model.AsoAccount, err error)

AsoAccount get aso account.

func (*Dao) ByTel

func (d *Dao) ByTel(c context.Context, tdoByTel model.TdoByTel) (byTel *model.ResByTel, err error)

ByTel ByTel

func (*Dao) Captcha

func (d *Dao) Captcha(c context.Context, ip string) (captchaData *model.CaptchaData, err error)

Captcha Captcha

func (*Dao) Close

func (d *Dao) Close() (err error)

Close close connections of mc, cloudDB.

func (*Dao) DelOriginMissMatchFlagCache

func (d *Dao) DelOriginMissMatchFlagCache(c context.Context, identify string) (err error)

DelOriginMissMatchFlagCache delete origin miss match flag.

func (*Dao) DelOriginTokenCache

func (d *Dao) DelOriginTokenCache(c context.Context, accessToken string) (err error)

DelOriginTokenCache delete passport token from cache.

func (*Dao) DelTokenCache

func (d *Dao) DelTokenCache(c context.Context, accessToken string) (err error)

DelTokenCache delete token from cache.

func (*Dao) InfoCache

func (d *Dao) InfoCache(c context.Context, mid int64) (info *model.Info, err error)

InfoCache get info cache from cache.

func (*Dao) InfoPBCache

func (d *Dao) InfoPBCache(c context.Context, key string) (res *model.Info, err error)

InfoPBCache get info pb cache.

func (*Dao) Login

func (d *Dao) Login(c context.Context, query, cookie string) (loginToken *model.LoginToken, err error)

Login login via model api.

func (*Dao) LoginOrigin

func (d *Dao) LoginOrigin(c context.Context, userid, rsaPwd string) (loginToken *model.LoginToken, err error)

LoginOrigin login via passport api.

func (*Dao) MemberInfo

func (d *Dao) MemberInfo(c context.Context, mid int64) (res *model.Info, err error)

MemberInfo get member info.

func (*Dao) MyInfo

func (d *Dao) MyInfo(c context.Context, accessKey string) (accountInfo *model.Info, err error)

MyInfo get info from api.

func (*Dao) Oauth

func (d *Dao) Oauth(c context.Context, uri, accessKey, from string) (token *model.Token, err error)

Oauth oauth via passport api.

func (*Dao) OriginMissMatchFlagCache

func (d *Dao) OriginMissMatchFlagCache(c context.Context, identify string) (res []byte, err error)

OriginMissMatchFlagCache get origin miss match flag.

func (*Dao) OriginTokenCache

func (d *Dao) OriginTokenCache(c context.Context, accessToken string) (token *model.Token, err error)

OriginTokenCache set passport token into cache.

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping verify server is ok.

func (*Dao) RSAKeyOrigin

func (d *Dao) RSAKeyOrigin(c context.Context) (key *model.RSAKey, err error)

RSAKeyOrigin get rsa pub key and ts hash via passport api.

func (*Dao) Reg

func (d *Dao) Reg(c context.Context, tdoReg model.TdoReg) (reg *model.ResReg, err error)

Reg Reg

func (*Dao) RegV2

func (d *Dao) RegV2(c context.Context, tdoRegV2 model.TdoRegV2) (regV2 *model.ResRegV2, err error)

RegV2 RegV2

func (*Dao) RegV3

func (d *Dao) RegV3(c context.Context, tdoRegV3 model.TdoRegV3) (regV3 *model.ResRegV3, err error)

RegV3 RegV3

func (*Dao) RenewToken

func (d *Dao) RenewToken(c context.Context, uri, ak, from string) (renewToken *model.RenewToken, err error)

RenewToken renew token via passport api.

func (*Dao) SendSms

func (d *Dao) SendSms(c context.Context, tdoSendSms model.TdoSendSms) (err error)

SendSms SendSms

func (*Dao) SetInfoCache

func (d *Dao) SetInfoCache(c context.Context, info *model.Info) (err error)

SetInfoCache set info into cache.

func (*Dao) SetOriginMissMatchFlagCache

func (d *Dao) SetOriginMissMatchFlagCache(c context.Context, identify string, flag []byte) (err error)

SetOriginMissMatchFlagCache set origin miss match flag cache.

func (*Dao) SetOriginTokenCache

func (d *Dao) SetOriginTokenCache(c context.Context, token *model.Token) (err error)

SetOriginTokenCache set passport token into cache.

func (*Dao) SetTokenCache

func (d *Dao) SetTokenCache(c context.Context, token *model.Perm) (err error)

SetTokenCache set token into cache.

func (*Dao) Token

func (d *Dao) Token(c context.Context, accessToken string) (res *model.Perm, err error)

Token get token.

func (*Dao) TokenCache

func (d *Dao) TokenCache(c context.Context, accessToken string) (token *model.Perm, err error)

TokenCache get token from cache.

func (*Dao) TokenFromOtherRegion

func (d *Dao) TokenFromOtherRegion(c context.Context, accessToken string) (res *model.Perm, err error)

TokenFromOtherRegion get token from otherRegion.

func (*Dao) TokenPBCache

func (d *Dao) TokenPBCache(c context.Context, key string) (res *model.Perm, err error)

TokenPBCache get token pb cache.

func (*Dao) UpdateToken

func (d *Dao) UpdateToken(c context.Context, t *model.Perm) (affected int64, err error)

UpdateToken update token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL