✨ Added PassportElementError methods
This commit is contained in:
parent
b3f324e1b3
commit
3439346e60
|
@ -89,7 +89,11 @@ type (
|
|||
|
||||
// PassportElementError represents an error in the Telegram Passport element
|
||||
// which was submitted that should be resolved by the user.
|
||||
PassportElementError interface{}
|
||||
PassportElementError interface {
|
||||
PassportElementErrorMessage() string
|
||||
PassportElementErrorSource() string
|
||||
PassportElementErrorType() string
|
||||
}
|
||||
|
||||
// PassportElementErrorDataField represents an issue in one of the data
|
||||
// fields that was provided by the user. The error is considered resolved
|
||||
|
|
|
@ -0,0 +1,217 @@
|
|||
package telegram
|
||||
|
||||
func (peedf *PassportElementErrorDataField) PassportElementErrorMessage() string {
|
||||
if peedf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peedf.Message
|
||||
}
|
||||
|
||||
func (peedf *PassportElementErrorDataField) PassportElementErrorSource() string {
|
||||
if peedf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peedf.Source
|
||||
}
|
||||
|
||||
func (peedf *PassportElementErrorDataField) PassportElementErrorType() string {
|
||||
if peedf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peedf.Type
|
||||
}
|
||||
|
||||
func (peeff *PassportElementErrorFrontSide) PassportElementErrorMessage() string {
|
||||
if peeff == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peeff.Message
|
||||
}
|
||||
|
||||
func (peeff *PassportElementErrorFrontSide) PassportElementErrorSource() string {
|
||||
if peeff == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peeff.Source
|
||||
}
|
||||
|
||||
func (peeff *PassportElementErrorFrontSide) PassportElementErrorType() string {
|
||||
if peeff == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peeff.Type
|
||||
}
|
||||
|
||||
func (peerf *PassportElementErrorReverseSide) PassportElementErrorMessage() string {
|
||||
if peerf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peerf.Message
|
||||
}
|
||||
|
||||
func (peerf *PassportElementErrorReverseSide) PassportElementErrorSource() string {
|
||||
if peerf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peerf.Source
|
||||
}
|
||||
|
||||
func (peerf *PassportElementErrorReverseSide) PassportElementErrorType() string {
|
||||
if peerf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peerf.Type
|
||||
}
|
||||
|
||||
func (pees *PassportElementErrorSelfie) PassportElementErrorMessage() string {
|
||||
if pees == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return pees.Message
|
||||
}
|
||||
|
||||
func (pees *PassportElementErrorSelfie) PassportElementErrorSource() string {
|
||||
if pees == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return pees.Source
|
||||
}
|
||||
|
||||
func (pees *PassportElementErrorSelfie) PassportElementErrorType() string {
|
||||
if pees == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return pees.Type
|
||||
}
|
||||
|
||||
func (peef *PassportElementErrorFile) PassportElementErrorMessage() string {
|
||||
if peef == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peef.Message
|
||||
}
|
||||
|
||||
func (peef *PassportElementErrorFile) PassportElementErrorSource() string {
|
||||
if peef == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peef.Source
|
||||
}
|
||||
|
||||
func (peef *PassportElementErrorFile) PassportElementErrorType() string {
|
||||
if peef == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peef.Type
|
||||
}
|
||||
|
||||
func (peef *PassportElementErrorFiles) PassportElementErrorMessage() string {
|
||||
if peef == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peef.Message
|
||||
}
|
||||
|
||||
func (peef *PassportElementErrorFiles) PassportElementErrorSource() string {
|
||||
if peef == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peef.Source
|
||||
}
|
||||
|
||||
func (peef *PassportElementErrorFiles) PassportElementErrorType() string {
|
||||
if peef == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peef.Type
|
||||
}
|
||||
|
||||
func (peetf *PassportElementErrorTranslationFile) PassportElementErrorMessage() string {
|
||||
if peetf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peetf.Message
|
||||
}
|
||||
|
||||
func (peetf *PassportElementErrorTranslationFile) PassportElementErrorSource() string {
|
||||
if peetf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peetf.Source
|
||||
}
|
||||
|
||||
func (peetf *PassportElementErrorTranslationFile) PassportElementErrorType() string {
|
||||
if peetf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peetf.Type
|
||||
}
|
||||
|
||||
func (peetf *PassportElementErrorTranslationFiles) PassportElementErrorMessage() string {
|
||||
if peetf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peetf.Message
|
||||
}
|
||||
|
||||
func (peetf *PassportElementErrorTranslationFiles) PassportElementErrorSource() string {
|
||||
if peetf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peetf.Source
|
||||
}
|
||||
|
||||
func (peetf *PassportElementErrorTranslationFiles) PassportElementErrorType() string {
|
||||
if peetf == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peetf.Type
|
||||
}
|
||||
|
||||
func (peeu *PassportElementErrorUnspecified) PassportElementErrorMessage() string {
|
||||
if peeu == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peeu.Message
|
||||
}
|
||||
|
||||
func (peeu *PassportElementErrorUnspecified) PassportElementErrorSource() string {
|
||||
if peeu == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peeu.Source
|
||||
}
|
||||
|
||||
func (peeu *PassportElementErrorUnspecified) PassportElementErrorType() string {
|
||||
if peeu == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return peeu.Type
|
||||
}
|
Loading…
Reference in New Issue