Documentation
¶
Index ¶
- type AccountRecoveryPhonesResponse
- type AssignRolePayload
- type ChangePINRequest
- type CheckPermissionPayload
- type CreatedUserResponse
- type DeleteRolePayload
- type GroupedNavigationActions
- type LoginPayload
- type OKResp
- type OtpPayload
- type PermissionInput
- type PhoneNumberPayload
- type PostVisitSurveyInput
- type ProfileSuspensionInput
- type PushTokenPayload
- type RefreshTokenExchangePayload
- type RefreshTokenPayload
- type RegisterUserInput
- type RegisteredUserResponse
- type RetrieveUserProfileInput
- type RoleInput
- type RoleOutput
- type RolePayload
- type RolePermissionInput
- type RoleRevocationInput
- type SendRetryOTPPayload
- type SetPrimaryPhoneNumberPayload
- type SignUpInput
- type UIDPayload
- type UIDsPayload
- type UserAddressInput
- type UserInfo
- type UserProfileInput
- type UserProfilePayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRecoveryPhonesResponse ¶
type AccountRecoveryPhonesResponse struct { MaskedPhoneNumbers []string `json:"maskedPhoneNumbers"` UnMaskedPhoneNumbers []string `json:"unmaskedPhoneNumbers"` }
AccountRecoveryPhonesResponse payload sent back to the frontend when recovery an account
type AssignRolePayload ¶ added in v0.0.2
AssignRolePayload is the payload used to assign a role to a user
type ChangePINRequest ¶
type ChangePINRequest struct { PhoneNumber string `json:"phoneNumber"` PIN string `json:"pin"` OTP string `json:"otp"` }
ChangePINRequest payload to set or change PIN information
type CheckPermissionPayload ¶ added in v0.0.2
type CheckPermissionPayload struct { UID *string `json:"uid"` Permission *profileutils.Permission `json:"permission"` }
CheckPermissionPayload is the payload used when checking if a user is authorized
type CreatedUserResponse ¶
type CreatedUserResponse struct { UID string `json:"uid,omitempty"` DisplayName string `json:"display_name,omitempty"` Email string `json:"email,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` PhotoURL string `json:"photo_url,omitempty"` ProviderID string `json:"provider_id,omitempty"` }
CreatedUserResponse is used to return a created user
type DeleteRolePayload ¶ added in v0.0.2
DeleteRolePayload is the payload used to delete a role
type GroupedNavigationActions ¶ added in v0.0.2
type GroupedNavigationActions struct {}
GroupedNavigationActions is the list of Navigation Actions sorted into primary and secondary actions
type LoginPayload ¶
type LoginPayload struct { PhoneNumber *string `json:"phoneNumber"` PIN *string `json:"pin"` Flavour feedlib.Flavour `json:"flavour"` }
LoginPayload used when calling the REST API to log a user in
type OKResp ¶
type OKResp struct { Status string `json:"status,omitempty"` Response interface{} `json:"response,omitempty"` }
OKResp is used to return OK response in inter-service calls
type OtpPayload ¶ added in v0.0.2
OtpPayload used when sending OTP messages
type PermissionInput ¶
PermissionInput input required to create a permission
type PhoneNumberPayload ¶
type PhoneNumberPayload struct {
PhoneNumber *string `json:"phoneNumber"`
}
PhoneNumberPayload used when verifying a phone number.
type PostVisitSurveyInput ¶
type PostVisitSurveyInput struct { LikelyToRecommend int `json:"likelyToRecommend" firestore:"likelyToRecommend"` Criticism string `json:"criticism" firestore:"criticism"` Suggestions string `json:"suggestions" firestore:"suggestions"` }
PostVisitSurveyInput is used to send the results of post-visit surveys to the server.
type ProfileSuspensionInput ¶ added in v0.0.2
type ProfileSuspensionInput struct { ID string `json:"id"` RoleIDs []string `json:"roleIDs"` Reason string `json:"reason"` }
ProfileSuspensionInput is the input required to suspend/unsuspend a PRO account
type PushTokenPayload ¶
PushTokenPayload represents user device push token
type RefreshTokenExchangePayload ¶
type RefreshTokenExchangePayload struct { GrantType string `json:"grant_type"` RefreshToken string `json:"refresh_token"` }
RefreshTokenExchangePayload is marshalled into JSON and sent to the Firebase Auth REST API when exchanging a refresh token for an ID token that can be used to make API calls
type RefreshTokenPayload ¶
type RefreshTokenPayload struct {
RefreshToken *string `json:"refreshToken"`
}
RefreshTokenPayload is used when calling the REST API to exchange a Refresh Token for new ID Token
type RegisterUserInput ¶ added in v0.0.10
type RegisterUserInput struct { UID *string `json:"createdByID,omitempty"` FirstName *string `json:"firstName,omitempty"` LastName *string `json:"lastName,omitempty"` Gender *enumutils.Gender `json:"gender,omitempty"` PhoneNumber *string `json:"phoneNumber,omitempty"` Email *string `json:"email,omitempty"` DateOfBirth *scalarutils.Date `json:"dateOfBirth,omitempty"` RoleIDs []string `json:"roleIDs,omitempty"` WelcomeMessage *string `json:"welcomeMessage,omitempty"` }
RegisterUserInput is the data required to creat a new user. this data can be used by cross service requests
type RegisteredUserResponse ¶ added in v0.0.23
type RegisteredUserResponse struct { ID string `json:"id,omitempty"` DisplayName string `json:"displayName,omitempty"` PhoneNumber string `json:"phoneNumber,omitempty"` }
RegisteredUserResponse is used to return by creating a new user in ISC
type RetrieveUserProfileInput ¶ added in v0.0.2
type RetrieveUserProfileInput struct { Email *string `json:"email" firestore:"emailAddress"` PhoneNumber *string `json:"phone" firestore:"phoneNumber"` }
RetrieveUserProfileInput will be used to fetch a user profile by either email address or phone
type RoleInput ¶
type RoleInput struct { Name string `json:"name"` Description string `json:"description"` Scopes []string `json:"scopes"` }
RoleInput represents the information required when creating a role
type RoleOutput ¶
type RoleOutput struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Active bool `json:"active"` Scopes []string `json:"scopes"` Permissions []profileutils.Permission `json:"permissions"` Users []*profileutils.UserProfile `json:"users"` }
RoleOutput is the formatted output with scopes and permissions
type RolePayload ¶
type RolePayload struct { PhoneNumber *string `json:"phoneNumber"` Role *profileutils.RoleType `json:"role"` }
RolePayload used when adding roles to a user
type RolePermissionInput ¶
RolePermissionInput input required to create a permission
type RoleRevocationInput ¶ added in v0.0.2
RoleRevocationInput is the input when revoking a user's role
type SendRetryOTPPayload ¶
type SendRetryOTPPayload struct { Phone *string `json:"phoneNumber"` RetryStep *int `json:"retryStep"` AppID *string `json:"appId"` }
SendRetryOTPPayload is used when calling the REST API to resend an otp
type SetPrimaryPhoneNumberPayload ¶
type SetPrimaryPhoneNumberPayload struct { PhoneNumber *string `json:"phoneNumber"` OTP *string `json:"otp"` }
SetPrimaryPhoneNumberPayload used when veriying and setting a user's primary phone number via REST
type SignUpInput ¶
type SignUpInput struct { PhoneNumber *string `json:"phoneNumber"` PIN *string `json:"pin"` Flavour feedlib.Flavour `json:"flavour"` OTP *string `json:"otp"` }
SignUpInput represents the user information required to create a new account
type UIDPayload ¶
type UIDPayload struct {
UID *string `json:"uid"`
}
UIDPayload is the user ID used in some inter-service requests
type UIDsPayload ¶
type UIDsPayload struct {
UIDs []string `json:"uids"`
}
UIDsPayload is an input of a slice of users' UIDs used for ISC requests to retrieve contact details of the users
type UserAddressInput ¶
type UserAddressInput struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Locality *string `json:"locality"` Name *string `json:"name"` PlaceID *string `json:"placeID"` FormattedAddress *string `json:"formattedAddress"` }
UserAddressInput represents a user's geo location input
type UserInfo ¶
type UserInfo struct { DisplayName string `json:"displayName,omitempty"` Email string `json:"email,omitempty"` PhoneNumber string `json:"phoneNumber,omitempty"` PhotoURL string `json:"photoUrl,omitempty"` // In the ProviderUserInfo[] ProviderID can be a short domain name (e.g. google.com), // or the identity of an OpenID identity provider. // In UserRecord.UserInfo it will return the constant string "firebase". ProviderID string `json:"providerId,omitempty"` UID string `json:"rawId,omitempty"` }
UserInfo is a collection of standard profile information for a user.
type UserProfileInput ¶
type UserProfileInput struct { PhotoUploadID *string `json:"photoUploadID"` DateOfBirth *scalarutils.Date `json:"dateOfBirth,omitempty"` Gender *enumutils.Gender `json:"gender,omitempty"` FirstName *string `json:"lastName"` LastName *string `json:"firstName"` }
UserProfileInput is used to create or update a user's profile.
type UserProfilePayload ¶
type UserProfilePayload struct { UID *string `json:"uid"` PhotoUploadID *string `json:"photoUploadID"` DateOfBirth *scalarutils.Date `json:"dateOfBirth,omitempty"` Gender *enumutils.Gender `json:"gender,omitempty"` FirstName *string `json:"lastName"` LastName *string `json:"firstName"` }
UserProfilePayload is used to update a user's profile. This payload is used for REST endpoints