Documentation
¶
Index ¶
- Constants
- Variables
- type Account
- type AccountDomain
- type AccountRepo
- type AppleDomain
- func (do *AppleDomain) CheckAppleId(ctx context.Context, secret string) (*v1.AppleId, error)
- func (do *AppleDomain) CreateAccount(ctx context.Context, appleId string, ip string) (*Account, error)
- func (do *AppleDomain) GetAccount(ctx context.Context, appleId string) (*Account, error)
- func (do *AppleDomain) GetOrCreateAccount(ctx context.Context, appleId string, ip string) (acc *Account, isCreated bool, err error)
- func (do *AppleDomain) RequestPlatformIdByAppToken(ctx context.Context, token string) (appleId string, err error)
- func (do *AppleDomain) RequestPlatformIdByWebToken(ctx context.Context, token string) (appleId string, err error)
- func (do *AppleDomain) RequestToken(ctx context.Context, code string) (string, error)
- type ChannelType
- type FacebookDomain
- func (do *FacebookDomain) GetAccount(ctx context.Context, facebookId string) (*Account, error)
- func (do *FacebookDomain) GetOrCreateAccount(ctx context.Context, facebookId string, ip string) (acc *Account, isCreated bool, err error)
- func (do *FacebookDomain) RequestPlatformId(ctx context.Context, token string) (string, error)
- type GoogleDomain
- func (do *GoogleDomain) GetAccount(ctx context.Context, googleId string) (*Account, error)
- func (do *GoogleDomain) GetOrCreateAccount(ctx context.Context, googleId string, ip string) (acc *Account, isRegister bool, err error)
- func (do *GoogleDomain) RequestPlatformId(ctx context.Context, token string) (string, error)
- type UsernameDomain
Constants ¶
View Source
const ( AppleLoginTypeApp = iota AppleLoginTypeWeb )
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewAccountDomain, NewUsernameDomain, NewGoogleDomain, NewAppleDomain, NewFacebookDomain)
Functions ¶
This section is empty.
Types ¶
type Account ¶
type AccountDomain ¶
type AccountDomain struct {
// contains filtered or unexported fields
}
func NewAccountDomain ¶
func NewAccountDomain(logger log.Logger, repo AccountRepo) (do *AccountDomain)
type AccountRepo ¶
type AccountRepo interface {
Create(ctx context.Context, account *Account) (*Account, error)
GetById(ctx context.Context, id int64) (*Account, error)
GetByApple(ctx context.Context, apple string) (*Account, error)
GetByGoogle(ctx context.Context, google string) (*Account, error)
GetByFacebook(ctx context.Context, facebook string) (*Account, error)
GetByUsername(ctx context.Context, name string) (*Account, error)
UpdatePasswordHash(ctx context.Context, id int64, passwordHash string) (bool, error)
}
type AppleDomain ¶
type AppleDomain struct {
// contains filtered or unexported fields
}
func NewAppleDomain ¶
func NewAppleDomain(logger log.Logger, label *conf.Label, c *conf.Platform, repo AccountRepo) (do *AppleDomain, err error)
func (*AppleDomain) CheckAppleId ¶
func (*AppleDomain) CreateAccount ¶
func (*AppleDomain) GetAccount ¶
func (*AppleDomain) GetOrCreateAccount ¶
func (*AppleDomain) RequestPlatformIdByAppToken ¶
func (*AppleDomain) RequestPlatformIdByWebToken ¶
func (*AppleDomain) RequestToken ¶
type ChannelType ¶
type ChannelType int32
const ( ChannelTypeDefault ChannelType = iota ChannelTypeApple ChannelTypeGoogle ChannelTypeFacebook )
type FacebookDomain ¶
type FacebookDomain struct {
// contains filtered or unexported fields
}
func NewFacebookDomain ¶
func NewFacebookDomain(logger log.Logger, label *conf.Label, c *conf.Platform, repo AccountRepo) (do *FacebookDomain, err error)
func (*FacebookDomain) GetAccount ¶
func (*FacebookDomain) GetOrCreateAccount ¶
func (*FacebookDomain) RequestPlatformId ¶
type GoogleDomain ¶
type GoogleDomain struct {
// contains filtered or unexported fields
}
func NewGoogleDomain ¶
func NewGoogleDomain(logger log.Logger, label *conf.Label, c *conf.Platform, repo AccountRepo) (do *GoogleDomain, err error)
func (*GoogleDomain) GetAccount ¶
func (*GoogleDomain) GetOrCreateAccount ¶
func (*GoogleDomain) RequestPlatformId ¶
type UsernameDomain ¶
type UsernameDomain struct {
// contains filtered or unexported fields
}
func NewUsernameDomain ¶
func NewUsernameDomain(logger log.Logger, repo AccountRepo) (do *UsernameDomain)
func (*UsernameDomain) GetAccountByUsername ¶
func (*UsernameDomain) UpdatePasswordHash ¶
Click to show internal directories.
Click to hide internal directories.