Documentation ¶
Index ¶
- type Credentials
- type DataCredentials
- type DataType
- type ErrorSource
- type FileCredentials
- type Gender
- type IDDocumentData
- type PassportElementError
- type PassportElementErrorDataField
- type PassportElementErrorFile
- type PassportElementErrorFiles
- type PassportElementErrorFrontSide
- type PassportElementErrorReverseSide
- type PassportElementErrorSelfie
- type PassportElementErrorTranslationFile
- type PassportElementErrorTranslationFiles
- type PassportElementErrorUnspecified
- type PersonalDetails
- type ResidentialAddress
- type SecureData
- type SecureValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { SecureData SecureData `json:"secure_data"` Nonce string `json:"nonce"` }
Credentials is a JSON-serialized object.
type DataCredentials ¶
DataCredentials can be used to decrypt encrypted data from the data field in EncryptedPassportElement.
type DataType ¶
type DataType interface { PersonalDetails | ResidentialAddress | IDDocumentData }
DataType represents any type of data.
type ErrorSource ¶
type ErrorSource interface {
// contains filtered or unexported methods
}
ErrorSource interface.
type FileCredentials ¶
FileCredentials can be used to decrypt encrypted files from the front_side, reverse_side, selfie, files and translation fields in EncryptedPassportElement.
type IDDocumentData ¶
type IDDocumentData struct { DocumentNo string `json:"document_no"` ExpiryDate string `json:"expiry_date"` // in DD.MM.YYYY format }
IDDocumentData represents the data of an identity document.
type PassportElementError ¶
type PassportElementError struct { Type string Message string ErrorSource }
PassportElementError represents an error in the Telegram Passport element which was submitted that should be resolved by the user.
func (*PassportElementError) MarshalJSON ¶
func (e *PassportElementError) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
type PassportElementErrorDataField ¶
type PassportElementErrorDataField struct { FieldName string `json:"field_name"` DataHash string `json:"data_hash"` // base64-encoded }
PassportElementErrorDataField represents an issue in one of the data fields that was provided by the user.
type PassportElementErrorFile ¶
type PassportElementErrorFile struct {
FileHash string `json:"file_hash"` // base64-encoded
}
PassportElementErrorFile represents an issue with a document scan.
type PassportElementErrorFiles ¶
type PassportElementErrorFiles struct {
FileHashes []string `json:"file_hashes"` // base64-encoded
}
PassportElementErrorFiles represents an issue with a list of scans.
type PassportElementErrorFrontSide ¶
type PassportElementErrorFrontSide struct {
FileHash string `json:"file_hash"` // base64-encoded
}
PassportElementErrorFrontSide represents an issue with the front side of a document.
type PassportElementErrorReverseSide ¶
type PassportElementErrorReverseSide struct {
FileHash string `json:"file_hash"` // base64-encoded
}
PassportElementErrorReverseSide represents an issue with the reverse side of a document.
type PassportElementErrorSelfie ¶
type PassportElementErrorSelfie struct {
FileHash string `json:"file_hash"` // base64-encoded
}
PassportElementErrorSelfie represents an issue with the selfie with a document.
type PassportElementErrorTranslationFile ¶
type PassportElementErrorTranslationFile struct {
FileHash string `json:"file_hash"` // base64-encoded
}
PassportElementErrorTranslationFile represents an issue with one of the files that constitute the translation of a document.
type PassportElementErrorTranslationFiles ¶
type PassportElementErrorTranslationFiles struct {
FileHashes []string `json:"file_hashes"` // base64-encoded
}
PassportElementErrorTranslationFiles represents an issue with the translated version of a document.
type PassportElementErrorUnspecified ¶
type PassportElementErrorUnspecified struct {
ElementHash string `json:"element_hash"` // base64-encoded
}
PassportElementErrorUnspecified represents an issue in an unspecified place.
type PersonalDetails ¶
type PersonalDetails struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` MiddleName string `json:"middle_name"` BirthDate string `json:"birth_date"` // in DD.MM.YYYY format Gender Gender `json:"gender"` CountryCode string `json:"country_code"` // ISO 3166-1 alpha-2 country code ResidenceCountryCode string `json:"residence_country_code"` // ISO 3166-1 alpha-2 country code FirstNameNative string `json:"first_name_native"` LastNameNative string `json:"last_name_native"` MiddleNameNative string `json:"middle_name_native"` }
PersonalDetails represents personal details.
type ResidentialAddress ¶
type ResidentialAddress struct { StreetLine1 string `json:"street_line1"` StreetLine2 string `json:"street_line2"` City string `json:"city"` State string `json:"state"` CountryCode string `json:"country_code"` // ISO 3166-1 alpha-2 country code PostCode string `json:"post_code"` }
ResidentialAddress represents a residential address.
type SecureData ¶
type SecureData struct { PersonalDetails *SecureValue `json:"personal_details"` Passport *SecureValue `json:"passport"` InternalPassport *SecureValue `json:"internal_passport"` DriverLicense *SecureValue `json:"driver_license"` IdentityCard *SecureValue `json:"identity_card"` Address *SecureValue `json:"address"` UtilityBill *SecureValue `json:"utility_bill"` BankStatement *SecureValue `json:"bank_statement"` RentalAgreement *SecureValue `json:"rental_agreement"` PassportRegistration *SecureValue `json:"passport_registration"` TemporaryRegistration *SecureValue `json:"temporary_registration"` }
SecureData represents the credentials required to decrypt encrypted data. All fields are optional and depend on fields that were requested.
type SecureValue ¶
type SecureValue struct { Data *DataCredentials `json:"data"` FrontSide *FileCredentials `json:"front_side"` ReverseSide *FileCredentials `json:"reverse_side"` Selfie *FileCredentials `json:"selfie"` Translation []FileCredentials `json:"translation"` Files []FileCredentials `json:"files"` }
SecureValue represents the credentials required to decrypt encrypted values. All fields are optional and depend on the type of fields that were requested.