Documentation ¶
Index ¶
- Constants
- func CloneBool(datum *bool) *bool
- func CloneFloat64(datum *float64) *float64
- func CloneInt(datum *int) *int
- func CloneString(datum *string) *string
- func CloneStringArray(datum *[]string) *[]string
- func CloneTime(datum *time.Time) *time.Time
- func ExpectSerializedBSON(object interface{}, expected interface{})
- func ExpectSerializedJSON(object interface{}, expected interface{})
- func NewObjectFromBool(source bool, objectFormat ObjectFormat) interface{}
- func NewObjectFromDuration(source time.Duration, objectFormat ObjectFormat) interface{}
- func NewObjectFromFloat64(source float64, objectFormat ObjectFormat) interface{}
- func NewObjectFromInt(source int, objectFormat ObjectFormat) interface{}
- func NewObjectFromString(source string, objectFormat ObjectFormat) interface{}
- func NewObjectFromStringArray(source []string, objectFormat ObjectFormat) interface{}
- func NewObjectFromTime(source time.Time, objectFormat ObjectFormat) interface{}
- func NewString(length int, charset string) string
- func NewText(minimumLength int, maximumLength int) string
- func NewTime() time.Time
- func NewTimeInRange(earliest time.Time, latest time.Time) time.Time
- func NewVariableString(minimumLength int, maximumLength int, charset string) string
- func RandomBool() bool
- func RandomBytes() []byte
- func RandomBytesFromRange(minimumLength int, maximumLength int) []byte
- func RandomBytesLengthMaximum() int
- func RandomBytesLengthMinimum() int
- func RandomDuration() time.Duration
- func RandomDurationFromArray(array []time.Duration) time.Duration
- func RandomDurationFromRange(minimum time.Duration, maximum time.Duration) time.Duration
- func RandomDurationMaximum() time.Duration
- func RandomDurationMinimum() time.Duration
- func RandomFloat64() float64
- func RandomFloat64FromArray(array []float64) float64
- func RandomFloat64FromRange(minimum float64, maximum float64) float64
- func RandomFloat64Maximum() float64
- func RandomFloat64Minimum() float64
- func RandomInt() int
- func RandomIntFromArray(array []int) int
- func RandomIntFromRange(minimum int, maximum int) int
- func RandomIntMaximum() int
- func RandomIntMinimum() int
- func RandomString() string
- func RandomStringArray() []string
- func RandomStringArrayFromRange(minimumLength int, maximumLength int) []string
- func RandomStringArrayFromRangeAndArrayWithDuplicates(minimumLength int, maximumLength int, array []string) []string
- func RandomStringArrayFromRangeAndArrayWithoutDuplicates(minimumLength int, maximumLength int, array []string) []string
- func RandomStringArrayFromRangeAndCharset(minimumLength int, maximumLength int, charset string) []string
- func RandomStringArrayFromRangeAndGeneratorWithDuplicates(minimumLength int, maximumLength int, generator func() string) []string
- func RandomStringArrayFromRangeAndGeneratorWithoutDuplicates(minimumLength int, maximumLength int, generator func() string) []string
- func RandomStringArrayLengthMaximum() int
- func RandomStringArrayLengthMinimum() int
- func RandomStringFromArray(array []string) string
- func RandomStringFromCharset(charset string) string
- func RandomStringFromRange(minimumLength int, maximumLength int) string
- func RandomStringFromRangeAndCharset(minimumLength int, maximumLength int, charset string) string
- func RandomStringLengthMaximum() int
- func RandomStringLengthMinimum() int
- func RandomTemporaryDirectory() string
- func RandomTemporaryFile() *os.File
- func RandomTime() time.Time
- func RandomTimeFromArray(array []time.Time) time.Time
- func RandomTimeFromRange(minimum time.Time, maximum time.Time) time.Time
- func RandomTimeMaximum() time.Time
- func RandomTimeMinimum() time.Time
- func TimeMaximum() time.Time
- func TimeMinimum() time.Time
- type Closer
- type Mock
- type ObjectFormat
- type ReadOutput
- type Reader
Constants ¶
View Source
const ( CharsetUppercase = "ABCDEFGHIJKLMNOPQRSTUVWYXZ" CharsetLowercase = "abcdefghijklmnopqrstuvwxyz" CharsetNumeric = "1234567890" CharsetWhitespace = " " CharsetSymbols = "!\"#$%&'()*+,-./:;<=>@\\]^_`{|}~" CharsetAlpha = CharsetUppercase + CharsetLowercase CharsetAlphaNumeric = CharsetUppercase + CharsetLowercase + CharsetNumeric CharsetText = CharsetAlphaNumeric + CharsetWhitespace + CharsetSymbols CharsetHexidecimalLowercase = CharsetNumeric + "abcdef" )
View Source
const TimeLimit = 365 * 24 * time.Hour
Variables ¶
This section is empty.
Functions ¶
func CloneFloat64 ¶ added in v1.24.0
func CloneString ¶ added in v1.24.0
func CloneStringArray ¶ added in v1.24.0
func ExpectSerializedBSON ¶ added in v1.27.0
func ExpectSerializedBSON(object interface{}, expected interface{})
func ExpectSerializedJSON ¶ added in v1.27.0
func ExpectSerializedJSON(object interface{}, expected interface{})
func NewObjectFromBool ¶ added in v1.27.0
func NewObjectFromBool(source bool, objectFormat ObjectFormat) interface{}
func NewObjectFromDuration ¶ added in v1.27.0
func NewObjectFromDuration(source time.Duration, objectFormat ObjectFormat) interface{}
func NewObjectFromFloat64 ¶ added in v1.27.0
func NewObjectFromFloat64(source float64, objectFormat ObjectFormat) interface{}
func NewObjectFromInt ¶ added in v1.27.0
func NewObjectFromInt(source int, objectFormat ObjectFormat) interface{}
func NewObjectFromString ¶ added in v1.27.0
func NewObjectFromString(source string, objectFormat ObjectFormat) interface{}
func NewObjectFromStringArray ¶ added in v1.27.0
func NewObjectFromStringArray(source []string, objectFormat ObjectFormat) interface{}
func NewObjectFromTime ¶ added in v1.27.0
func NewObjectFromTime(source time.Time, objectFormat ObjectFormat) interface{}
func NewTimeInRange ¶ added in v1.24.0
func NewVariableString ¶
func RandomBool ¶ added in v1.26.0
func RandomBool() bool
func RandomBytes ¶ added in v1.27.0
func RandomBytes() []byte
func RandomBytesFromRange ¶ added in v1.27.0
func RandomBytesLengthMaximum ¶ added in v1.27.0
func RandomBytesLengthMaximum() int
func RandomBytesLengthMinimum ¶ added in v1.27.0
func RandomBytesLengthMinimum() int
func RandomDuration ¶ added in v1.27.0
func RandomDurationFromArray ¶ added in v1.27.0
func RandomDurationFromRange ¶ added in v1.27.0
func RandomDurationMaximum ¶ added in v1.27.0
func RandomDurationMinimum ¶ added in v1.27.0
func RandomFloat64 ¶ added in v1.27.0
func RandomFloat64() float64
func RandomFloat64FromArray ¶ added in v1.26.0
func RandomFloat64FromRange ¶ added in v1.24.0
func RandomFloat64Maximum ¶ added in v1.27.0
func RandomFloat64Maximum() float64
func RandomFloat64Minimum ¶ added in v1.27.0
func RandomFloat64Minimum() float64
func RandomIntFromArray ¶ added in v1.26.0
func RandomIntFromRange ¶ added in v1.24.0
func RandomIntMaximum ¶ added in v1.27.0
func RandomIntMaximum() int
func RandomIntMinimum ¶ added in v1.27.0
func RandomIntMinimum() int
func RandomString ¶ added in v1.27.0
func RandomString() string
func RandomStringArray ¶ added in v1.27.0
func RandomStringArray() []string
func RandomStringArrayFromRange ¶ added in v1.27.0
func RandomStringArrayFromRangeAndArrayWithDuplicates ¶ added in v1.27.0
func RandomStringArrayFromRangeAndArrayWithoutDuplicates ¶ added in v1.27.0
func RandomStringArrayFromRangeAndCharset ¶ added in v1.27.0
func RandomStringArrayFromRangeAndGeneratorWithDuplicates ¶ added in v1.27.0
func RandomStringArrayFromRangeAndGeneratorWithoutDuplicates ¶ added in v1.27.0
func RandomStringArrayLengthMaximum ¶ added in v1.27.0
func RandomStringArrayLengthMaximum() int
func RandomStringArrayLengthMinimum ¶ added in v1.27.0
func RandomStringArrayLengthMinimum() int
func RandomStringFromArray ¶ added in v1.26.0
func RandomStringFromCharset ¶ added in v1.27.0
func RandomStringFromRange ¶ added in v1.27.0
func RandomStringFromRangeAndCharset ¶ added in v1.27.0
func RandomStringLengthMaximum ¶ added in v1.27.0
func RandomStringLengthMaximum() int
func RandomStringLengthMinimum ¶ added in v1.27.0
func RandomStringLengthMinimum() int
func RandomTemporaryDirectory ¶ added in v1.27.0
func RandomTemporaryDirectory() string
func RandomTemporaryFile ¶ added in v1.27.0
func RandomTime ¶ added in v1.27.0
func RandomTimeFromRange ¶ added in v1.27.0
func RandomTimeMaximum ¶ added in v1.27.0
func RandomTimeMinimum ¶ added in v1.27.0
func TimeMaximum ¶ added in v1.24.0
func TimeMinimum ¶ added in v1.24.0
Types ¶
type Closer ¶ added in v1.27.0
type Closer struct { CloseInvocations int CloseStub func() error CloseOutputs []error CloseOutput *error }
func (*Closer) AssertOutputsEmpty ¶ added in v1.27.0
func (c *Closer) AssertOutputsEmpty()
type Mock ¶
type Mock struct {
ID string
}
func (*Mock) Expectations ¶
func (m *Mock) Expectations()
type ObjectFormat ¶ added in v1.27.0
type ObjectFormat int
const ( ObjectFormatBSON ObjectFormat = iota ObjectFormatJSON )
type ReadOutput ¶ added in v1.27.0
type Reader ¶ added in v1.27.0
type Reader struct { ReadInvocations int ReadInputs [][]byte ReadStub func(bytes []byte) (int, error) ReadOutputs []ReadOutput ReadOutput *ReadOutput }
func (*Reader) AssertOutputsEmpty ¶ added in v1.27.0
func (r *Reader) AssertOutputsEmpty()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.