Documentation
¶
Index ¶
- Variables
- func GenerateIpV4Address(containDNSs bool) string
- func GeneratePort(max int) string
- func GenerateRandomAddress()
- func GenerateRandomDate(max, min int) (string, int)
- func IsIpV4Valid(ip string, containDNSs bool) bool
- type Address
- func (addr *Address) Address(args ...float64) string
- func (addr *Address) BuildingNumber(length int) string
- func (addr *Address) City(args ...float64) string
- func (addr *Address) District(args ...float64) string
- func (addr *Address) Province(args ...float64) string
- func (addr *Address) StreetAddress(length int, args ...float64) string
- func (addr *Address) StreetName(args ...float64) string
- type BaseAddress
- type Company
- type Experience
- type Job
- type Location
- type Mobile
- type PersonName
- type Profile
- type SSN
- type School
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "0.0.5"
v0.0.1 zh_CN address generator
v0.0.1+4 random alg
v0.0.2 ipv4 address generator
v0.0.2+1 location generator
v0.0.2+2 mobile(zh_CN) generator
v0.0.2+3 ssn(zh_CN) generator
v0.0.3 profile generator
v0.0.3+1 name generator
v0.0.4 education generator
v0.0.5 add education to profile
Functions ¶
func GenerateIpV4Address ¶
func GeneratePort ¶
func GenerateRandomAddress ¶
func GenerateRandomAddress()
func GenerateRandomDate ¶
func IsIpV4Valid ¶
Types ¶
type Address ¶
func (*Address) BuildingNumber ¶
func (*Address) StreetAddress ¶
func (*Address) StreetName ¶
type BaseAddress ¶
type Experience ¶
type Experience struct {
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Institution string `json:"institution"`
Content string `json:"content"`
}
func GenerateSchoolExperience ¶
func GenerateSchoolExperience(grades int, currentAge int, locale string) ([]Experience, int)
grade > 0 primary school 6 years,
grade = 1 middle school 3 years,
grade = 2 high school 3 years,
grade = 3 university bachelor 4 years,
grade = 4 university master 3 years,
grade = 5 university doctor 4 years,
grade = 6 others 3 years 中专
grade = 7 others 5 years 大专
September to July ¶
studyStartAge = one of [5,6,7,8]
func GenerateWorkExperiences ¶
func GenerateWorkExperiences(times, years int, locale string) []Experience
times is the number join work
years is the number form when to now
func (*Experience) ToString ¶
func (e *Experience) ToString() string
type Location ¶
type Location struct {
Longitude string // 经度 0-180
Latitude string // 维度 0-90
WE string
NS string
}
func (*Location) GetPositon ¶
type PersonName ¶
type PersonName struct {
Locale string
Firstname string
Lastname string
Gender bool
Pinyin string //only for chinese names
// contains filtered or unexported fields
}
func (*PersonName) Generate ¶
func (p *PersonName) Generate(args ...float64)
func (*PersonName) ToString ¶
func (p *PersonName) ToString(withPinyin bool) string
type Profile ¶
type Profile struct {
Name string `json:"name"`
Gender bool `json:"gender"`
IdNumber string `json:"idNumber"`
MobileNumber string `json:"mobile"`
Locale string
HomeAddress string `json:"homeAddress"`
WorkExperiences []Experience `json:"workExperiences"`
Description string `json:"description"`
Age int `json:"age"`
EducationExperiences []Experience `json:"educationExperiences"` // 至少初中毕业,高中毕业,大学毕业,硕士,博士,大专
// contains filtered or unexported fields
}
func (*Profile) FormatExperice ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.