Documentation ¶
Index ¶
- Variables
- func CreateEmailVerification(ctx context.Context, newEmailVerification *EmailVerification) error
- func CreateFacebookAccount(ctx context.Context, newFacebookAccount *FacebookAccount) (err error)
- func CreateFacebookConnection(ctx context.Context, newFacebookConnection *FacebookConnection) (State uuid.UUID, err error)
- func CreateFacebookRegister(ctx context.Context, newFacebookRegister *FacebookRegister) (ID uuid.UUID, err error)
- func CreateGoogleAccount(ctx context.Context, newGoogleAccount *GoogleAccount) error
- func CreateGoogleConnection(ctx context.Context, newGoogleConnection *GoogleConnection) (State uuid.UUID, err error)
- func CreateGoogleRegister(ctx context.Context, newGoogleRegister *GoogleRegister) (ID uuid.UUID, err error)
- func CreateInstagramAccount(ctx context.Context, newInstagramAccount *InstagramAccount) (err error)
- func CreateInstagramConnection(ctx context.Context, newInstagramConnection *InstagramConnection) (State uuid.UUID, err error)
- func CreateInstagramRegister(ctx context.Context, newInstagramRegister *InstagramRegister) (ID uuid.UUID, err error)
- func CreateLinkedinAccount(ctx context.Context, newLinkedinAccount *LinkedinAccount) error
- func CreateLinkedinConnection(ctx context.Context, newLinkedinConnection *LinkedinConnection) (State uuid.UUID, err error)
- func CreateLinkedinRegister(ctx context.Context, newLinkedinRegister *LinkedinRegister) (ID uuid.UUID, err error)
- func CreateLoginToken(ctx context.Context, newLoginToken *LoginToken) (Token uuid.UUID, err error)
- func CreateMergeToken(ctx context.Context, newMergeToken *MergeToken) (Token uuid.UUID, err error)
- func CreatePhoneVerification(ctx context.Context, pv *PhoneVerification) error
- func CreateResetPassword(ctx context.Context, newResetPassword *ResetPassword) error
- func CreateSession(ctx context.Context, newSession *Session) (ID string, err error)
- func CreateTwitterAccount(ctx context.Context, newTwitterAccount *TwitterAccount) (err error)
- func CreateTwitterConnection(ctx context.Context, newTwitterConnection *TwitterConnection) (State uuid.UUID, err error)
- func CreateTwitterRegister(ctx context.Context, newTwitterRegister *TwitterRegister) (ID uuid.UUID, err error)
- func CreateTwitterToken(key string, token oauth.RequestToken) error
- func CreateUser(ctx context.Context, newUser *models.User) (ID string, err error)
- func DeleteEmailVerification(ctx context.Context, ID string) error
- func DeleteFacebookAccount(ctx context.Context, ID string) error
- func DeleteFacebookConnection(ctx context.Context, State uuid.UUID) error
- func DeleteFacebookRegister(ctx context.Context, ID uuid.UUID) error
- func DeleteGoogleAccount(ctx context.Context, GoogleEmail string) error
- func DeleteGoogleConnection(ctx context.Context, State uuid.UUID) error
- func DeleteGoogleRegister(ctx context.Context, ID uuid.UUID) error
- func DeleteInstagramAccount(ctx context.Context, ID string) error
- func DeleteInstagramConnection(ctx context.Context, State uuid.UUID) error
- func DeleteInstagramRegister(ctx context.Context, ID uuid.UUID) error
- func DeleteLinkedinAccount(ctx context.Context, LinkedinEmail string) error
- func DeleteLinkedinConnection(ctx context.Context, State uuid.UUID) error
- func DeleteLinkedinRegister(ctx context.Context, ID uuid.UUID) error
- func DeleteLoginToken(ctx context.Context, Token uuid.UUID) error
- func DeleteLoginTokenMulti(ctx context.Context, Tokens []uuid.UUID) error
- func DeleteMergeToken(ctx context.Context, Token uuid.UUID) error
- func DeleteMergeTokenMulti(ctx context.Context, Tokens []uuid.UUID) error
- func DeletePasswordLogin(ctx context.Context, Email string) error
- func DeletePhoneVerification(ctx context.Context, ID string) error
- func DeleteResetPassword(ctx context.Context, UserID string) error
- func DeleteSession(ctx context.Context, ID string) error
- func DeleteSessionMulti(ctx context.Context, IDs []string) error
- func DeleteTwitterAccount(ctx context.Context, ID string) error
- func DeleteTwitterConnection(ctx context.Context, State uuid.UUID) error
- func DeleteTwitterRegister(ctx context.Context, ID uuid.UUID) error
- func DeleteTwitterToken(key string) error
- func GetTwitterToken(key string) (*oauth.RequestToken, error)
- func GetUser(ctx context.Context, ID string) (*models.User, error)
- func GetUserMulti(ctx context.Context, IDs []string) ([]*models.User, error)
- func QueryFacebookAccountUser(ctx context.Context, UserID string) (string, error)
- func QueryGoogleAccountUser(ctx context.Context, UserID string) (string, error)
- func QueryInstagramAccountUser(ctx context.Context, UserID string) (string, error)
- func QueryLinkedinAccountUser(ctx context.Context, UserID string) (string, error)
- func QueryLoginTokenOld(ctx context.Context, TimeExpire time.Time) ([]uuid.UUID, error)
- func QueryMergeTokenOld(ctx context.Context, TimeExpire time.Time) ([]uuid.UUID, error)
- func QueryPasswordLoginFromID(ctx context.Context, UserID string) (string, error)
- func QuerySessionIds(ctx context.Context, UserID string) ([]string, error)
- func QuerySessionOld(ctx context.Context, LastUsed time.Time) ([]string, error)
- func QueryTwitterAccountUser(ctx context.Context, UserID string) (string, error)
- func QueryUserEmail(ctx context.Context, Email string) (*models.User, error)
- func SessionToSession(gen *Session) *session.Session
- func UpdatePasswordLogin(ctx context.Context, updatedPasswordLogin *PasswordLogin) error
- func UpdatePhoneVerification(ctx context.Context, pv *PhoneVerification) error
- func UpdateSession(ctx context.Context, updatedSession *Session) error
- func UpdateUser(ctx context.Context, updatedUser *models.User) error
- func UserFromUserParamsMerge(from *user.UserUpdateParams, to *models.User) *models.User
- func UserToInstagramUser(gen *models.User) *instagram.UserMedia
- func UserToUser(gen *models.User) *user.UserMedia
- type EmailVerification
- type FacebookAccount
- type FacebookConnection
- type FacebookRegister
- type GoogleAccount
- type GoogleConnection
- type GoogleRegister
- type InstagramAccount
- type InstagramConnection
- type InstagramRegister
- type LinkedinAccount
- type LinkedinConnection
- type LinkedinRegister
- type LoginToken
- type MergeToken
- type PasswordLogin
- type PhoneVerification
- type ResetPassword
- type Session
- type TwitterAccount
- type TwitterConnection
- type TwitterRegister
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmailVerificationNotFound = errors.New("No EmailVerification found in the database")
View Source
var ErrFacebookAccountNotFound = errors.New("No FacebookAccount found in the database")
View Source
var ErrFacebookConnectionNotFound = errors.New("No FacebookConnection found in the database")
View Source
var ErrFacebookRegisterNotFound = errors.New("No FacebookRegister found in the database")
View Source
var ErrGoogleAccountNotFound = errors.New("No GoogleAccount found in the database")
View Source
var ErrGoogleConnectionNotFound = errors.New("No GoogleConnection found in the database")
View Source
var ErrGoogleRegisterNotFound = errors.New("No GoogleRegister found in the database")
View Source
var ErrInstagramAccountNotFound = errors.New("No InstagramAccount found in the database")
View Source
var ErrInstagramConnectionNotFound = errors.New("No InstagramConnection found in the database")
View Source
var ErrInstagramRegisterNotFound = errors.New("No InstagramRegister found in the database")
View Source
var ErrLinkedinAccountNotFound = errors.New("No LinkedinAccount found in the database")
View Source
var ErrLinkedinConnectionNotFound = errors.New("No LinkedinConnection found in the database")
View Source
var ErrLinkedinRegisterNotFound = errors.New("No LinkedinRegister found in the database")
View Source
var ErrLoginTokenNotFound = errors.New("No Login Token found in the database")
View Source
var ErrMergeTokenNotFound = errors.New("No MergeToken found in the database")
View Source
var ErrPasswordLoginNotFound = errors.New("No PasswordLogin found in the database")
View Source
var ErrPhoneVerificationNotFound = errors.New("No PhoneVerification found in the database")
View Source
var ErrResetPasswordNotFound = errors.New("No ResetPassword found in the database")
View Source
var ErrSessionNotFound = errors.New("No Session found in the database")
View Source
var ErrTwitterAccountNotFound = errors.New("No TwitterAccount found in the database")
View Source
var ErrTwitterConnectionNotFound = errors.New("No TwitterConnection found in the database")
View Source
var ErrTwitterRegisterNotFound = errors.New("No TwitterRegister found in the database")
View Source
var ErrUserNotFound = errors.New("No User found in the database")
Functions ¶
func CreateEmailVerification ¶
func CreateEmailVerification(ctx context.Context, newEmailVerification *EmailVerification) error
func CreateFacebookAccount ¶
func CreateFacebookAccount(ctx context.Context, newFacebookAccount *FacebookAccount) (err error)
func CreateFacebookRegister ¶
func CreateGoogleAccount ¶
func CreateGoogleAccount(ctx context.Context, newGoogleAccount *GoogleAccount) error
func CreateGoogleConnection ¶
func CreateGoogleRegister ¶
func CreateInstagramAccount ¶
func CreateInstagramAccount(ctx context.Context, newInstagramAccount *InstagramAccount) (err error)
func CreateInstagramRegister ¶
func CreateLinkedinAccount ¶
func CreateLinkedinAccount(ctx context.Context, newLinkedinAccount *LinkedinAccount) error
func CreateLinkedinRegister ¶
func CreateLoginToken ¶
func CreateMergeToken ¶
func CreatePhoneVerification ¶
func CreatePhoneVerification(ctx context.Context, pv *PhoneVerification) error
func CreateResetPassword ¶
func CreateResetPassword(ctx context.Context, newResetPassword *ResetPassword) error
func CreateSession ¶
func CreateTwitterAccount ¶
func CreateTwitterAccount(ctx context.Context, newTwitterAccount *TwitterAccount) (err error)
func CreateTwitterConnection ¶
func CreateTwitterRegister ¶
func CreateTwitterToken ¶
func CreateTwitterToken(key string, token oauth.RequestToken) error
func DeleteGoogleConnection ¶
func DeleteInstagramRegister ¶
func DeleteLinkedinAccount ¶
func DeleteLoginTokenMulti ¶
func DeleteMergeTokenMulti ¶
func DeleteTwitterConnection ¶
func DeleteTwitterToken ¶
func GetTwitterToken ¶
func GetTwitterToken(key string) (*oauth.RequestToken, error)
func QueryGoogleAccountUser ¶
func QueryLoginTokenOld ¶
func QueryMergeTokenOld ¶
func QuerySessionOld ¶
func QueryTwitterAccountUser ¶
func SessionToSession ¶
func UpdatePasswordLogin ¶
func UpdatePasswordLogin(ctx context.Context, updatedPasswordLogin *PasswordLogin) error
func UpdatePhoneVerification ¶
func UpdatePhoneVerification(ctx context.Context, pv *PhoneVerification) error
func UserFromUserParamsMerge ¶
Types ¶
type EmailVerification ¶
type EmailVerification struct { Email string `bson:"email"` ID string `bson:"id"` TimeExpires time.Time `bson:"timeExpires"` UserID string `bson:"userId"` }
func GetEmailVerification ¶
func GetEmailVerification(ctx context.Context, ID string) (*EmailVerification, error)
func QueryEmailVerificationByUserID ¶
func QueryEmailVerificationByUserID(ctx context.Context, UserID string) (*EmailVerification, error)
type FacebookAccount ¶
func GetFacebookAccount ¶
func GetFacebookAccount(ctx context.Context, ID string) (*FacebookAccount, error)
type FacebookConnection ¶
type FacebookConnection struct { MergeToken uuid.UUID `bson:"mergeToken"` Purpose int `bson:"purpose"` State uuid.UUID `bson:"state"` TimeCreated time.Time `bson:"timeCreated"` }
func GetFacebookConnection ¶
type FacebookRegister ¶
type FacebookRegister struct { FacebookID string `bson:"facebookId"` ID uuid.UUID `bson:"id"` TimeCreated time.Time `bson:"timeCreated"` }
func GetFacebookRegister ¶
type GoogleAccount ¶
type GoogleAccount struct { ID primitive.ObjectID `bson:"_id,omitempty"` GoogleEmail string `bson:"googleEmail"` UserID string `bson:"userId"` }
func GetGoogleAccount ¶
func GetGoogleAccount(ctx context.Context, GoogleEmail string) (*GoogleAccount, error)
type GoogleConnection ¶
type GoogleConnection struct { ID primitive.ObjectID `bson:"_id,omitempty"` MergeToken uuid.UUID `bson:"mergeToken"` Purpose int `bson:"purpose"` State uuid.UUID `bson:"state"` TimeCreated time.Time `bson:"timeCreated"` }
func GetGoogleConnection ¶
type GoogleRegister ¶
type GoogleRegister struct { GoogleEmail string `bson:"googleEmail"` ID uuid.UUID `bson:"id"` TimeCreated time.Time `bson:"timeCreated"` }
func GetGoogleRegister ¶
type InstagramAccount ¶
type InstagramAccount struct { ID string `bson:"id"` UserID string `bson:"userId"` InstagramUsername string `bson:"instagramUsername"` RawData map[string]interface{} `bson:"rawData"` }
func GetInstagramAccount ¶
func GetInstagramAccount(ctx context.Context, ID string) (*InstagramAccount, error)
type InstagramConnection ¶
type InstagramConnection struct { MergeToken uuid.UUID `bson:"mergeToken"` Purpose int `bson:"purpose"` State uuid.UUID `bson:"state"` TimeCreated time.Time `bson:"timeCreated"` }
func GetInstagramConnection ¶
type InstagramRegister ¶
type LinkedinAccount ¶
type LinkedinAccount struct { LinkedinEmail string `bson:"linkedinEmail"` UserID string `bson:"userId"` }
func GetLinkedinAccount ¶
func GetLinkedinAccount(ctx context.Context, LinkedinEmail string) (*LinkedinAccount, error)
type LinkedinConnection ¶
type LinkedinConnection struct { MergeToken uuid.UUID `bson:"mergeToken"` Purpose int `bson:"purpose"` State uuid.UUID `bson:"state"` TimeCreated time.Time `bson:"timeCreated"` }
func GetLinkedinConnection ¶
type LinkedinRegister ¶
type LinkedinRegister struct { ID uuid.UUID `bson:"id"` LinkedinEmail string `bson:"linkedinEmail"` TimeCreated time.Time `bson:"timeCreated"` }
func GetLinkedinRegister ¶
type LoginToken ¶
type LoginToken struct { TimeExpire time.Time `bson:"timeExpire"` Token uuid.UUID `bson:"token"` UserID string `bson:"userId"` }
func GetLoginToken ¶
type MergeToken ¶
type MergeToken struct { TimeExpire time.Time `bson:"timeExpire"` Token uuid.UUID `bson:"token"` UserID string `bson:"userId"` }
func GetMergeToken ¶
type PasswordLogin ¶
type PasswordLogin struct { ID primitive.ObjectID `bson:"_id,omitempty"` Email string `bson:"email"` Password string `bson:"password"` Recovery string `bson:"recovery"` UserID string `bson:"userId"` }
func GetPasswordLogin ¶
func GetPasswordLogin(ctx context.Context, Email string) (*PasswordLogin, error)
type PhoneVerification ¶
type PhoneVerification struct { ID primitive.ObjectID `bson:"_id,omitempty"` Country string `bson:"country"` Phone string `bson:"phone"` OTP string `bson:"otp"` TimeExpires time.Time `bson:"timeExpires"` UserID string `bson:"userId"` }
func GetPhoneVerification ¶
func GetPhoneVerification(ctx context.Context, ID string) (*PhoneVerification, error)
func QueryPhoneVerificationByUserID ¶
func QueryPhoneVerificationByUserID(ctx context.Context, UserID string) (*PhoneVerification, error)
type ResetPassword ¶
type ResetPassword struct { ID uuid.UUID `bson:"id"` TimeExpires time.Time `bson:"timeExpires"` UserID string `bson:"userId"` }
func GetResetPassword ¶
func GetResetPassword(ctx context.Context, UserID string) (*ResetPassword, error)
type Session ¶
type Session struct { // The browser and browser version connected with this session Browser string `bson:"browser"` // The latitude and longitude of the last known location of the session Latitude string `bson:"latitude"` Longitude string `bson:"longitude"` ID primitive.ObjectID `bson:"_id,omitempty"` // The last IP address where this session was used IP string `bson:"ip"` IsAdmin bool `bson:"isAdmin"` // Whether the session was from a mobile device IsMobile bool `bson:"isMobile"` // Time that this session was last used LastUsed time.Time `bson:"lastUsed"` // A human-readable string describing the last known location of the session Location string `bson:"location"` // The OS of the system where this session was used Os string `bson:"os"` // ID of the user this session is for UserID string `bson:"userId"` }
type TwitterAccount ¶
func GetTwitterAccount ¶
func GetTwitterAccount(ctx context.Context, ID string) (*TwitterAccount, error)
type TwitterConnection ¶
type TwitterConnection struct { MergeToken uuid.UUID `bson:"mergeToken"` Purpose int `bson:"purpose"` State uuid.UUID `bson:"state"` TimeCreated time.Time `bson:"timeCreated"` }
func GetTwitterConnection ¶
type TwitterRegister ¶
type TwitterRegister struct { TwitterID string `bson:"facebookId"` ID uuid.UUID `bson:"id"` TimeCreated time.Time `bson:"timeCreated"` }
func GetTwitterRegister ¶
Click to show internal directories.
Click to hide internal directories.