Documentation
¶
Index ¶
- Constants
- func AddRecordError(err error) error
- func AuthenticateTokenError(err error) error
- func CheckEmailExistError() error
- func CheckPhoneNumberExistError() error
- func CheckUserPINError(err error) error
- func CompleteSignUpError(err error) error
- func CustomTokenError(err error) error
- func EncryptPINError(err error) error
- func ExistingPINError(err error) error
- func GenerateAndSendOTPError(err error) error
- func GeneratePinError(err error) error
- func InValidPushTokenLengthError() error
- func InternalServerError(err error) error
- func InvalidCredentialsError() error
- func InvalidFlavourDefinedError() error
- func LikelyToRecommendError(err error) error
- func MissingInputError(value string) error
- func NavigationActionsError(err error) error
- func NormalizeMSISDNError(err error) error
- func PinMismatchError(err error) error
- func PinNotFoundError(err error) error
- func ProfileNotFoundError(err error) error
- func ProfileSuspendFoundError() error
- func RecordDoesNotExistError(err error) error
- func RecordExistsError(err error) error
- func ResolveNudgeErr(err error, flavour feedlib.Flavour, name string, statusCode *int) error
- func RetrieveRecordError(err error) error
- func RoleNotValid(err error) error
- func SaveUserPinError(err error) error
- func SecondaryResourceHardResetError() error
- func UpdateProfileError(err error) error
- func UserNotFoundError(err error) error
- func UsernameInUseError() error
- func ValidatePINDigitsError(err error) error
- func ValidatePINLengthError(err error) error
- func VerifyOTPError(err error) error
- func WrongEnumTypeError(value string) error
Constants ¶
const ( //UsernameInUseErrMsg is the error message displayed when the provided userName is associated with a profile already UsernameInUseErrMsg = "provided username is already in use" //PhoneNumberInUseErrMsg is the error message displayed when a phone number provided is associated with a profile already PhoneNumberInUseErrMsg = "provided phone number is already in use" //EmailInUseErrMsg is the error message displayed when a email provided is associated with a profile already EmailInUseErrMsg = "provided email address is already in use" // UserNotFoundErrMsg is the error message displayed when a user is not found UserNotFoundErrMsg = "failed to get a user" // ProfileNotFoundErrMsg is the error message displayed when a user is not found ProfileNotFoundErrMsg = "failed to get a user profile" // ProfileSuspenedFoundErrMsg is the error message displayed when a user's profile has been suspended ProfileSuspenedFoundErrMsg = "the user profile has been suspended" // PINNotFoundErrMsg is the error message displayed when a pin is not found PINNotFoundErrMsg = "failed to get a user pin" // CustomTokenErrMsg is the error message displayed when a // custom token is not created CustomTokenErrMsg = "failed to create custom token" // AuthenticateTokenErrMsg is the error message displayed when a // custom token is not authenticated AuthenticateTokenErrMsg = "failed to authenticate custom token" // UpdateProfileErrMsg is the error message displayed when a // user profile cannot be updated UpdateProfileErrMsg = "failed to update a user profile" // AddRecordErrMsg is the error message displayed when a // record fails to be added to the database AddRecordErrMsg = "failed to add the record to the database" // LikelyToRecommendErrMsg is the error message displayed that // occurs when the recommendation threshold is crossed LikelyToRecommendErrMsg = "the likelihood of recommending should be an int between 0 and 10" // ValidatePINLengthErrMsg is the error message displayed when // an invalid Pin length is given ValidatePINLengthErrMsg = "pin should be of 4,5, or six digits" // ValidatePINDigitsErrMsg is the error message displayed when // an invalid pin digits are given ValidatePINDigitsErrMsg = "pin should be a valid number" // UsePinExistErrMsg is the error message displayed when // user has pin already during set pin UsePinExistErrMsg = "the user has PIN already" // EncryptPINErrMsg is the error message displayed when // pin encryption fails EncryptPINErrMsg = "unable to encrypt PIN" // RetrieveRecordErrMsg is the error message displayed when a // record fails to be retrieved from database RetrieveRecordErrMsg = "unable to retrieve newly created record" // ExistingPINErrMsg is the error message displayed when a // pin record fails to be retrieved from database ExistingPINErrMsg = "user does not have an existing PIN" // CheckUserPINErrMsg is the error message displayed when // server unable to check if the user has a PIN CheckUserPINErrMsg = "unable to check if the user has a PIN" // GenerateAndSendOTPErrMsg is the error message displayed when a // generate and send otp fails GenerateAndSendOTPErrMsg = "failed to generate and send an otp" // NormalizeMSISDNErrMsg is the error message displayed when // normalize the msisdn(phone number) fails NormalizeMSISDNErrMsg = "unable to normalize the msisdn" // PINMismatchErrMsg is the error message displayed when // the user supplied PIN number does not match the PIN // record we have stored PINMismatchErrMsg = "wrong PIN credentials supplied" // InternalServerErrorMsg is an error message for database CRUD operations that // don't succeed e.g network latency InternalServerErrorMsg = "server error! unable to perform operation" // ValidatePushTokenLengthErrMsg ... ValidatePushTokenLengthErrMsg = "invalid push token detected" // WrongEnumErrMsg is an error message returned when a wrong enum // type is supplied WrongEnumErrMsg = "a wrong enum %s has been provided" // OTPVerificationErrMsg is an error message that is returned when // a given OTP code and Phone number fails verifciation OTPVerificationErrMsg = "failed to verify OTP" // InvalidFlavourDefinedErrMsg for invalid flavour definitions InvalidFlavourDefinedErrMsg = "invalid flavour defined" // InvalidCredentialsErrMsg is displayed when wrong credentials are provided InvalidCredentialsErrMsg = "invalid credentials, expected a username AND password" // SaveUserPinErrMsg is displayed when a user pin is not saved SaveUserPinErrMsg = "unable to save user PIN" // GeneratePinErrMsg is displayed when a user pin is not generated GeneratePinErrMsg = "unable to generate temporary PIN for new user" // BioDataErrMsg is displayed when a user BioData is incomplete BioDataErrMsg = "incomplete Bio Data, expected first and last name" // ResourceUpdateErrMsg is throw when trying to update a resource with empty arguments ResourceUpdateErrMsg = "can't update resource with empty arguments" // ResolveNudgeErrMsg is displayed when a nudge fails to be resolved // It takes the `flavour` and a `name` of the nudge to be more specific ResolveNudgeErrMsg = "failed to resolve %v `%s` nudge" // ResolveNudgeBadStatusErrMsg is displayed when a nudge fails to be resolved // because of an unexpected `Status code` being returned // It takes the `flavour`, `name` and a `StatusCode` f orthe nudge to be more specific ResolveNudgeBadStatusErrMsg = "failed to resolve %v `%s` nudge with status code %v" // RecordExistsErrMsg is the error message displayed an existing record is found RecordExistsErrMsg = "a similar record has been found in the database" // RecordDoesNotExistErrMsg is the error message displayed when a record cannot be found in // the database RecordDoesNotExistErrMsg = "the record cannot be found in the database" //RoleNotValidMsg is an error message displayed when the provided role is not valid // and the user doesn't have permissions to perform an action RoleNotValidMsg = "user role is not valid" NavActionsError = "navigation actions not updated" )
Variables ¶
This section is empty.
Functions ¶
func AddRecordError ¶
AddRecordError is the error message displayed when a record fails to be added to the dataerrorcodeutil
func AuthenticateTokenError ¶
AuthenticateTokenError is the error message displayed when a custom token is not authenticated
func CheckEmailExistError ¶
func CheckEmailExistError() error
CheckEmailExistError returned when the provided email already exists.
func CheckPhoneNumberExistError ¶
func CheckPhoneNumberExistError() error
CheckPhoneNumberExistError check if phone number is registered to another user
func CheckUserPINError ¶
CheckUserPINError is the error message displayed when a server is unable to check if the user has a PIN
func CompleteSignUpError ¶
CompleteSignUpError returns an error message when we are unable to CompleteSignup
func CustomTokenError ¶
CustomTokenError is the error message displayed when a custom token is not created
func EncryptPINError ¶
EncryptPINError is the error message displayed when pin encryption fails
func ExistingPINError ¶
ExistingPINError is the error message displayed when a pin record fails to be retrieved from dataerrorcodeutil
func GenerateAndSendOTPError ¶
GenerateAndSendOTPError is the error message displayed when a generate and send otp fails
func GeneratePinError ¶
GeneratePinError returns an error message when we are unable to generate a temporary PIN
func InValidPushTokenLengthError ¶
func InValidPushTokenLengthError() error
InValidPushTokenLengthError is the error message displayed when an invalid push token is given
func InternalServerError ¶
InternalServerError returns an error if something wrong happened in performing the operation
func InvalidCredentialsError ¶
func InvalidCredentialsError() error
InvalidCredentialsError returns an error message when wrong credentials are provided
func InvalidFlavourDefinedError ¶
func InvalidFlavourDefinedError() error
InvalidFlavourDefinedError is the error message displayed when an invalid flavour is provided as input.
func LikelyToRecommendError ¶
LikelyToRecommendError is the error message displayed that occurs when the recommendation threshold is crossed
func MissingInputError ¶
MissingInputError returns an error when OTP verification fails
func NavigationActionsError ¶
NavigationActionsError return an error when user navigation actions can not be manipulated
func NormalizeMSISDNError ¶
NormalizeMSISDNError returns an error when normalizing the msisdn fails
func PinMismatchError ¶
PinMismatchError displays an error when the supplied PIN does not match the PIN stored
func PinNotFoundError ¶
PinNotFoundError displays error message when a pin is not found
func ProfileNotFoundError ¶
ProfileNotFoundError returns an error message when a profile is not found
func ProfileSuspendFoundError ¶
func ProfileSuspendFoundError() error
ProfileSuspendFoundError is returned is the user profile has been suspended.
func RecordDoesNotExistError ¶
RecordDoesNotExistError is the error message displayed when a record is not found in the DB
func RecordExistsError ¶
RecordExistsError is the error message displayed when a similar record is found in the DB
func ResolveNudgeErr ¶
ResolveNudgeErr is the error that represents the failure of not being able to resolve a given nudge
func RetrieveRecordError ¶
RetrieveRecordError is the error message displayed when a failure occurs while retrieving records from the dataerrorcodeutil
func RoleNotValid ¶
RoleNotValid return an error when a user does not have the required role
func SaveUserPinError ¶
SaveUserPinError returns an error message when we are unable to save a user pin
func SecondaryResourceHardResetError ¶
func SecondaryResourceHardResetError() error
SecondaryResourceHardResetError this error is returned when there argument to reset a resource has a length of 0 resource here means secondary phone numbers and secondary emails
func UpdateProfileError ¶
UpdateProfileError is the error message displayed when a user profile cannot be updated
func UserNotFoundError ¶
UserNotFoundError returns an error message when a user is not found
func UsernameInUseError ¶
func UsernameInUseError() error
UsernameInUseError is the error message displayed when the provided username is associated with another profile
func ValidatePINDigitsError ¶
ValidatePINDigitsError is the error message displayed when invalid pin digits are given
func ValidatePINLengthError ¶
ValidatePINLengthError is the error message displayed when an invalid Pin length is given
func VerifyOTPError ¶
VerifyOTPError returns an error when OTP verification fails
func WrongEnumTypeError ¶
WrongEnumTypeError is the error message displayed when an invalid enum is given
Types ¶
This section is empty.