Versions in this module Expand all Collapse all v0 v0.2.0 Jan 15, 2018 v0.1.0 Dec 3, 2017 Changes in this version + var DebugMode = false + func Build(f *Factory, opts ...factoryOption) *buildTo + func BuildSlice(f *Factory, count int, opts ...factoryOption) *buildSliceTo + func Create(f *Factory, opts ...factoryOption) *createTo + func CreateSlice(f *Factory, count int, opts ...factoryOption) *createSliceTo + func Delete(f *Factory, instance interface{}) error + func SetDB(db *sql.DB) + func WithField(name string, value interface{}) factoryOption + func WithTraits(traits ...string) factoryOption + type AssociationFieldValue struct + AssociationReferenceField string + Factory *Factory + OriginalFactory *Factory + ReferenceField string + type Callback func(model interface{}) error + type DynamicFieldValue func(model interface{}) (interface{}, error) + type Factory struct + AfterBuildCallbacks []Callback + AfterCreateCallbacks []Callback + AssociationFieldValues map[string]*AssociationFieldValue + BeforeCreateCallbacks []Callback + CanHaveAssociations bool + CanHaveCallbacks bool + CanHaveTraits bool + DynamicFieldValues map[string]DynamicFieldValue + FiledValues map[string]interface{} + ModelType reflect.Type + SequenceFiledValues map[string]*sequenceValue + Table string + Traits map[string]*Factory + func (f *Factory) AddSequenceFiledValue(name string, first int64, value SequenceFieldValue) + type SequenceFieldValue func(n int64) (interface{}, error)