Documentation
¶
Index ¶
- Constants
- type DateConfig
- type Field
- type FloatConfig
- type GenInt32Params
- type GenerationConfig
- func (gc *GenerationConfig) SetDateEnd(end time.Time) *GenerationConfig
- func (gc *GenerationConfig) SetDateFormat(format string) *GenerationConfig
- func (gc *GenerationConfig) SetDateStart(start time.Time) *GenerationConfig
- func (gc *GenerationConfig) SetFloat32Max(max float32) *GenerationConfig
- func (gc *GenerationConfig) SetFloat32Min(min float32) *GenerationConfig
- func (gc *GenerationConfig) SetFloat64Max(max float64) *GenerationConfig
- func (gc *GenerationConfig) SetFloat64Min(min float64) *GenerationConfig
- func (gc *GenerationConfig) SetInt32Max(max int32) *GenerationConfig
- func (gc *GenerationConfig) SetInt32Min(min int32) *GenerationConfig
- func (gc *GenerationConfig) SetInt64Max(max int64) *GenerationConfig
- func (gc *GenerationConfig) SetInt64Min(min int64) *GenerationConfig
- func (gc *GenerationConfig) SetIntMax(max int) *GenerationConfig
- func (gc *GenerationConfig) SetIntMin(min int) *GenerationConfig
- func (gc *GenerationConfig) SetNonRequiredFields(val bool) *GenerationConfig
- func (gc *GenerationConfig) SetSliceLengthMax(max int) *GenerationConfig
- func (gc *GenerationConfig) SetSliceLengthMin(min int) *GenerationConfig
- func (gc *GenerationConfig) SetValueGenerationType(valueGenerationType ValueGenerationType) *GenerationConfig
- type GenerationDefaults
- type GenerationFunc
- type GenerationFunction
- func GenerateBoolFunc() GenerationFunction
- func GenerateDateTimeBetweenDatesFunc(startDate, endDate time.Time) GenerationFunction
- func GenerateDateTimeFunc() GenerationFunction
- func GenerateFixedValueFunc[T any](n T) GenerationFunction
- func GenerateNilValueFunc() GenerationFunction
- func GenerateNumberFunc[n number](min, max *n) GenerationFunction
- func GeneratePointerValueFunc(generationConfig *GenerationConfig, field Field) GenerationFunction
- func GenerateSliceFunc(generationConfig *GenerationConfig, field Field) GenerationFunction
- func GenerateStringFromRegexFunc(regex string) GenerationFunction
- func GenerateStructFunc(generationConfig *GenerationConfig, field Field) GenerationFunction
- type GenerationUnit
- type GenerationValueConfig
- type IntConfig
- type SliceConfig
- type Task
- type TaskName
- type ValueGenerationType
Constants ¶
View Source
const ISO8601 string = "2018-03-20T09:12:28Z"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateConfig ¶
type DateConfig struct {
// contains filtered or unexported fields
}
type FloatConfig ¶
type FloatConfig struct {
// contains filtered or unexported fields
}
type GenInt32Params ¶
type GenInt32Params struct {
// contains filtered or unexported fields
}
type GenerationConfig ¶
type GenerationConfig struct {
GenerationValueConfig
DefaultGenerationFunctions GenerationDefaults
SliceConfig
IntConfig
FloatConfig
DateConfig
}
func NewGenerationConfig ¶
func NewGenerationConfig() (generationConfig *GenerationConfig)
func (*GenerationConfig) SetDateEnd ¶
func (gc *GenerationConfig) SetDateEnd(end time.Time) *GenerationConfig
func (*GenerationConfig) SetDateFormat ¶
func (gc *GenerationConfig) SetDateFormat(format string) *GenerationConfig
func (*GenerationConfig) SetDateStart ¶
func (gc *GenerationConfig) SetDateStart(start time.Time) *GenerationConfig
func (*GenerationConfig) SetFloat32Max ¶
func (gc *GenerationConfig) SetFloat32Max(max float32) *GenerationConfig
func (*GenerationConfig) SetFloat32Min ¶
func (gc *GenerationConfig) SetFloat32Min(min float32) *GenerationConfig
func (*GenerationConfig) SetFloat64Max ¶
func (gc *GenerationConfig) SetFloat64Max(max float64) *GenerationConfig
func (*GenerationConfig) SetFloat64Min ¶
func (gc *GenerationConfig) SetFloat64Min(min float64) *GenerationConfig
func (*GenerationConfig) SetInt32Max ¶
func (gc *GenerationConfig) SetInt32Max(max int32) *GenerationConfig
func (*GenerationConfig) SetInt32Min ¶
func (gc *GenerationConfig) SetInt32Min(min int32) *GenerationConfig
func (*GenerationConfig) SetInt64Max ¶
func (gc *GenerationConfig) SetInt64Max(max int64) *GenerationConfig
func (*GenerationConfig) SetInt64Min ¶
func (gc *GenerationConfig) SetInt64Min(min int64) *GenerationConfig
func (*GenerationConfig) SetIntMax ¶
func (gc *GenerationConfig) SetIntMax(max int) *GenerationConfig
func (*GenerationConfig) SetIntMin ¶
func (gc *GenerationConfig) SetIntMin(min int) *GenerationConfig
func (*GenerationConfig) SetNonRequiredFields ¶
func (gc *GenerationConfig) SetNonRequiredFields(val bool) *GenerationConfig
func (*GenerationConfig) SetSliceLengthMax ¶
func (gc *GenerationConfig) SetSliceLengthMax(max int) *GenerationConfig
func (*GenerationConfig) SetSliceLengthMin ¶
func (gc *GenerationConfig) SetSliceLengthMin(min int) *GenerationConfig
func (*GenerationConfig) SetValueGenerationType ¶
func (gc *GenerationConfig) SetValueGenerationType(valueGenerationType ValueGenerationType) *GenerationConfig
type GenerationDefaults ¶
type GenerationDefaults map[reflect.Kind]GenerationFunction
type GenerationFunc ¶
type GenerationFunc struct {
// contains filtered or unexported fields
}
func (GenerationFunc) Generate ¶
func (f GenerationFunc) Generate() any
type GenerationFunction ¶
type GenerationFunction interface {
Generate() any
}
func GenerateBoolFunc ¶
func GenerateBoolFunc() GenerationFunction
func GenerateDateTimeBetweenDatesFunc ¶
func GenerateDateTimeBetweenDatesFunc(startDate, endDate time.Time) GenerationFunction
func GenerateDateTimeFunc ¶
func GenerateDateTimeFunc() GenerationFunction
func GenerateFixedValueFunc ¶
func GenerateFixedValueFunc[T any](n T) GenerationFunction
func GenerateNilValueFunc ¶
func GenerateNilValueFunc() GenerationFunction
func GenerateNumberFunc ¶
func GenerateNumberFunc[n number](min, max *n) GenerationFunction
func GeneratePointerValueFunc ¶
func GeneratePointerValueFunc(generationConfig *GenerationConfig, field Field) GenerationFunction
func GenerateSliceFunc ¶
func GenerateSliceFunc(generationConfig *GenerationConfig, field Field) GenerationFunction
func GenerateStringFromRegexFunc ¶
func GenerateStringFromRegexFunc(regex string) GenerationFunction
func GenerateStructFunc ¶
func GenerateStructFunc(generationConfig *GenerationConfig, field Field) GenerationFunction
type GenerationUnit ¶
type GenerationUnit struct {
GenerationConfig *GenerationConfig
PreviousValueConfig GenerationValueConfig
CurrentFunction GenerationFunction
// contains filtered or unexported fields
}
func NewGenerationUnit ¶
func NewGenerationUnit(generationConfig *GenerationConfig, field Field, ) *GenerationUnit
func (*GenerationUnit) Generate ¶
func (gu *GenerationUnit) Generate() any
func (*GenerationUnit) SetGenerationDefaultFunctionForKind ¶
func (gu *GenerationUnit) SetGenerationDefaultFunctionForKind(kind reflect.Kind, function GenerationFunction)
type GenerationValueConfig ¶
type GenerationValueConfig struct {
// contains filtered or unexported fields
}
type SliceConfig ¶
type SliceConfig struct {
// contains filtered or unexported fields
}
type Task ¶
func (*Task) GenInt32Params ¶
func (t *Task) GenInt32Params() GenInt32Params
type ValueGenerationType ¶
type ValueGenerationType uint8
const ( Generate ValueGenerationType = iota // will generate all field GenerateOnce // will generate all the fields UseDefaults )
Click to show internal directories.
Click to hide internal directories.