Documentation ¶
Index ¶
- func FormatDate(in *string)
- func FormatDate2(in *string)
- func SetData(fontRegularFS, fontBoldFS, rfzoLogoFS embed.FS) error
- type Document
- type IdDocument
- type MedicalDocument
- func (doc *MedicalDocument) BuildJson() ([]byte, error)
- func (doc *MedicalDocument) BuildPdf() (data []byte, fileName string, retErr error)
- func (doc *MedicalDocument) FormatName() string
- func (doc *MedicalDocument) FormatPlaceAddress() string
- func (doc *MedicalDocument) FormatStreetAddress() string
- type VehicleDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDate ¶
func FormatDate(in *string)
Expects a pointer to a date in the format DDMMYYYY. Modifies, in place, date to format DD.MM.YYYY.
func FormatDate2 ¶ added in v1.5.0
func FormatDate2(in *string)
Expects a pointer to a date in the format YYYYMMDD. Modifies, in place, date to format DD.MM.YYYY.
Types ¶
type Document ¶
type Document interface { BuildPdf() ([]byte, string, error) // Renders document to pdf BuildJson() ([]byte, error) // Renders document to json }
Represents any document handled by Bas Celik
type IdDocument ¶ added in v1.2.0
type IdDocument struct { Portrait image.Image DocumentNumber string DocumentType string DocumentSerialNumber string IssuingDate string ExpiryDate string IssuingAuthority string PersonalNumber string Surname string GivenName string ParentGivenName string Sex string PlaceOfBirth string CommunityOfBirth string StateOfBirth string StateOfBirthCode string DateOfBirth string State string Community string Place string Street string AddressNumber string AddressLetter string AddressEntrance string AddressFloor string AddressApartmentNumber string AddressDate string }
Represents a document stored on a Serbian ID card.
func (*IdDocument) BuildJson ¶ added in v1.4.0
func (doc *IdDocument) BuildJson() ([]byte, error)
func (*IdDocument) BuildPdf ¶ added in v1.2.0
func (doc *IdDocument) BuildPdf() (data []byte, fileName string, retErr error)
func (*IdDocument) FormatAddress ¶ added in v1.4.0
func (doc *IdDocument) FormatAddress() string
func (*IdDocument) FormatName ¶ added in v1.4.0
func (doc *IdDocument) FormatName() string
func (*IdDocument) FormatPlaceOfBirth ¶ added in v1.4.0
func (doc *IdDocument) FormatPlaceOfBirth() string
type MedicalDocument ¶ added in v1.2.0
type MedicalDocument struct { PersonalNumber string Surname string GivenName string ParentName string SurnameCyrl string GivenNameCyrl string ParentNameCyrl string Sex string InsuranceNumber string Language string DateOfBirth string AddressApartmentNumber string AddressNumber string AddressStreet string AddressTown string AddressMunicipality string AddressState string CardIssueDate string CardExpiryDate string ValidUntil string PermanentlyValid bool InsuranceHolderName string InsuranceHolderSurname string InsuranceHolderNameCyrl string InsuranceHolderSurnameCyrl string InsuranceHolderPersonalNumber string InsuranceHolderInsuranceNumber string InsuranceHolderIsFamilyMember bool InsuranceHolderRelation string InsuranceReason string InsuranceStartDate string InsuranceDescription string ObligeeName string ObligeePlace string ObligeeRegistrationNumber string ObligeeIdNumber string ObligeeActivity string }
Represents a document stored on a Serbian public medical insurance card.
func (*MedicalDocument) BuildJson ¶ added in v1.4.0
func (doc *MedicalDocument) BuildJson() ([]byte, error)
func (*MedicalDocument) BuildPdf ¶ added in v1.2.0
func (doc *MedicalDocument) BuildPdf() (data []byte, fileName string, retErr error)
func (*MedicalDocument) FormatName ¶ added in v1.4.0
func (doc *MedicalDocument) FormatName() string
func (*MedicalDocument) FormatPlaceAddress ¶ added in v1.4.0
func (doc *MedicalDocument) FormatPlaceAddress() string
func (*MedicalDocument) FormatStreetAddress ¶ added in v1.4.0
func (doc *MedicalDocument) FormatStreetAddress() string
type VehicleDocument ¶ added in v1.4.0
type VehicleDocument struct { AuthorityIssuing string ColourOfVehicle string CommercialDescription string CompetentAuthority string DateOfFirstRegistration string EngineCapacity string EngineIdNumber string EngineRatedSpeed string ExpiryDate string HomologationMark string IssuingDate string MaximumNetPower string MaximumPermissibleLadenMass string NumberOfAxles string NumberOfSeats string NumberOfStandingPlaces string OwnerAddress string OwnerName string OwnersPersonalNo string OwnersSurnameOrBusinessName string PowerWeightRatio string RegistrationNumberOfVehicle string SerialNumber string StateIssuing string TypeApprovalNumber string TypeOfFuel string UnambiguousNumber string UsersAddress string UsersName string UsersPersonalNo string UsersSurnameOrBusinessName string VehicleCategory string VehicleIdNumber string VehicleLoad string VehicleMake string VehicleMass string VehicleType string YearOfProduction string }
Represents a document stored on a Serbian vehicle card. Fields are named according to official API.
func (*VehicleDocument) BuildJson ¶ added in v1.4.0
func (doc *VehicleDocument) BuildJson() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.