Documentation ¶
Index ¶
- Variables
- func MainModule(args map[string]interface{}, out io.Writer) (err error)
- func MarshalCSV(people []Person, out io.Writer) (err error)
- func SetFilter(newFields []string) error
- type CartaCredito
- type Credentials
- type DateFormat
- type DrivingLicense
- type Iban
- type Person
- func (p *Person) Address() string
- func (p *Person) BirthDate() string
- func (p *Person) BirthDistrict() string
- func (p *Person) BirthTown() string
- func (p *Person) CartaCredito() *CartaCredito
- func (p *Person) CodiceFiscale() (cf string)
- func (p *Person) Credentials() *Credentials
- func (p *Person) DrivingLicense() *DrivingLicense
- func (p *Person) FirstName() string
- func (p *Person) Gender() string
- func (p *Person) IBAN() *Iban
- func (p *Person) ID() string
- func (p *Person) LastName() string
- func (p Person) MarshalCSV() []string
- func (p *Person) MarshalJSON() (b []byte, err error)
- func (p *Person) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
- func (p *Person) PartitaIva() (pi string, county string)
- func (p *Person) Phone() string
- func (p Person) String() string
Constants ¶
This section is empty.
Variables ¶
var AllFields []string
AllFields exports a []string with all the fields set
Functions ¶
func MainModule ¶
MainModule gets the arguments from CLI and launches the appropriate functions
func MarshalCSV ¶
MarshalCSV prints a marshaled CSV
Types ¶
type CartaCredito ¶
CartaCredito exports the number, CVV, Issuer and expiry date of a credit card
func (*CartaCredito) String ¶
func (cc *CartaCredito) String() string
type Credentials ¶
Credentials exports username and password
type DateFormat ¶
type DateFormat int
DateFormat exports the format of the date. Can be 1,2 or anything else. 1 (us format) is MM/DD/YYYY 2 (ja format) is YYYY/MM/DD anything else is formatted in the european style (default) DD/MM/YYYY
var LocalizDate DateFormat
LocalizDate is a variable containing the format to use. Set this variable to change the way dates are formatted. See "DateFormat" for more.
func NewDateFormat ¶
func NewDateFormat(fmt string) DateFormat
NewDateFormat sets DateFormat as an int from a passed string
func (DateFormat) Format ¶
func (d DateFormat) Format() string
Format returns the date formatted as the DateFormat variable is set
type DrivingLicense ¶
DrivingLicense exports the number, issuer and the expiration date
func (*DrivingLicense) String ¶
func (drv *DrivingLicense) String() string
type Person ¶
type Person struct {
// contains filtered or unexported fields
}
Person represents a person object. It must be initialized by the generator.
func RandomPeople ¶
RandomPeople generates 'count' people with the same restriction of age
func (*Person) Address ¶
Address returns a person's address and sets the location for the partita iva field.
func (*Person) BirthDate ¶
BirthDate is a person birth date formatted using the globally specified format
func (*Person) BirthDistrict ¶
BirthDistrict is the name and label of the city the person was birth in
func (*Person) CartaCredito ¶
func (p *Person) CartaCredito() *CartaCredito
CartaCredito returns a valid CartaCredito object with credit card number, cvv, issuer and expiration date.
func (*Person) CodiceFiscale ¶
CodiceFiscale generates a valid italian codice fiscale
func (*Person) Credentials ¶
func (p *Person) Credentials() *Credentials
Credentials returns fictitious credentials for an identity. The username is correlated at the person's name and year of birth.
func (*Person) DrivingLicense ¶
func (p *Person) DrivingLicense() *DrivingLicense
DrivingLicense returns a Italian driving license number
func (Person) MarshalCSV ¶
MarshalCSV returns a []string that can be passed to an encoding/csv.Writer.Write() call
func (*Person) MarshalJSON ¶
MarshalJSON is the implementation of encoding/json.Marshaler
func (*Person) MarshalXML ¶
MarshalXML is the implementation of encoding/xml.Marshaler
func (*Person) PartitaIva ¶
PartitaIva returns a valid partita iva number and place of issue.