Documentation ¶
Overview ¶
Code generated by carrier, DO NOT EDIT.
Code generated by carrier, DO NOT EDIT.
Code generated by carrier, DO NOT EDIT.
Code generated by carrier, DO NOT EDIT.
Index ¶
- Constants
- func EntCarTrait() *entCarTrait
- func EntGroupTrait() *entGroupTrait
- func EntUserTrait() *entUserTrait
- type Counter
- type EntCarBuilder
- func (b *EntCarBuilder) Client(c *ten.Client) *EntCarBuilder
- func (b *EntCarBuilder) Create(ctx context.Context) (*ten.Car, error)
- func (b *EntCarBuilder) CreateBatch(ctx context.Context, n int) ([]*ten.Car, error)
- func (b *EntCarBuilder) CreateBatchV(ctx context.Context, n int) ([]ten.Car, error)
- func (b *EntCarBuilder) CreateV(ctx context.Context) (ten.Car, error)
- func (b *EntCarBuilder) SetModel(i string) *EntCarBuilder
- func (b *EntCarBuilder) SetOwner(i *ten.User) *EntCarBuilder
- func (b *EntCarBuilder) SetOwnerID(i int) *EntCarBuilder
- func (b *EntCarBuilder) SetRegisteredAt(i time.Time) *EntCarBuilder
- type EntCarFactory
- func (f *EntCarFactory) Client(c *ten.Client) *EntCarFactory
- func (f *EntCarFactory) Create(ctx context.Context) (*ten.Car, error)
- func (f *EntCarFactory) CreateBatch(ctx context.Context, n int) ([]*ten.Car, error)
- func (f *EntCarFactory) CreateBatchV(ctx context.Context, n int) ([]ten.Car, error)
- func (f *EntCarFactory) CreateV(ctx context.Context) (ten.Car, error)
- func (f *EntCarFactory) SetModel(i string) *EntCarBuilder
- func (f *EntCarFactory) SetOwner(i *ten.User) *EntCarBuilder
- func (f *EntCarFactory) SetOwnerID(i int) *EntCarBuilder
- func (f *EntCarFactory) SetRegisteredAt(i time.Time) *EntCarBuilder
- type EntCarMetaFactory
- func (f *EntCarMetaFactory) Build() *EntCarFactory
- func (f *EntCarMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *ten.Car) error) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *EntCarMutator) error) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetModelDefault(v string) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetModelFactory(fn func(ctx context.Context) (string, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetModelLazy(fn func(ctx context.Context, i *EntCarMutator) (string, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetModelSequence(fn func(ctx context.Context, i int) (string, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerDefault(v *ten.User) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerFactory(fn func(ctx context.Context) (*ten.User, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerIDDefault(v int) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerIDFactory(fn func(ctx context.Context) (int, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerIDLazy(fn func(ctx context.Context, i *EntCarMutator) (int, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerIDSequence(fn func(ctx context.Context, i int) (int, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerLazy(fn func(ctx context.Context, i *EntCarMutator) (*ten.User, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerSequence(fn func(ctx context.Context, i int) (*ten.User, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetRegisteredAtDefault(v time.Time) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetRegisteredAtFactory(fn func(ctx context.Context) (time.Time, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetRegisteredAtLazy(fn func(ctx context.Context, i *EntCarMutator) (time.Time, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetRegisteredAtSequence(fn func(ctx context.Context, i int) (time.Time, error)) *EntCarMetaFactory
- type EntCarMutator
- type EntGroupBuilder
- func (b *EntGroupBuilder) Client(c *ten.Client) *EntGroupBuilder
- func (b *EntGroupBuilder) Create(ctx context.Context) (*ten.Group, error)
- func (b *EntGroupBuilder) CreateBatch(ctx context.Context, n int) ([]*ten.Group, error)
- func (b *EntGroupBuilder) CreateBatchV(ctx context.Context, n int) ([]ten.Group, error)
- func (b *EntGroupBuilder) CreateV(ctx context.Context) (ten.Group, error)
- func (b *EntGroupBuilder) SetName(i string) *EntGroupBuilder
- func (b *EntGroupBuilder) WithNouserTrait() *EntGroupBuilder
- type EntGroupFactory
- func (f *EntGroupFactory) Client(c *ten.Client) *EntGroupFactory
- func (f *EntGroupFactory) Create(ctx context.Context) (*ten.Group, error)
- func (f *EntGroupFactory) CreateBatch(ctx context.Context, n int) ([]*ten.Group, error)
- func (f *EntGroupFactory) CreateBatchV(ctx context.Context, n int) ([]ten.Group, error)
- func (f *EntGroupFactory) CreateV(ctx context.Context) (ten.Group, error)
- func (f *EntGroupFactory) SetName(i string) *EntGroupBuilder
- func (f *EntGroupFactory) WithNouserTrait() *EntGroupBuilder
- type EntGroupMetaFactory
- func (f *EntGroupMetaFactory) Build() *EntGroupFactory
- func (f *EntGroupMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *ten.Group) error) *EntGroupMetaFactory
- func (f *EntGroupMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *EntGroupMutator) error) *EntGroupMetaFactory
- func (f *EntGroupMetaFactory) SetNameDefault(v string) *EntGroupMetaFactory
- func (f *EntGroupMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *EntGroupMetaFactory
- func (f *EntGroupMetaFactory) SetNameLazy(fn func(ctx context.Context, i *EntGroupMutator) (string, error)) *EntGroupMetaFactory
- func (f *EntGroupMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *EntGroupMetaFactory
- func (f *EntGroupMetaFactory) SetNouserTrait(t *entGroupTrait) *EntGroupMetaFactory
- type EntGroupMutator
- type EntUserBuilder
- func (b *EntUserBuilder) Client(c *ten.Client) *EntUserBuilder
- func (b *EntUserBuilder) Create(ctx context.Context) (*ten.User, error)
- func (b *EntUserBuilder) CreateBatch(ctx context.Context, n int) ([]*ten.User, error)
- func (b *EntUserBuilder) CreateBatchV(ctx context.Context, n int) ([]ten.User, error)
- func (b *EntUserBuilder) CreateV(ctx context.Context) (ten.User, error)
- func (b *EntUserBuilder) SetAge(i int) *EntUserBuilder
- func (b *EntUserBuilder) SetEmail(i string) *EntUserBuilder
- func (b *EntUserBuilder) SetGroupsPost(i int) *EntUserBuilder
- func (b *EntUserBuilder) SetName(i string) *EntUserBuilder
- type EntUserFactory
- func (f *EntUserFactory) Client(c *ten.Client) *EntUserFactory
- func (f *EntUserFactory) Create(ctx context.Context) (*ten.User, error)
- func (f *EntUserFactory) CreateBatch(ctx context.Context, n int) ([]*ten.User, error)
- func (f *EntUserFactory) CreateBatchV(ctx context.Context, n int) ([]ten.User, error)
- func (f *EntUserFactory) CreateV(ctx context.Context) (ten.User, error)
- func (f *EntUserFactory) SetAge(i int) *EntUserBuilder
- func (f *EntUserFactory) SetEmail(i string) *EntUserBuilder
- func (f *EntUserFactory) SetGroupsPost(i int) *EntUserBuilder
- func (f *EntUserFactory) SetName(i string) *EntUserBuilder
- type EntUserMetaFactory
- func (f *EntUserMetaFactory) Build() *EntUserFactory
- func (f *EntUserMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *ten.User) error) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetAgeDefault(v int) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetAgeFactory(fn func(ctx context.Context) (int, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetAgeLazy(fn func(ctx context.Context, i *EntUserMutator) (int, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetAgeSequence(fn func(ctx context.Context, i int) (int, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *EntUserMutator) error) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetEmailDefault(v string) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetEmailFactory(fn func(ctx context.Context) (string, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetEmailLazy(fn func(ctx context.Context, i *EntUserMutator) (string, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetEmailSequence(fn func(ctx context.Context, i int) (string, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetGroupsPostFunc(fn func(ctx context.Context, set bool, obj *ten.User, i int) error) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetNameDefault(v string) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetNameLazy(fn func(ctx context.Context, i *EntUserMutator) (string, error)) *EntUserMetaFactory
- func (f *EntUserMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *EntUserMetaFactory
- type EntUserMutator
Constants ¶
const ( TypeDefault = iota + 1 // default value TypeFactory // subfactory TypeSequence // sequence TypeLazy // lazy function TypePost // post generation )
Variables ¶
This section is empty.
Functions ¶
func EntCarTrait ¶
func EntCarTrait() *entCarTrait
func EntGroupTrait ¶
func EntGroupTrait() *entGroupTrait
func EntUserTrait ¶
func EntUserTrait() *entUserTrait
Types ¶
type EntCarBuilder ¶
type EntCarBuilder struct {
// contains filtered or unexported fields
}
func (*EntCarBuilder) Client ¶
func (b *EntCarBuilder) Client(c *ten.Client) *EntCarBuilder
func (*EntCarBuilder) CreateBatch ¶
func (*EntCarBuilder) CreateBatchV ¶
func (*EntCarBuilder) SetModel ¶
func (b *EntCarBuilder) SetModel(i string) *EntCarBuilder
SetModel set the Model field
func (*EntCarBuilder) SetOwner ¶
func (b *EntCarBuilder) SetOwner(i *ten.User) *EntCarBuilder
SetOwner set the Owner field
func (*EntCarBuilder) SetOwnerID ¶
func (b *EntCarBuilder) SetOwnerID(i int) *EntCarBuilder
SetOwnerID set the OwnerID field
func (*EntCarBuilder) SetRegisteredAt ¶
func (b *EntCarBuilder) SetRegisteredAt(i time.Time) *EntCarBuilder
SetRegisteredAt set the RegisteredAt field
type EntCarFactory ¶
type EntCarFactory struct {
// contains filtered or unexported fields
}
func (*EntCarFactory) Client ¶
func (f *EntCarFactory) Client(c *ten.Client) *EntCarFactory
Client set ent client to EntCarFactory
func (*EntCarFactory) CreateBatch ¶
CreateBatch return a []*ten.Car slice
func (*EntCarFactory) CreateBatchV ¶
CreateBatchV return a []ten.Car slice
func (*EntCarFactory) SetModel ¶
func (f *EntCarFactory) SetModel(i string) *EntCarBuilder
SetModel set the Model field
func (*EntCarFactory) SetOwner ¶
func (f *EntCarFactory) SetOwner(i *ten.User) *EntCarBuilder
SetOwner set the Owner field
func (*EntCarFactory) SetOwnerID ¶
func (f *EntCarFactory) SetOwnerID(i int) *EntCarBuilder
SetOwnerID set the OwnerID field
func (*EntCarFactory) SetRegisteredAt ¶
func (f *EntCarFactory) SetRegisteredAt(i time.Time) *EntCarBuilder
SetRegisteredAt set the RegisteredAt field
type EntCarMetaFactory ¶
type EntCarMetaFactory struct {
// contains filtered or unexported fields
}
func (*EntCarMetaFactory) Build ¶
func (f *EntCarMetaFactory) Build() *EntCarFactory
Build create a EntCarFactory from EntCarMetaFactory
func (*EntCarMetaFactory) SetAfterCreateFunc ¶
func (f *EntCarMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *ten.Car) error) *EntCarMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*EntCarMetaFactory) SetBeforeCreateFunc ¶
func (f *EntCarMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *EntCarMutator) error) *EntCarMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*EntCarMetaFactory) SetModelDefault ¶
func (f *EntCarMetaFactory) SetModelDefault(v string) *EntCarMetaFactory
SetModelDefault assign a default value to Model field
func (*EntCarMetaFactory) SetModelFactory ¶
func (f *EntCarMetaFactory) SetModelFactory(fn func(ctx context.Context) (string, error)) *EntCarMetaFactory
SetModelFactory register a factory function and assign return value to Model, you can also use related factory's Create/CreateV as input function here
func (*EntCarMetaFactory) SetModelLazy ¶
func (f *EntCarMetaFactory) SetModelLazy(fn func(ctx context.Context, i *EntCarMutator) (string, error)) *EntCarMetaFactory
SetModelLazy register a function which accept the build struct and set return value to Model field
func (*EntCarMetaFactory) SetModelSequence ¶
func (f *EntCarMetaFactory) SetModelSequence(fn func(ctx context.Context, i int) (string, error)) *EntCarMetaFactory
SetModelSequence register a function which accept a sequence counter and set return value to Model field
func (*EntCarMetaFactory) SetOwnerDefault ¶
func (f *EntCarMetaFactory) SetOwnerDefault(v *ten.User) *EntCarMetaFactory
SetOwnerDefault assign a default value to Owner field
func (*EntCarMetaFactory) SetOwnerFactory ¶
func (f *EntCarMetaFactory) SetOwnerFactory(fn func(ctx context.Context) (*ten.User, error)) *EntCarMetaFactory
SetOwnerFactory register a factory function and assign return value to Owner, you can also use related factory's Create/CreateV as input function here
func (*EntCarMetaFactory) SetOwnerIDDefault ¶
func (f *EntCarMetaFactory) SetOwnerIDDefault(v int) *EntCarMetaFactory
SetOwnerIDDefault assign a default value to OwnerID field
func (*EntCarMetaFactory) SetOwnerIDFactory ¶
func (f *EntCarMetaFactory) SetOwnerIDFactory(fn func(ctx context.Context) (int, error)) *EntCarMetaFactory
SetOwnerIDFactory register a factory function and assign return value to OwnerID, you can also use related factory's Create/CreateV as input function here
func (*EntCarMetaFactory) SetOwnerIDLazy ¶
func (f *EntCarMetaFactory) SetOwnerIDLazy(fn func(ctx context.Context, i *EntCarMutator) (int, error)) *EntCarMetaFactory
SetOwnerIDLazy register a function which accept the build struct and set return value to OwnerID field
func (*EntCarMetaFactory) SetOwnerIDSequence ¶
func (f *EntCarMetaFactory) SetOwnerIDSequence(fn func(ctx context.Context, i int) (int, error)) *EntCarMetaFactory
SetOwnerIDSequence register a function which accept a sequence counter and set return value to OwnerID field
func (*EntCarMetaFactory) SetOwnerLazy ¶
func (f *EntCarMetaFactory) SetOwnerLazy(fn func(ctx context.Context, i *EntCarMutator) (*ten.User, error)) *EntCarMetaFactory
SetOwnerLazy register a function which accept the build struct and set return value to Owner field
func (*EntCarMetaFactory) SetOwnerSequence ¶
func (f *EntCarMetaFactory) SetOwnerSequence(fn func(ctx context.Context, i int) (*ten.User, error)) *EntCarMetaFactory
SetOwnerSequence register a function which accept a sequence counter and set return value to Owner field
func (*EntCarMetaFactory) SetRegisteredAtDefault ¶
func (f *EntCarMetaFactory) SetRegisteredAtDefault(v time.Time) *EntCarMetaFactory
SetRegisteredAtDefault assign a default value to RegisteredAt field
func (*EntCarMetaFactory) SetRegisteredAtFactory ¶
func (f *EntCarMetaFactory) SetRegisteredAtFactory(fn func(ctx context.Context) (time.Time, error)) *EntCarMetaFactory
SetRegisteredAtFactory register a factory function and assign return value to RegisteredAt, you can also use related factory's Create/CreateV as input function here
func (*EntCarMetaFactory) SetRegisteredAtLazy ¶
func (f *EntCarMetaFactory) SetRegisteredAtLazy(fn func(ctx context.Context, i *EntCarMutator) (time.Time, error)) *EntCarMetaFactory
SetRegisteredAtLazy register a function which accept the build struct and set return value to RegisteredAt field
func (*EntCarMetaFactory) SetRegisteredAtSequence ¶
func (f *EntCarMetaFactory) SetRegisteredAtSequence(fn func(ctx context.Context, i int) (time.Time, error)) *EntCarMetaFactory
SetRegisteredAtSequence register a function which accept a sequence counter and set return value to RegisteredAt field
type EntCarMutator ¶
type EntCarMutator struct { Model string Owner *ten.User OwnerID int RegisteredAt time.Time // contains filtered or unexported fields }
func (*EntCarMutator) EntCreator ¶
func (m *EntCarMutator) EntCreator() *ten.CarCreate
type EntGroupBuilder ¶
type EntGroupBuilder struct {
// contains filtered or unexported fields
}
func (*EntGroupBuilder) Client ¶
func (b *EntGroupBuilder) Client(c *ten.Client) *EntGroupBuilder
func (*EntGroupBuilder) CreateBatch ¶
func (*EntGroupBuilder) CreateBatchV ¶
func (*EntGroupBuilder) SetName ¶
func (b *EntGroupBuilder) SetName(i string) *EntGroupBuilder
SetName set the Name field
func (*EntGroupBuilder) WithNouserTrait ¶
func (b *EntGroupBuilder) WithNouserTrait() *EntGroupBuilder
WithNouserTrait() enable the Nouser trait
type EntGroupFactory ¶
type EntGroupFactory struct {
// contains filtered or unexported fields
}
func (*EntGroupFactory) Client ¶
func (f *EntGroupFactory) Client(c *ten.Client) *EntGroupFactory
Client set ent client to EntGroupFactory
func (*EntGroupFactory) CreateBatch ¶
CreateBatch return a []*ten.Group slice
func (*EntGroupFactory) CreateBatchV ¶
CreateBatchV return a []ten.Group slice
func (*EntGroupFactory) SetName ¶
func (f *EntGroupFactory) SetName(i string) *EntGroupBuilder
SetName set the Name field
func (*EntGroupFactory) WithNouserTrait ¶
func (f *EntGroupFactory) WithNouserTrait() *EntGroupBuilder
WithNouserTrait() enable the Nouser trait
type EntGroupMetaFactory ¶
type EntGroupMetaFactory struct {
// contains filtered or unexported fields
}
func (*EntGroupMetaFactory) Build ¶
func (f *EntGroupMetaFactory) Build() *EntGroupFactory
Build create a EntGroupFactory from EntGroupMetaFactory
func (*EntGroupMetaFactory) SetAfterCreateFunc ¶
func (f *EntGroupMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *ten.Group) error) *EntGroupMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*EntGroupMetaFactory) SetBeforeCreateFunc ¶
func (f *EntGroupMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *EntGroupMutator) error) *EntGroupMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*EntGroupMetaFactory) SetNameDefault ¶
func (f *EntGroupMetaFactory) SetNameDefault(v string) *EntGroupMetaFactory
SetNameDefault assign a default value to Name field
func (*EntGroupMetaFactory) SetNameFactory ¶
func (f *EntGroupMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *EntGroupMetaFactory
SetNameFactory register a factory function and assign return value to Name, you can also use related factory's Create/CreateV as input function here
func (*EntGroupMetaFactory) SetNameLazy ¶
func (f *EntGroupMetaFactory) SetNameLazy(fn func(ctx context.Context, i *EntGroupMutator) (string, error)) *EntGroupMetaFactory
SetNameLazy register a function which accept the build struct and set return value to Name field
func (*EntGroupMetaFactory) SetNameSequence ¶
func (f *EntGroupMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *EntGroupMetaFactory
SetNameSequence register a function which accept a sequence counter and set return value to Name field
func (*EntGroupMetaFactory) SetNouserTrait ¶
func (f *EntGroupMetaFactory) SetNouserTrait(t *entGroupTrait) *EntGroupMetaFactory
SetNouserTrait accept a entGroupTrait, will override builder using Trait's methods if enable
type EntGroupMutator ¶
type EntGroupMutator struct { Name string // contains filtered or unexported fields }
func (*EntGroupMutator) EntCreator ¶
func (m *EntGroupMutator) EntCreator() *ten.GroupCreate
type EntUserBuilder ¶
type EntUserBuilder struct {
// contains filtered or unexported fields
}
func (*EntUserBuilder) Client ¶
func (b *EntUserBuilder) Client(c *ten.Client) *EntUserBuilder
func (*EntUserBuilder) CreateBatch ¶
func (*EntUserBuilder) CreateBatchV ¶
func (*EntUserBuilder) SetAge ¶
func (b *EntUserBuilder) SetAge(i int) *EntUserBuilder
SetAge set the Age field
func (*EntUserBuilder) SetEmail ¶
func (b *EntUserBuilder) SetEmail(i string) *EntUserBuilder
SetEmail set the Email field
func (*EntUserBuilder) SetGroupsPost ¶
func (b *EntUserBuilder) SetGroupsPost(i int) *EntUserBuilder
SetGroupsPost call the post function with int input
func (*EntUserBuilder) SetName ¶
func (b *EntUserBuilder) SetName(i string) *EntUserBuilder
SetName set the Name field
type EntUserFactory ¶
type EntUserFactory struct {
// contains filtered or unexported fields
}
func (*EntUserFactory) Client ¶
func (f *EntUserFactory) Client(c *ten.Client) *EntUserFactory
Client set ent client to EntUserFactory
func (*EntUserFactory) CreateBatch ¶
CreateBatch return a []*ten.User slice
func (*EntUserFactory) CreateBatchV ¶
CreateBatchV return a []ten.User slice
func (*EntUserFactory) SetAge ¶
func (f *EntUserFactory) SetAge(i int) *EntUserBuilder
SetAge set the Age field
func (*EntUserFactory) SetEmail ¶
func (f *EntUserFactory) SetEmail(i string) *EntUserBuilder
SetEmail set the Email field
func (*EntUserFactory) SetGroupsPost ¶
func (f *EntUserFactory) SetGroupsPost(i int) *EntUserBuilder
SetGroupsPost call the post function with int input
func (*EntUserFactory) SetName ¶
func (f *EntUserFactory) SetName(i string) *EntUserBuilder
SetName set the Name field
type EntUserMetaFactory ¶
type EntUserMetaFactory struct {
// contains filtered or unexported fields
}
func (*EntUserMetaFactory) Build ¶
func (f *EntUserMetaFactory) Build() *EntUserFactory
Build create a EntUserFactory from EntUserMetaFactory
func (*EntUserMetaFactory) SetAfterCreateFunc ¶
func (f *EntUserMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *ten.User) error) *EntUserMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*EntUserMetaFactory) SetAgeDefault ¶
func (f *EntUserMetaFactory) SetAgeDefault(v int) *EntUserMetaFactory
SetAgeDefault assign a default value to Age field
func (*EntUserMetaFactory) SetAgeFactory ¶
func (f *EntUserMetaFactory) SetAgeFactory(fn func(ctx context.Context) (int, error)) *EntUserMetaFactory
SetAgeFactory register a factory function and assign return value to Age, you can also use related factory's Create/CreateV as input function here
func (*EntUserMetaFactory) SetAgeLazy ¶
func (f *EntUserMetaFactory) SetAgeLazy(fn func(ctx context.Context, i *EntUserMutator) (int, error)) *EntUserMetaFactory
SetAgeLazy register a function which accept the build struct and set return value to Age field
func (*EntUserMetaFactory) SetAgeSequence ¶
func (f *EntUserMetaFactory) SetAgeSequence(fn func(ctx context.Context, i int) (int, error)) *EntUserMetaFactory
SetAgeSequence register a function which accept a sequence counter and set return value to Age field
func (*EntUserMetaFactory) SetBeforeCreateFunc ¶
func (f *EntUserMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *EntUserMutator) error) *EntUserMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*EntUserMetaFactory) SetEmailDefault ¶
func (f *EntUserMetaFactory) SetEmailDefault(v string) *EntUserMetaFactory
SetEmailDefault assign a default value to Email field
func (*EntUserMetaFactory) SetEmailFactory ¶
func (f *EntUserMetaFactory) SetEmailFactory(fn func(ctx context.Context) (string, error)) *EntUserMetaFactory
SetEmailFactory register a factory function and assign return value to Email, you can also use related factory's Create/CreateV as input function here
func (*EntUserMetaFactory) SetEmailLazy ¶
func (f *EntUserMetaFactory) SetEmailLazy(fn func(ctx context.Context, i *EntUserMutator) (string, error)) *EntUserMetaFactory
SetEmailLazy register a function which accept the build struct and set return value to Email field
func (*EntUserMetaFactory) SetEmailSequence ¶
func (f *EntUserMetaFactory) SetEmailSequence(fn func(ctx context.Context, i int) (string, error)) *EntUserMetaFactory
SetEmailSequence register a function which accept a sequence counter and set return value to Email field
func (*EntUserMetaFactory) SetGroupsPostFunc ¶
func (f *EntUserMetaFactory) SetGroupsPostFunc(fn func(ctx context.Context, set bool, obj *ten.User, i int) error) *EntUserMetaFactory
SetGroupsPostFunc register a post function which will be called in factory SetGroupsPost method
func (*EntUserMetaFactory) SetNameDefault ¶
func (f *EntUserMetaFactory) SetNameDefault(v string) *EntUserMetaFactory
SetNameDefault assign a default value to Name field
func (*EntUserMetaFactory) SetNameFactory ¶
func (f *EntUserMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *EntUserMetaFactory
SetNameFactory register a factory function and assign return value to Name, you can also use related factory's Create/CreateV as input function here
func (*EntUserMetaFactory) SetNameLazy ¶
func (f *EntUserMetaFactory) SetNameLazy(fn func(ctx context.Context, i *EntUserMutator) (string, error)) *EntUserMetaFactory
SetNameLazy register a function which accept the build struct and set return value to Name field
func (*EntUserMetaFactory) SetNameSequence ¶
func (f *EntUserMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *EntUserMetaFactory
SetNameSequence register a function which accept a sequence counter and set return value to Name field
type EntUserMutator ¶
type EntUserMutator struct { Age int Email string Name string // contains filtered or unexported fields }
func (*EntUserMutator) EntCreator ¶
func (m *EntUserMutator) EntCreator() *ten.UserCreate