Documentation
¶
Index ¶
- func Address(local ...string) string
- func Boolean(v ...bool) bool
- func CallFunction(fn string) any
- func City(local ...string) string
- func Color(typ string) string
- func Date(format ...string) string
- func DateTime(format ...string) string
- func Domain() string
- func Email() string
- func Float(v ...float64) float64
- func GetLocale(lang ...string) *locale
- func HTTPCode() int64
- func HTTPMethod() string
- func IPv4() string
- func IPv6() string
- func ImageData(n ...int) string
- func ImageURL(n ...int) string
- func Integer(v ...int64) int64
- func JSONSchemaGen(data []byte, opt *GenOption) (any, error)
- func Latitude() float64
- func Longitude() float64
- func LongitudeAndLatitude() string
- func Now(format ...string) string
- func NumberPattern(p string) string
- func OneOf(v ...any) any
- func ProvinceorState(local ...string) string
- func ProvinceorStateCity(local ...string) string
- func Regexp(regstr string) string
- func RegisterFunction(name string, handler FuncHandler)
- func Seek(seed int64)
- func Street(local ...string) string
- func String(model string, n ...int) string
- func StructGen(v any, opt *GenOption) (any, error)
- func Time(format ...string) string
- func Timestamp() int64
- func URL() string
- func UUID() string
- func ZipCode(local ...string) string
- type Args
- func (a Args) At(i int) string
- func (a Args) Bool(i int) bool
- func (a Args) Float(i int) float64
- func (a Args) Int(i int) int
- func (a Args) SliceAny(i ...int) []any
- func (a Args) SliceBool(i ...int) []bool
- func (a Args) SliceFloat(i ...int) []float64
- func (a Args) SliceInt(i ...int) []int
- func (a Args) SliceInt64(i ...int) []int64
- func (a Args) Sub(i ...int) Args
- type FuncHandler
- type Function
- type GenOption
- type JSchema
- type Param
- type PeopleObject
- type TypographyObject
- func (t *TypographyObject) Markdown() string
- func (t *TypographyObject) Paragraph(n ...int) string
- func (t *TypographyObject) Phrase(n ...int) string
- func (t *TypographyObject) Sentence(n ...int) string
- func (t *TypographyObject) Title(n ...int) string
- func (t *TypographyObject) Word(n ...int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallFunction ¶
func HTTPMethod ¶
func HTTPMethod() string
func ImageData ¶
ImageData image base64 data len(n) == 0 default width/heght = imageDefaultSize len(n) == 1 widht == height == n[0] len(n) >= 2 width = n[0] height = n[1]
func ImageURL ¶
ImageURL url image len(n) == 0 default width/heght = imageDefaultSize len(n) == 1 widht == height == n[0] len(n) >= 2 width = n[0] height = n[1]
func NumberPattern ¶
NumberPattern 数字字符串模式 使用#替代数字 example: `(###)##-###` -> `(219)10-231`
func ProvinceorStateCity ¶ added in v0.0.4
ProvinceorStateCity 省市
func RegisterFunction ¶
func RegisterFunction(name string, handler FuncHandler)
Types ¶
type FuncHandler ¶
type Function ¶
func ParseFunction ¶
ParseFunction 解析function eg:funcname(locales...)|args...
type JSchema ¶
type JSchema map[string]json.RawMessage
type PeopleObject ¶
type PeopleObject struct {
// contains filtered or unexported fields
}
func People ¶
func People(local ...string) *PeopleObject
func (*PeopleObject) FirstName ¶
func (p *PeopleObject) FirstName() string
func (*PeopleObject) Gender ¶
func (p *PeopleObject) Gender() string
func (*PeopleObject) IDCard ¶
func (p *PeopleObject) IDCard() string
IDCard 公民唯一号码 中国:身份证号 美国:社会统一保险号
func (*PeopleObject) LastName ¶
func (p *PeopleObject) LastName() string
func (*PeopleObject) Name ¶
func (p *PeopleObject) Name() string
func (*PeopleObject) Phone ¶
func (p *PeopleObject) Phone() string
Phone 生成电话号码 现在基本都是手机了各国基本也都是手机和座机号码基本规则一致
type TypographyObject ¶
type TypographyObject struct {
// contains filtered or unexported fields
}
func Typography ¶
func Typography(local ...string) *TypographyObject
func (*TypographyObject) Markdown ¶
func (t *TypographyObject) Markdown() string
func (*TypographyObject) Paragraph ¶
func (t *TypographyObject) Paragraph(n ...int) string
func (*TypographyObject) Phrase ¶
func (t *TypographyObject) Phrase(n ...int) string
func (*TypographyObject) Sentence ¶
func (t *TypographyObject) Sentence(n ...int) string
func (*TypographyObject) Title ¶
func (t *TypographyObject) Title(n ...int) string
func (*TypographyObject) Word ¶
func (t *TypographyObject) Word(n ...int) string
Click to show internal directories.
Click to hide internal directories.