You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
631 B

package passport
import (
"context"
"go-common/app/interface/main/account/conf"
"go-common/app/interface/main/account/dao/passport"
"go-common/library/net/metadata"
)
// Service struct of service.
type Service struct {
// conf
c *conf.Config
passDao *passport.Dao
}
// New create service instance and return.
func New(c *conf.Config) (s *Service) {
s = &Service{
c: c,
passDao: passport.New(c),
}
return
}
// TestUserName is.
func (s *Service) TestUserName(ctx context.Context, name string, mid int64) error {
ip := metadata.String(ctx, metadata.RemoteIP)
return s.passDao.TestUserName(ctx, name, mid, ip)
}