faker

package
v0.0.0-...-0e53cf7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset map[Sex]Gender

type Fake

type Fake struct {
	Assets map[string]Asset
	Hosts  []string // Хосты для почты
}

type FakeData

type FakeData struct {
	Name   string
	Gender []Gender // Может быть более 2-х полов, для тех кто не определился
	Hosts  []string // Хосты для почты
}

FakeData данные для генерации.

type Faker

type Faker struct {
	// contains filtered or unexported fields
}

func New

func New(data *Fake) *Faker

func (*Faker) MakePerson

func (f *Faker) MakePerson(asset string, sex Sex) models.Person

type Gender

type Gender struct {
	Surname    []string
	Name       []string
	Patronymic []string
}

Gender содержит данные для одного пола.

type Sex

type Sex int
const (
	All Sex = iota
	Female
	Male
)

func ParseSex

func ParseSex(sex string) Sex

func (Sex) String

func (s Sex) String() string

Jump to

Keyboard shortcuts

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