Documentation ¶
Index ¶
- Variables
- type RndHelper
- func (instance *RndHelper) Between(min, max int64) int64
- func (instance *RndHelper) BetweenDuration(max, min int64) time.Duration
- func (instance *RndHelper) Count(key ...string) int64
- func (instance *RndHelper) Inc(key ...string) int64
- func (instance *RndHelper) NewValuesRandomizer(args ...interface{}) (*ValuesRandomizer, error)
- func (instance *RndHelper) RndChars(n int) string
- func (instance *RndHelper) RndCharsLower(n int) string
- func (instance *RndHelper) RndCharsUpper(n int) string
- func (instance *RndHelper) RndDigits(n int) string
- func (instance *RndHelper) RndId() string
- func (instance *RndHelper) Uuid() string
- func (instance *RndHelper) UuidTimestamp() string
- type ValuesRandomizer
- func (instance *ValuesRandomizer) GetDoneIndexes() []int
- func (instance *ValuesRandomizer) Map() map[string]interface{}
- func (instance *ValuesRandomizer) Next() interface{}
- func (instance *ValuesRandomizer) Save() (err error)
- func (instance *ValuesRandomizer) SaveTo(filename string) (err error)
- func (instance *ValuesRandomizer) String() string
- type ValuesRandomizerParams
- func (instance *ValuesRandomizerParams) AddValue(value interface{}) *ValuesRandomizerParams
- func (instance *ValuesRandomizerParams) Map() map[string]interface{}
- func (instance *ValuesRandomizerParams) ResetValues() *ValuesRandomizerParams
- func (instance *ValuesRandomizerParams) SetValues(values []interface{}) *ValuesRandomizerParams
- func (instance *ValuesRandomizerParams) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NUMBERS = "1234567890" CHARSET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz" CHARSET_LOW = "0123456789abcdefghijklmnopqrstuvwxyz" CHARSET_UP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" )
Functions ¶
This section is empty.
Types ¶
type RndHelper ¶
type RndHelper struct {
// contains filtered or unexported fields
}
var Rnd *RndHelper
func (*RndHelper) BetweenDuration ¶
func (*RndHelper) NewValuesRandomizer ¶
func (instance *RndHelper) NewValuesRandomizer(args ...interface{}) (*ValuesRandomizer, error)
func (*RndHelper) RndCharsLower ¶
func (*RndHelper) RndCharsUpper ¶
func (*RndHelper) UuidTimestamp ¶
type ValuesRandomizer ¶
type ValuesRandomizer struct { Params *ValuesRandomizerParams Autosave bool // contains filtered or unexported fields }
func NewValuesRandomizer ¶
func NewValuesRandomizer(args ...interface{}) (instance *ValuesRandomizer, err error)
func (*ValuesRandomizer) GetDoneIndexes ¶
func (instance *ValuesRandomizer) GetDoneIndexes() []int
func (*ValuesRandomizer) Map ¶
func (instance *ValuesRandomizer) Map() map[string]interface{}
func (*ValuesRandomizer) Next ¶
func (instance *ValuesRandomizer) Next() interface{}
func (*ValuesRandomizer) Save ¶
func (instance *ValuesRandomizer) Save() (err error)
func (*ValuesRandomizer) SaveTo ¶
func (instance *ValuesRandomizer) SaveTo(filename string) (err error)
func (*ValuesRandomizer) String ¶
func (instance *ValuesRandomizer) String() string
type ValuesRandomizerParams ¶
type ValuesRandomizerParams struct { Index int `json:"index,omitempty"` Values []interface{} `json:"values,omitempty"` Mode string `json:"mode,omitempty"` // one of "random" or "sequential" }
func (*ValuesRandomizerParams) AddValue ¶
func (instance *ValuesRandomizerParams) AddValue(value interface{}) *ValuesRandomizerParams
func (*ValuesRandomizerParams) Map ¶
func (instance *ValuesRandomizerParams) Map() map[string]interface{}
func (*ValuesRandomizerParams) ResetValues ¶
func (instance *ValuesRandomizerParams) ResetValues() *ValuesRandomizerParams
func (*ValuesRandomizerParams) SetValues ¶
func (instance *ValuesRandomizerParams) SetValues(values []interface{}) *ValuesRandomizerParams
func (*ValuesRandomizerParams) String ¶
func (instance *ValuesRandomizerParams) String() string
Click to show internal directories.
Click to hide internal directories.