person

package
v0.0.0-...-e064d8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street  string `json:"street" xml:"Street" fake:"{street}"`
	City    string `json:"city" xml:"City" fake:"{city}"`
	Pincode string `json:"pincode" xml:"Pincode" fake:"{zip}"`
	State   string `json:"state" xml:"State" fake:"{state}"`
	Country string `json:"country" xml:"Country" fake:"{country}"`
}

type GenPersonOptions

type GenPersonOptions struct {
	Concurrency      int
	PredefinedPerson *Person
	// contains filtered or unexported fields
}

type Meta

type Meta struct {
	Age int        `json:"age" xml:"Age" fake:"{number:0,100}"`
	Dob *time.Time `json:"dob" xml:"-"`
}

type Person

type Person struct {
	FirstName string `json:"firstName" xml:"FirstName" fake:"{firstname}"`
	LastName  string `json:"lastName" xml:"LastName" fake:"{lastname}"`
	Address   `json:"address" xml:"Address"`
	Meta      `json:"meta" xml:"Meta"`
}

func GenPersons

func GenPersons(n int, options ...GenPersonOptions) []*Person

GenPersons generates a `n` number of Person(s)

func NewPerson

func NewPerson() *Person

func (*Person) String

func (p *Person) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL