mock

package module
v0.0.0-...-a505e4f Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 12 Imported by: 0

README

Mock - Generate data according to tag

Build Status Go Report Card GoDoc GitHub license gocover.io

License

Pouch is licensed under the MIT License. See LICENSE for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mock

func Mock(v interface{}) (interface{}, error)

Mock Inject mock data into the structure

func MockTag

func MockTag(v interface{}, tag string) (interface{}, error)

MockTag Inject mock data into the structure by tag

func RandDomain

func RandDomain() string

RandDomain Returns a random domain

func RandEmail

func RandEmail() string

RandEmail Returns a random Email

func RandFloat

func RandFloat(min, max float64) float64

RandFloat Returns an float64 between min and max.

func RandFloatStep

func RandFloatStep(min, max, step float64) float64

RandFloatStep Returns an float64 whose step distance between min and max is step.

func RandIPv4

func RandIPv4() string

RandIPv4 Returns a random IPv4 address

func RandIPv6

func RandIPv6() string

RandIPv6 Returns a random IPv6 address

func RandInt

func RandInt(min, max int64) int64

RandInt Returns an int64 between min and max.

func RandIntStep

func RandIntStep(min, max, step int64) int64

RandIntStep Returns an int64 whose step distance between min and max is step.

func RandName

func RandName() string

RandName Returns a random name

func RandText

func RandText() string

RandText Returns a random text

func RandTime

func RandTime(format string) string

RandTime Returns a random time

func RandURL

func RandURL() string

RandURL Returns a random URL

func RandUUID

func RandUUID() string

RandUUID Returns a random UUID

func RandUint

func RandUint(min, max uint64) uint64

RandUint Returns an uint64 between min and max.

func RandUintStep

func RandUintStep(min, max, step uint64) uint64

RandUintStep Returns an uint64 whose step distance between min and max is step.

func RandWord

func RandWord() string

RandWord Returns a random word

Types

This section is empty.

Jump to

Keyboard shortcuts

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