user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	// Global ID of Account
	Provider string
	App      string
	ID       string
}

func ParseUserAccount

func ParseUserAccount(s string) (ua Account, err error)

func (Account) String

func (ua Account) String() string

type AccountData added in v0.0.4

type AccountData interface {
	BelongsToUser
	SetLastLogin(time time.Time)
	IsEmailConfirmed() bool
	GetNames() Names
}

type AccountRecord

type AccountRecord interface {
	Key() *dal.Key
	Record() dal.Record
	AccountData() AccountData
	UserAccount() Account
	GetEmail() string
}

type AccountsOfUser

type AccountsOfUser struct {
	// Member of TgUserEntity class
	Accounts []string `datastore:",noindex"`
}

func (*AccountsOfUser) AddAccount

func (ua *AccountsOfUser) AddAccount(userAccount Account) (changed bool)

func (*AccountsOfUser) GetAccount

func (ua *AccountsOfUser) GetAccount(provider, app string) (userAccount *Account, err error)

GetAccount returns the first account of the given provider and app.

func (*AccountsOfUser) GetAccounts

func (ua *AccountsOfUser) GetAccounts(platform string) (userAccounts []Account, err error)

func (*AccountsOfUser) GetFbAccount

func (ua *AccountsOfUser) GetFbAccount(app string) (userAccount *Account, err error)

func (*AccountsOfUser) GetFbAccounts

func (ua *AccountsOfUser) GetFbAccounts() (userAccounts []Account, err error)

func (*AccountsOfUser) GetFbmAccount

func (ua *AccountsOfUser) GetFbmAccount(fbPageID string) (userAccount *Account, err error)

func (*AccountsOfUser) GetGoogleAccount

func (ua *AccountsOfUser) GetGoogleAccount() (userAccount *Account, err error)

func (*AccountsOfUser) GetTelegramAccounts

func (ua *AccountsOfUser) GetTelegramAccounts() (telegramAccounts []Account)

func (*AccountsOfUser) GetTelegramUserIDs

func (ua *AccountsOfUser) GetTelegramUserIDs() (telegramUserIDs []int64)

func (*AccountsOfUser) HasAccount

func (ua *AccountsOfUser) HasAccount(provider, app string) bool

func (*AccountsOfUser) HasGoogleAccount

func (ua *AccountsOfUser) HasGoogleAccount() bool

func (*AccountsOfUser) HasTelegramAccount

func (ua *AccountsOfUser) HasTelegramAccount() bool

func (*AccountsOfUser) RemoveAccount

func (ua *AccountsOfUser) RemoveAccount(userAccount Account) (changed bool)

RemoveAccount removes account from the list of account IDs.

func (*AccountsOfUser) SetBotUserID

func (ua *AccountsOfUser) SetBotUserID(platform, botID, botUserID string)

type BelongsToUser

type BelongsToUser interface {
	GetAppUserID() interface{}
}

type BelongsToUserWithIntID

type BelongsToUserWithIntID interface {
	BelongsToUser
	GetAppUserIntID() int64
	SetAppUserIntID(appUserID int64)
}

type BelongsToUserWithStrID

type BelongsToUserWithStrID interface {
	BelongsToUser
	GetAppUserStrID() string
	SetAppUserStrID(appUserID string)
}

type CreatedTimesSetter

type CreatedTimesSetter interface {
	SetCreatedTime(time.Time)
}

type LastLogin

type LastLogin struct {
	DtLastLogin time.Time `datastore:",omitempty"`
}

LastLogin is a struct that contains the last login time of a user.

func (*LastLogin) SetLastLogin

func (l *LastLogin) SetLastLogin(time time.Time)

SetLastLogin sets the last login time of a user.

type Names

type Names struct {
	FirstName string `datastore:",noindex"`
	LastName  string `datastore:",noindex"`
	NickName  string `datastore:",noindex"`
}

func (Names) GetNames

func (entity Names) GetNames() Names

type OwnedByUserWithIntID

type OwnedByUserWithIntID struct {
	AppUserIntID int64
	// contains filtered or unexported fields
}

func NewOwnedByUserWithIntID

func NewOwnedByUserWithIntID(id int64, created time.Time) OwnedByUserWithIntID

func (*OwnedByUserWithIntID) GetAppUserID

func (ownedByUser *OwnedByUserWithIntID) GetAppUserID() interface{}

func (*OwnedByUserWithIntID) GetAppUserIntID

func (ownedByUser *OwnedByUserWithIntID) GetAppUserIntID() int64

func (*OwnedByUserWithIntID) SetAppUserIntID

func (ownedByUser *OwnedByUserWithIntID) SetAppUserIntID(appUserID int64)

func (*OwnedByUserWithIntID) SetCreatedTime

func (ownedByUser *OwnedByUserWithIntID) SetCreatedTime(v time.Time)

func (*OwnedByUserWithIntID) SetUpdatedTime

func (ownedByUser *OwnedByUserWithIntID) SetUpdatedTime(v time.Time)

func (OwnedByUserWithIntID) Validate

func (ownedByUser OwnedByUserWithIntID) Validate() error

type UpdatedTimeSetter

type UpdatedTimeSetter interface {
	SetUpdatedTime(time.Time)
}

Jump to

Keyboard shortcuts

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