Documentation ¶
Index ¶
- Constants
- Variables
- func ActivateUser(c context.Context, userRecord *datastore.UserRecord) error
- func CreateSubaccountRequest(rData *pages.RequestData)
- func DoRegister(rData *pages.RequestData, info *RegisterInfo) error
- func ForgotPasswordByUsername(rData *pages.RequestData)
- func GetFullNameShortened(userData *datastore.UserData) string
- func GetUserInfosMap(rData *pages.RequestData, ids []int64) (map[int64]*PublicAccountInfo, error)
- func GetUserRecordViaKey(c context.Context, keyVal interface{}) (*datastore.UserRecord, error)
- func GetUserRecordViaUsername(c context.Context, username string) (*datastore.UserRecord, error)
- func GetUserRecordsMap(rData *pages.RequestData, ids []int64) (map[int64]*datastore.UserRecord, error)
- func GetUsernamesForIds(rData *pages.RequestData, userIds []int64) (map[int64][]string, error)
- func GotActivateRequest(rData *pages.RequestData)
- func GotAvatarBase64ChangeServiceRequest(rData *pages.RequestData)
- func GotAvatarFileChangeServiceRequest(rData *pages.RequestData)
- func GotChangePasswordActionRequest(rData *pages.RequestData)
- func GotChangePasswordTokenRequestBySession(rData *pages.RequestData)
- func GotEmailChangeActionRequest(rData *pages.RequestData)
- func GotEmailChangeTokenRequest(rData *pages.RequestData)
- func GotLoginServiceRequest(rData *pages.RequestData)
- func GotNameChangeServiceRequest(rData *pages.RequestData)
- func GotRefreshTokenRequest(rData *pages.RequestData)
- func GotRegisterServiceRequest(rData *pages.RequestData)
- func GotSettingsInfoServiceRequest(rData *pages.RequestData)
- func OauthAction(rData *pages.RequestData)
- func OauthRequest(rData *pages.RequestData)
- func OauthResponse(rData *pages.RequestData)
- func RemoveFromSearch(c context.Context, userID string) error
- func SendActivateTokenRequest(rData *pages.RequestData)
- func SubaccountsList(rData *pages.RequestData)
- func UpdateAvatar(rData *pages.RequestData, srcImage image.Image, ...) error
- type FacebookPicture
- type FacebookPictureData
- type FacebookUser
- type LoginRequestMeta
- type OAuthUserInfo
- type PublicAccountInfo
- type RegisterInfo
- type RegisterRequestMeta
- type StateInfo
- type SubAccountInfo
- type UserInfo
Constants ¶
View Source
const ( LOOKUP_TYPE_USERNAME LOOKUP_TYPE_OAUTH )
View Source
const PASSWORD_MAX_LENGTH int = 32
View Source
const PASSWORD_MIN_LENGTH int = 6
Variables ¶
View Source
var OAUTH_ALLOWED_DESTINATIONS = []string{"oauth-action/login", "oauth-action/register"}
View Source
var OAUTH_ALLOWED_PROVIDERS = []string{"google", "facebook", "clever"}
View Source
var OAUTH_ALLOWED_REQUESTS = []string{"userinfo"}
Functions ¶
func ActivateUser ¶
func ActivateUser(c context.Context, userRecord *datastore.UserRecord) error
func CreateSubaccountRequest ¶
func CreateSubaccountRequest(rData *pages.RequestData)
func DoRegister ¶
func DoRegister(rData *pages.RequestData, info *RegisterInfo) error
func ForgotPasswordByUsername ¶
func ForgotPasswordByUsername(rData *pages.RequestData)
func GetFullNameShortened ¶
func GetUserInfosMap ¶
func GetUserInfosMap(rData *pages.RequestData, ids []int64) (map[int64]*PublicAccountInfo, error)
func GetUserRecordViaKey ¶
func GetUserRecordViaKey(c context.Context, keyVal interface{}) (*datastore.UserRecord, error)
Also differentiates between a "record not found", which will return a null record, and a proper technical error which returns error
func GetUserRecordViaUsername ¶
Differentiates between a "record not found", which will return a null record, and a proper technical error which returns error
func GetUserRecordsMap ¶
func GetUserRecordsMap(rData *pages.RequestData, ids []int64) (map[int64]*datastore.UserRecord, error)
func GetUsernamesForIds ¶
func GotActivateRequest ¶
func GotActivateRequest(rData *pages.RequestData)
func GotAvatarBase64ChangeServiceRequest ¶
func GotAvatarBase64ChangeServiceRequest(rData *pages.RequestData)
func GotAvatarFileChangeServiceRequest ¶
func GotAvatarFileChangeServiceRequest(rData *pages.RequestData)
func GotChangePasswordActionRequest ¶
func GotChangePasswordActionRequest(rData *pages.RequestData)
func GotChangePasswordTokenRequestBySession ¶
func GotChangePasswordTokenRequestBySession(rData *pages.RequestData)
func GotEmailChangeActionRequest ¶
func GotEmailChangeActionRequest(rData *pages.RequestData)
func GotEmailChangeTokenRequest ¶
func GotEmailChangeTokenRequest(rData *pages.RequestData)
func GotLoginServiceRequest ¶
func GotLoginServiceRequest(rData *pages.RequestData)
func GotNameChangeServiceRequest ¶
func GotNameChangeServiceRequest(rData *pages.RequestData)
func GotRefreshTokenRequest ¶
func GotRefreshTokenRequest(rData *pages.RequestData)
func GotRegisterServiceRequest ¶
func GotRegisterServiceRequest(rData *pages.RequestData)
func GotSettingsInfoServiceRequest ¶
func GotSettingsInfoServiceRequest(rData *pages.RequestData)
func OauthAction ¶
func OauthAction(rData *pages.RequestData)
func OauthRequest ¶
func OauthRequest(rData *pages.RequestData)
func OauthResponse ¶
func OauthResponse(rData *pages.RequestData)
func SendActivateTokenRequest ¶
func SendActivateTokenRequest(rData *pages.RequestData)
func SubaccountsList ¶
func SubaccountsList(rData *pages.RequestData)
func UpdateAvatar ¶
func UpdateAvatar(rData *pages.RequestData, srcImage image.Image, userRecord *datastore.UserRecord) error
Types ¶
type FacebookPicture ¶
type FacebookPicture struct {
Data FacebookPictureData `json:"data"`
}
type FacebookPictureData ¶
type FacebookPictureData struct {
Url string `json:"url"`
}
type FacebookUser ¶
type FacebookUser struct { Id string `json:"id"` Email string `json:"email"` FirstName string `json:"first_name"` LastName string `json:"last_name"` AvatarPicture FacebookPicture `json:"picture"` }
type LoginRequestMeta ¶
type OAuthUserInfo ¶ added in v1.2.0
type OAuthUserInfo struct { Id string `json:"uid,omitempty" datastore:",noindex"` Email string `json:"email,omitempty" datastore:",noindex"` FirstName string `json:"fname,omitempty" datastore:",noindex"` LastName string `json:"lname,omitempty" datastore:",noindex"` AvatarURL string `json:"aurl,omitempty" datastore:",noindex"` }
type PublicAccountInfo ¶
type PublicAccountInfo struct { Id string `json:"uid"` DisplayName string `json:"dname"` AvatarId string `json:"avid"` }
func GetUserInfo ¶
func GetUserInfo(userRecord *datastore.UserRecord) *PublicAccountInfo
func GetUserInfosList ¶
func GetUserInfosList(rData *pages.RequestData, ids []int64) ([]*PublicAccountInfo, error)
type RegisterInfo ¶
type RegisterRequestMeta ¶
type StateInfo ¶
type StateInfo struct { Destination string `json:"dest"` Request string `json:"request"` RequestMeta string `json:"requestMeta,omitempty" datastore:",noindex"` Scheme string `json:"scheme"` Provider string `json:"provider"` Response string `json:"response,omitempty" datastore:",noindex"` }
func (*StateInfo) DestinationUrl ¶
func (*StateInfo) ResponseUrl ¶
type SubAccountInfo ¶
type SubAccountInfo struct { PublicAccountInfo Username string `json:"uname"` }
type UserInfo ¶
type UserInfo struct { Id string `json:"uid"` Email string `json:"email"` FirstName string `json:"fname"` LastName string `json:"lname"` DisplayName string `json:"dname"` AvatarId string `json:"avid"` Jwt string `json:"jwt"` ErrorCode string `json:"code"` }
func GetUserInfoFromRecord ¶ added in v1.2.0
func GetUserInfoFromRecord(userRecord *datastore.UserRecord) *UserInfo
func (*UserInfo) SetErrorCode ¶ added in v1.2.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.