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.
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.
Code generated by carrier, DO NOT EDIT.
Index ¶
- Constants
- func BarTrait() *barTrait
- func EntCarTrait() *entCarTrait
- func EntGroupTrait() *entGroupTrait
- func EntUserTrait() *entUserTrait
- func FoodTrait() *foodTrait
- func GroupCategoryTrait() *groupCategoryTrait
- func GroupTrait() *groupTrait
- func UserTrait() *userTrait
- type BarBuilder
- func (b *BarBuilder) Create(ctx context.Context) (*model.Foo, error)
- func (b *BarBuilder) CreateBatch(ctx context.Context, n int) ([]*model.Foo, error)
- func (b *BarBuilder) CreateBatchV(ctx context.Context, n int) ([]model.Foo, error)
- func (b *BarBuilder) CreateV(ctx context.Context) (model.Foo, error)
- func (b *BarBuilder) SetName(i string) *BarBuilder
- type BarFactory
- func (f *BarFactory) Create(ctx context.Context) (*model.Foo, error)
- func (f *BarFactory) CreateBatch(ctx context.Context, n int) ([]*model.Foo, error)
- func (f *BarFactory) CreateBatchV(ctx context.Context, n int) ([]model.Foo, error)
- func (f *BarFactory) CreateV(ctx context.Context) (model.Foo, error)
- func (f *BarFactory) SetName(i string) *BarBuilder
- type BarMetaFactory
- func (f *BarMetaFactory) Build() *BarFactory
- func (f *BarMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.Foo) error) *BarMetaFactory
- func (f *BarMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.Foo) error) *BarMetaFactory
- func (f *BarMetaFactory) SetNameDefault(v string) *BarMetaFactory
- func (f *BarMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *BarMetaFactory
- func (f *BarMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.Foo) (string, error)) *BarMetaFactory
- func (f *BarMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *BarMetaFactory
- type Counter
- type EntCarBuilder
- func (b *EntCarBuilder) Client(c *ent.Client) *EntCarBuilder
- func (b *EntCarBuilder) Create(ctx context.Context) (*ent.Car, error)
- func (b *EntCarBuilder) CreateBatch(ctx context.Context, n int) ([]*ent.Car, error)
- func (b *EntCarBuilder) CreateBatchV(ctx context.Context, n int) ([]ent.Car, error)
- func (b *EntCarBuilder) CreateV(ctx context.Context) (ent.Car, error)
- func (b *EntCarBuilder) SetModel(i string) *EntCarBuilder
- func (b *EntCarBuilder) SetOwner(i *ent.User) *EntCarBuilder
- func (b *EntCarBuilder) SetOwnerID(i int) *EntCarBuilder
- func (b *EntCarBuilder) SetRegisteredAt(i time.Time) *EntCarBuilder
- type EntCarFactory
- func (f *EntCarFactory) Client(c *ent.Client) *EntCarFactory
- func (f *EntCarFactory) Create(ctx context.Context) (*ent.Car, error)
- func (f *EntCarFactory) CreateBatch(ctx context.Context, n int) ([]*ent.Car, error)
- func (f *EntCarFactory) CreateBatchV(ctx context.Context, n int) ([]ent.Car, error)
- func (f *EntCarFactory) CreateV(ctx context.Context) (ent.Car, error)
- func (f *EntCarFactory) SetModel(i string) *EntCarBuilder
- func (f *EntCarFactory) SetOwner(i *ent.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 *ent.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 *ent.User) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerFactory(fn func(ctx context.Context) (*ent.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) (*ent.User, error)) *EntCarMetaFactory
- func (f *EntCarMetaFactory) SetOwnerSequence(fn func(ctx context.Context, i int) (*ent.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 *ent.Client) *EntGroupBuilder
- func (b *EntGroupBuilder) Create(ctx context.Context) (*ent.Group, error)
- func (b *EntGroupBuilder) CreateBatch(ctx context.Context, n int) ([]*ent.Group, error)
- func (b *EntGroupBuilder) CreateBatchV(ctx context.Context, n int) ([]ent.Group, error)
- func (b *EntGroupBuilder) CreateV(ctx context.Context) (ent.Group, error)
- func (b *EntGroupBuilder) SetName(i string) *EntGroupBuilder
- func (b *EntGroupBuilder) WithNouserTrait() *EntGroupBuilder
- type EntGroupFactory
- func (f *EntGroupFactory) Client(c *ent.Client) *EntGroupFactory
- func (f *EntGroupFactory) Create(ctx context.Context) (*ent.Group, error)
- func (f *EntGroupFactory) CreateBatch(ctx context.Context, n int) ([]*ent.Group, error)
- func (f *EntGroupFactory) CreateBatchV(ctx context.Context, n int) ([]ent.Group, error)
- func (f *EntGroupFactory) CreateV(ctx context.Context) (ent.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 *ent.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 *ent.Client) *EntUserBuilder
- func (b *EntUserBuilder) Create(ctx context.Context) (*ent.User, error)
- func (b *EntUserBuilder) CreateBatch(ctx context.Context, n int) ([]*ent.User, error)
- func (b *EntUserBuilder) CreateBatchV(ctx context.Context, n int) ([]ent.User, error)
- func (b *EntUserBuilder) CreateV(ctx context.Context) (ent.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 *ent.Client) *EntUserFactory
- func (f *EntUserFactory) Create(ctx context.Context) (*ent.User, error)
- func (f *EntUserFactory) CreateBatch(ctx context.Context, n int) ([]*ent.User, error)
- func (f *EntUserFactory) CreateBatchV(ctx context.Context, n int) ([]ent.User, error)
- func (f *EntUserFactory) CreateV(ctx context.Context) (ent.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 *ent.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 *ent.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
- type FoodBuilder
- func (b *FoodBuilder) Create(ctx context.Context) (*model.Food, error)
- func (b *FoodBuilder) CreateBatch(ctx context.Context, n int) ([]*model.Food, error)
- func (b *FoodBuilder) CreateBatchV(ctx context.Context, n int) ([]model.Food, error)
- func (b *FoodBuilder) CreateV(ctx context.Context) (model.Food, error)
- func (b *FoodBuilder) SetCategory(i string) *FoodBuilder
- func (b *FoodBuilder) SetFoo(i model.Foo) *FoodBuilder
- type FoodFactory
- func (f *FoodFactory) Create(ctx context.Context) (*model.Food, error)
- func (f *FoodFactory) CreateBatch(ctx context.Context, n int) ([]*model.Food, error)
- func (f *FoodFactory) CreateBatchV(ctx context.Context, n int) ([]model.Food, error)
- func (f *FoodFactory) CreateV(ctx context.Context) (model.Food, error)
- func (f *FoodFactory) SetCategory(i string) *FoodBuilder
- func (f *FoodFactory) SetFoo(i model.Foo) *FoodBuilder
- type FoodMetaFactory
- func (f *FoodMetaFactory) Build() *FoodFactory
- func (f *FoodMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.Food) error) *FoodMetaFactory
- func (f *FoodMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.Food) error) *FoodMetaFactory
- func (f *FoodMetaFactory) SetCategoryDefault(v string) *FoodMetaFactory
- func (f *FoodMetaFactory) SetCategoryFactory(fn func(ctx context.Context) (string, error)) *FoodMetaFactory
- func (f *FoodMetaFactory) SetCategoryLazy(fn func(ctx context.Context, i *model.Food) (string, error)) *FoodMetaFactory
- func (f *FoodMetaFactory) SetCategorySequence(fn func(ctx context.Context, i int) (string, error)) *FoodMetaFactory
- func (f *FoodMetaFactory) SetFooDefault(v model.Foo) *FoodMetaFactory
- func (f *FoodMetaFactory) SetFooFactory(fn func(ctx context.Context) (model.Foo, error)) *FoodMetaFactory
- func (f *FoodMetaFactory) SetFooLazy(fn func(ctx context.Context, i *model.Food) (model.Foo, error)) *FoodMetaFactory
- func (f *FoodMetaFactory) SetFooSequence(fn func(ctx context.Context, i int) (model.Foo, error)) *FoodMetaFactory
- type GroupBuilder
- func (b *GroupBuilder) Create(ctx context.Context) (*model.Group, error)
- func (b *GroupBuilder) CreateBatch(ctx context.Context, n int) ([]*model.Group, error)
- func (b *GroupBuilder) CreateBatchV(ctx context.Context, n int) ([]model.Group, error)
- func (b *GroupBuilder) CreateV(ctx context.Context) (model.Group, error)
- func (b *GroupBuilder) SetCategory(i model.GroupCategory) *GroupBuilder
- func (b *GroupBuilder) SetName(i string) *GroupBuilder
- type GroupCategoryBuilder
- func (b *GroupCategoryBuilder) Create(ctx context.Context) (*model.GroupCategory, error)
- func (b *GroupCategoryBuilder) CreateBatch(ctx context.Context, n int) ([]*model.GroupCategory, error)
- func (b *GroupCategoryBuilder) CreateBatchV(ctx context.Context, n int) ([]model.GroupCategory, error)
- func (b *GroupCategoryBuilder) CreateV(ctx context.Context) (model.GroupCategory, error)
- func (b *GroupCategoryBuilder) SetName(i string) *GroupCategoryBuilder
- type GroupCategoryFactory
- func (f *GroupCategoryFactory) Create(ctx context.Context) (*model.GroupCategory, error)
- func (f *GroupCategoryFactory) CreateBatch(ctx context.Context, n int) ([]*model.GroupCategory, error)
- func (f *GroupCategoryFactory) CreateBatchV(ctx context.Context, n int) ([]model.GroupCategory, error)
- func (f *GroupCategoryFactory) CreateV(ctx context.Context) (model.GroupCategory, error)
- func (f *GroupCategoryFactory) SetName(i string) *GroupCategoryBuilder
- type GroupCategoryMetaFactory
- func (f *GroupCategoryMetaFactory) Build() *GroupCategoryFactory
- func (f *GroupCategoryMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.GroupCategory) error) *GroupCategoryMetaFactory
- func (f *GroupCategoryMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.GroupCategory) error) *GroupCategoryMetaFactory
- func (f *GroupCategoryMetaFactory) SetNameDefault(v string) *GroupCategoryMetaFactory
- func (f *GroupCategoryMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *GroupCategoryMetaFactory
- func (f *GroupCategoryMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.GroupCategory) (string, error)) *GroupCategoryMetaFactory
- func (f *GroupCategoryMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *GroupCategoryMetaFactory
- type GroupFactory
- func (f *GroupFactory) Create(ctx context.Context) (*model.Group, error)
- func (f *GroupFactory) CreateBatch(ctx context.Context, n int) ([]*model.Group, error)
- func (f *GroupFactory) CreateBatchV(ctx context.Context, n int) ([]model.Group, error)
- func (f *GroupFactory) CreateV(ctx context.Context) (model.Group, error)
- func (f *GroupFactory) SetCategory(i model.GroupCategory) *GroupBuilder
- func (f *GroupFactory) SetName(i string) *GroupBuilder
- type GroupMetaFactory
- func (f *GroupMetaFactory) Build() *GroupFactory
- func (f *GroupMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.Group) error) *GroupMetaFactory
- func (f *GroupMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.Group) error) *GroupMetaFactory
- func (f *GroupMetaFactory) SetCategoryDefault(v model.GroupCategory) *GroupMetaFactory
- func (f *GroupMetaFactory) SetCategoryFactory(fn func(ctx context.Context) (model.GroupCategory, error)) *GroupMetaFactory
- func (f *GroupMetaFactory) SetCategoryLazy(fn func(ctx context.Context, i *model.Group) (model.GroupCategory, error)) *GroupMetaFactory
- func (f *GroupMetaFactory) SetCategorySequence(fn func(ctx context.Context, i int) (model.GroupCategory, error)) *GroupMetaFactory
- func (f *GroupMetaFactory) SetNameDefault(v string) *GroupMetaFactory
- func (f *GroupMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *GroupMetaFactory
- func (f *GroupMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.Group) (string, error)) *GroupMetaFactory
- func (f *GroupMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *GroupMetaFactory
- type UserBuilder
- func (b *UserBuilder) Create(ctx context.Context) (*model.User, error)
- func (b *UserBuilder) CreateBatch(ctx context.Context, n int) ([]*model.User, error)
- func (b *UserBuilder) CreateBatchV(ctx context.Context, n int) ([]model.User, error)
- func (b *UserBuilder) CreateV(ctx context.Context) (model.User, error)
- func (b *UserBuilder) SetEmail(i string) *UserBuilder
- func (b *UserBuilder) SetFooPost(i string) *UserBuilder
- func (b *UserBuilder) SetGroup(i *model.Group) *UserBuilder
- func (b *UserBuilder) SetName(i string) *UserBuilder
- func (b *UserBuilder) SetTitle(i string) *UserBuilder
- func (b *UserBuilder) WithAnonymousTrait() *UserBuilder
- func (b *UserBuilder) WithDefaultTrait() *UserBuilder
- func (b *UserBuilder) WithFactoryTrait() *UserBuilder
- func (b *UserBuilder) WithLazyTrait() *UserBuilder
- func (b *UserBuilder) WithMixemailTrait() *UserBuilder
- func (b *UserBuilder) WithMixnameTrait() *UserBuilder
- func (b *UserBuilder) WithMixtitleTrait() *UserBuilder
- func (b *UserBuilder) WithNilTrait() *UserBuilder
- func (b *UserBuilder) WithSequenceTrait() *UserBuilder
- type UserFactory
- func (f *UserFactory) Create(ctx context.Context) (*model.User, error)
- func (f *UserFactory) CreateBatch(ctx context.Context, n int) ([]*model.User, error)
- func (f *UserFactory) CreateBatchV(ctx context.Context, n int) ([]model.User, error)
- func (f *UserFactory) CreateV(ctx context.Context) (model.User, error)
- func (f *UserFactory) SetEmail(i string) *UserBuilder
- func (f *UserFactory) SetFooPost(i string) *UserBuilder
- func (f *UserFactory) SetGroup(i *model.Group) *UserBuilder
- func (f *UserFactory) SetName(i string) *UserBuilder
- func (f *UserFactory) SetTitle(i string) *UserBuilder
- func (f *UserFactory) WithAnonymousTrait() *UserBuilder
- func (f *UserFactory) WithDefaultTrait() *UserBuilder
- func (f *UserFactory) WithFactoryTrait() *UserBuilder
- func (f *UserFactory) WithLazyTrait() *UserBuilder
- func (f *UserFactory) WithMixemailTrait() *UserBuilder
- func (f *UserFactory) WithMixnameTrait() *UserBuilder
- func (f *UserFactory) WithMixtitleTrait() *UserBuilder
- func (f *UserFactory) WithNilTrait() *UserBuilder
- func (f *UserFactory) WithSequenceTrait() *UserBuilder
- type UserMetaFactory
- func (f *UserMetaFactory) Build() *UserFactory
- func (f *UserMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.User) error) *UserMetaFactory
- func (f *UserMetaFactory) SetAnonymousTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.User) error) *UserMetaFactory
- func (f *UserMetaFactory) SetDefaultTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetEmailDefault(v string) *UserMetaFactory
- func (f *UserMetaFactory) SetEmailFactory(fn func(ctx context.Context) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetEmailLazy(fn func(ctx context.Context, i *model.User) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetEmailSequence(fn func(ctx context.Context, i int) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetFactoryTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetFooPostFunc(fn func(ctx context.Context, set bool, obj *model.User, i string) error) *UserMetaFactory
- func (f *UserMetaFactory) SetGroupDefault(v *model.Group) *UserMetaFactory
- func (f *UserMetaFactory) SetGroupFactory(fn func(ctx context.Context) (*model.Group, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetGroupLazy(fn func(ctx context.Context, i *model.User) (*model.Group, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetGroupSequence(fn func(ctx context.Context, i int) (*model.Group, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetLazyTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetMixemailTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetMixnameTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetMixtitleTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetNameDefault(v string) *UserMetaFactory
- func (f *UserMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.User) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetNilTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetSequenceTrait(t *userTrait) *UserMetaFactory
- func (f *UserMetaFactory) SetTitleDefault(v string) *UserMetaFactory
- func (f *UserMetaFactory) SetTitleFactory(fn func(ctx context.Context) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetTitleLazy(fn func(ctx context.Context, i *model.User) (string, error)) *UserMetaFactory
- func (f *UserMetaFactory) SetTitleSequence(fn func(ctx context.Context, i int) (string, error)) *UserMetaFactory
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
func GroupCategoryTrait ¶
func GroupCategoryTrait() *groupCategoryTrait
func GroupTrait ¶
func GroupTrait() *groupTrait
Types ¶
type BarBuilder ¶
type BarBuilder struct {
// contains filtered or unexported fields
}
func (*BarBuilder) CreateBatch ¶
func (*BarBuilder) CreateBatchV ¶
func (*BarBuilder) SetName ¶
func (b *BarBuilder) SetName(i string) *BarBuilder
SetName set the Name field
type BarFactory ¶
type BarFactory struct {
// contains filtered or unexported fields
}
func (*BarFactory) CreateBatch ¶
CreateBatch return a []*model.Foo slice
func (*BarFactory) CreateBatchV ¶
CreateBatchV return a []model.Foo slice
func (*BarFactory) SetName ¶
func (f *BarFactory) SetName(i string) *BarBuilder
SetName set the Name field
type BarMetaFactory ¶
type BarMetaFactory struct {
// contains filtered or unexported fields
}
func (*BarMetaFactory) Build ¶
func (f *BarMetaFactory) Build() *BarFactory
Build create a BarFactory from BarMetaFactory
func (*BarMetaFactory) SetAfterCreateFunc ¶
func (f *BarMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.Foo) error) *BarMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*BarMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
func (f *BarMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.Foo) error) *BarMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*BarMetaFactory) SetNameDefault ¶
func (f *BarMetaFactory) SetNameDefault(v string) *BarMetaFactory
SetNameDefault assign a default value to Name field
func (*BarMetaFactory) SetNameFactory ¶
func (f *BarMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *BarMetaFactory
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 (*BarMetaFactory) SetNameLazy ¶
func (f *BarMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.Foo) (string, error)) *BarMetaFactory
SetNameLazy register a function which accept the build struct and set return value to Name field
func (*BarMetaFactory) SetNameSequence ¶
func (f *BarMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *BarMetaFactory
SetNameSequence register a function which accept a sequence counter and set return value to Name field
type EntCarBuilder ¶
type EntCarBuilder struct {
// contains filtered or unexported fields
}
func (*EntCarBuilder) Client ¶
func (b *EntCarBuilder) Client(c *ent.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 *ent.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 *ent.Client) *EntCarFactory
Client set ent client to EntCarFactory
func (*EntCarFactory) CreateBatch ¶
CreateBatch return a []*ent.Car slice
func (*EntCarFactory) CreateBatchV ¶
CreateBatchV return a []ent.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 *ent.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 *ent.Car) error) *EntCarMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*EntCarMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
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 *ent.User) *EntCarMetaFactory
SetOwnerDefault assign a default value to Owner field
func (*EntCarMetaFactory) SetOwnerFactory ¶
func (f *EntCarMetaFactory) SetOwnerFactory(fn func(ctx context.Context) (*ent.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) (*ent.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) (*ent.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 *ent.User OwnerID int RegisteredAt time.Time // contains filtered or unexported fields }
func (*EntCarMutator) EntCreator ¶ added in v0.1.1
func (m *EntCarMutator) EntCreator() *ent.CarCreate
type EntGroupBuilder ¶
type EntGroupBuilder struct {
// contains filtered or unexported fields
}
func (*EntGroupBuilder) Client ¶
func (b *EntGroupBuilder) Client(c *ent.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 *ent.Client) *EntGroupFactory
Client set ent client to EntGroupFactory
func (*EntGroupFactory) CreateBatch ¶
CreateBatch return a []*ent.Group slice
func (*EntGroupFactory) CreateBatchV ¶
CreateBatchV return a []ent.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 *ent.Group) error) *EntGroupMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*EntGroupMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
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 ¶ added in v0.1.1
func (m *EntGroupMutator) EntCreator() *ent.GroupCreate
type EntUserBuilder ¶
type EntUserBuilder struct {
// contains filtered or unexported fields
}
func (*EntUserBuilder) Client ¶
func (b *EntUserBuilder) Client(c *ent.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 *ent.Client) *EntUserFactory
Client set ent client to EntUserFactory
func (*EntUserFactory) CreateBatch ¶
CreateBatch return a []*ent.User slice
func (*EntUserFactory) CreateBatchV ¶
CreateBatchV return a []ent.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 *ent.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 ¶ added in v0.1.1
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 *ent.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 ¶ added in v0.1.1
func (m *EntUserMutator) EntCreator() *ent.UserCreate
type FoodBuilder ¶
type FoodBuilder struct {
// contains filtered or unexported fields
}
func (*FoodBuilder) CreateBatch ¶
func (*FoodBuilder) CreateBatchV ¶
func (*FoodBuilder) SetCategory ¶
func (b *FoodBuilder) SetCategory(i string) *FoodBuilder
SetCategory set the Category field
func (*FoodBuilder) SetFoo ¶
func (b *FoodBuilder) SetFoo(i model.Foo) *FoodBuilder
SetFoo set the Foo field
type FoodFactory ¶
type FoodFactory struct {
// contains filtered or unexported fields
}
func (*FoodFactory) CreateBatch ¶
CreateBatch return a []*model.Food slice
func (*FoodFactory) CreateBatchV ¶
CreateBatchV return a []model.Food slice
func (*FoodFactory) SetCategory ¶
func (f *FoodFactory) SetCategory(i string) *FoodBuilder
SetCategory set the Category field
func (*FoodFactory) SetFoo ¶
func (f *FoodFactory) SetFoo(i model.Foo) *FoodBuilder
SetFoo set the Foo field
type FoodMetaFactory ¶
type FoodMetaFactory struct {
// contains filtered or unexported fields
}
func (*FoodMetaFactory) Build ¶
func (f *FoodMetaFactory) Build() *FoodFactory
Build create a FoodFactory from FoodMetaFactory
func (*FoodMetaFactory) SetAfterCreateFunc ¶
func (f *FoodMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.Food) error) *FoodMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*FoodMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
func (f *FoodMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.Food) error) *FoodMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*FoodMetaFactory) SetCategoryDefault ¶
func (f *FoodMetaFactory) SetCategoryDefault(v string) *FoodMetaFactory
SetCategoryDefault assign a default value to Category field
func (*FoodMetaFactory) SetCategoryFactory ¶
func (f *FoodMetaFactory) SetCategoryFactory(fn func(ctx context.Context) (string, error)) *FoodMetaFactory
SetCategoryFactory register a factory function and assign return value to Category, you can also use related factory's Create/CreateV as input function here
func (*FoodMetaFactory) SetCategoryLazy ¶
func (f *FoodMetaFactory) SetCategoryLazy(fn func(ctx context.Context, i *model.Food) (string, error)) *FoodMetaFactory
SetCategoryLazy register a function which accept the build struct and set return value to Category field
func (*FoodMetaFactory) SetCategorySequence ¶
func (f *FoodMetaFactory) SetCategorySequence(fn func(ctx context.Context, i int) (string, error)) *FoodMetaFactory
SetCategorySequence register a function which accept a sequence counter and set return value to Category field
func (*FoodMetaFactory) SetFooDefault ¶
func (f *FoodMetaFactory) SetFooDefault(v model.Foo) *FoodMetaFactory
SetFooDefault assign a default value to Foo field
func (*FoodMetaFactory) SetFooFactory ¶
func (f *FoodMetaFactory) SetFooFactory(fn func(ctx context.Context) (model.Foo, error)) *FoodMetaFactory
SetFooFactory register a factory function and assign return value to Foo, you can also use related factory's Create/CreateV as input function here
func (*FoodMetaFactory) SetFooLazy ¶
func (f *FoodMetaFactory) SetFooLazy(fn func(ctx context.Context, i *model.Food) (model.Foo, error)) *FoodMetaFactory
SetFooLazy register a function which accept the build struct and set return value to Foo field
func (*FoodMetaFactory) SetFooSequence ¶
func (f *FoodMetaFactory) SetFooSequence(fn func(ctx context.Context, i int) (model.Foo, error)) *FoodMetaFactory
SetFooSequence register a function which accept a sequence counter and set return value to Foo field
type GroupBuilder ¶
type GroupBuilder struct {
// contains filtered or unexported fields
}
func (*GroupBuilder) CreateBatch ¶
func (*GroupBuilder) CreateBatchV ¶
func (*GroupBuilder) SetCategory ¶
func (b *GroupBuilder) SetCategory(i model.GroupCategory) *GroupBuilder
SetCategory set the Category field
func (*GroupBuilder) SetName ¶
func (b *GroupBuilder) SetName(i string) *GroupBuilder
SetName set the Name field
type GroupCategoryBuilder ¶
type GroupCategoryBuilder struct {
// contains filtered or unexported fields
}
func (*GroupCategoryBuilder) Create ¶
func (b *GroupCategoryBuilder) Create(ctx context.Context) (*model.GroupCategory, error)
Create return a new *model.GroupCategory
func (*GroupCategoryBuilder) CreateBatch ¶
func (b *GroupCategoryBuilder) CreateBatch(ctx context.Context, n int) ([]*model.GroupCategory, error)
func (*GroupCategoryBuilder) CreateBatchV ¶
func (b *GroupCategoryBuilder) CreateBatchV(ctx context.Context, n int) ([]model.GroupCategory, error)
func (*GroupCategoryBuilder) CreateV ¶
func (b *GroupCategoryBuilder) CreateV(ctx context.Context) (model.GroupCategory, error)
CreateV return a new model.GroupCategory
func (*GroupCategoryBuilder) SetName ¶
func (b *GroupCategoryBuilder) SetName(i string) *GroupCategoryBuilder
SetName set the Name field
type GroupCategoryFactory ¶
type GroupCategoryFactory struct {
// contains filtered or unexported fields
}
func (*GroupCategoryFactory) Create ¶
func (f *GroupCategoryFactory) Create(ctx context.Context) (*model.GroupCategory, error)
Create return a new *model.GroupCategory
func (*GroupCategoryFactory) CreateBatch ¶
func (f *GroupCategoryFactory) CreateBatch(ctx context.Context, n int) ([]*model.GroupCategory, error)
CreateBatch return a []*model.GroupCategory slice
func (*GroupCategoryFactory) CreateBatchV ¶
func (f *GroupCategoryFactory) CreateBatchV(ctx context.Context, n int) ([]model.GroupCategory, error)
CreateBatchV return a []model.GroupCategory slice
func (*GroupCategoryFactory) CreateV ¶
func (f *GroupCategoryFactory) CreateV(ctx context.Context) (model.GroupCategory, error)
CreateV return a new model.GroupCategory
func (*GroupCategoryFactory) SetName ¶
func (f *GroupCategoryFactory) SetName(i string) *GroupCategoryBuilder
SetName set the Name field
type GroupCategoryMetaFactory ¶
type GroupCategoryMetaFactory struct {
// contains filtered or unexported fields
}
func (*GroupCategoryMetaFactory) Build ¶
func (f *GroupCategoryMetaFactory) Build() *GroupCategoryFactory
Build create a GroupCategoryFactory from GroupCategoryMetaFactory
func (*GroupCategoryMetaFactory) SetAfterCreateFunc ¶
func (f *GroupCategoryMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.GroupCategory) error) *GroupCategoryMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*GroupCategoryMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
func (f *GroupCategoryMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.GroupCategory) error) *GroupCategoryMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*GroupCategoryMetaFactory) SetNameDefault ¶
func (f *GroupCategoryMetaFactory) SetNameDefault(v string) *GroupCategoryMetaFactory
SetNameDefault assign a default value to Name field
func (*GroupCategoryMetaFactory) SetNameFactory ¶
func (f *GroupCategoryMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *GroupCategoryMetaFactory
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 (*GroupCategoryMetaFactory) SetNameLazy ¶
func (f *GroupCategoryMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.GroupCategory) (string, error)) *GroupCategoryMetaFactory
SetNameLazy register a function which accept the build struct and set return value to Name field
func (*GroupCategoryMetaFactory) SetNameSequence ¶
func (f *GroupCategoryMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *GroupCategoryMetaFactory
SetNameSequence register a function which accept a sequence counter and set return value to Name field
type GroupFactory ¶
type GroupFactory struct {
// contains filtered or unexported fields
}
func (*GroupFactory) CreateBatch ¶
CreateBatch return a []*model.Group slice
func (*GroupFactory) CreateBatchV ¶
CreateBatchV return a []model.Group slice
func (*GroupFactory) SetCategory ¶
func (f *GroupFactory) SetCategory(i model.GroupCategory) *GroupBuilder
SetCategory set the Category field
func (*GroupFactory) SetName ¶
func (f *GroupFactory) SetName(i string) *GroupBuilder
SetName set the Name field
type GroupMetaFactory ¶
type GroupMetaFactory struct {
// contains filtered or unexported fields
}
func (*GroupMetaFactory) Build ¶
func (f *GroupMetaFactory) Build() *GroupFactory
Build create a GroupFactory from GroupMetaFactory
func (*GroupMetaFactory) SetAfterCreateFunc ¶
func (f *GroupMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.Group) error) *GroupMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*GroupMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
func (f *GroupMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.Group) error) *GroupMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*GroupMetaFactory) SetCategoryDefault ¶
func (f *GroupMetaFactory) SetCategoryDefault(v model.GroupCategory) *GroupMetaFactory
SetCategoryDefault assign a default value to Category field
func (*GroupMetaFactory) SetCategoryFactory ¶
func (f *GroupMetaFactory) SetCategoryFactory(fn func(ctx context.Context) (model.GroupCategory, error)) *GroupMetaFactory
SetCategoryFactory register a factory function and assign return value to Category, you can also use related factory's Create/CreateV as input function here
func (*GroupMetaFactory) SetCategoryLazy ¶
func (f *GroupMetaFactory) SetCategoryLazy(fn func(ctx context.Context, i *model.Group) (model.GroupCategory, error)) *GroupMetaFactory
SetCategoryLazy register a function which accept the build struct and set return value to Category field
func (*GroupMetaFactory) SetCategorySequence ¶
func (f *GroupMetaFactory) SetCategorySequence(fn func(ctx context.Context, i int) (model.GroupCategory, error)) *GroupMetaFactory
SetCategorySequence register a function which accept a sequence counter and set return value to Category field
func (*GroupMetaFactory) SetNameDefault ¶
func (f *GroupMetaFactory) SetNameDefault(v string) *GroupMetaFactory
SetNameDefault assign a default value to Name field
func (*GroupMetaFactory) SetNameFactory ¶
func (f *GroupMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *GroupMetaFactory
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 (*GroupMetaFactory) SetNameLazy ¶
func (f *GroupMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.Group) (string, error)) *GroupMetaFactory
SetNameLazy register a function which accept the build struct and set return value to Name field
func (*GroupMetaFactory) SetNameSequence ¶
func (f *GroupMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *GroupMetaFactory
SetNameSequence register a function which accept a sequence counter and set return value to Name field
type UserBuilder ¶
type UserBuilder struct {
// contains filtered or unexported fields
}
func (*UserBuilder) CreateBatch ¶
func (*UserBuilder) CreateBatchV ¶
func (*UserBuilder) SetEmail ¶
func (b *UserBuilder) SetEmail(i string) *UserBuilder
SetEmail set the Email field
func (*UserBuilder) SetFooPost ¶
func (b *UserBuilder) SetFooPost(i string) *UserBuilder
SetFooPost call the post function with string input
func (*UserBuilder) SetGroup ¶
func (b *UserBuilder) SetGroup(i *model.Group) *UserBuilder
SetGroup set the Group field
func (*UserBuilder) SetName ¶
func (b *UserBuilder) SetName(i string) *UserBuilder
SetName set the Name field
func (*UserBuilder) SetTitle ¶
func (b *UserBuilder) SetTitle(i string) *UserBuilder
SetTitle set the Title field
func (*UserBuilder) WithAnonymousTrait ¶
func (b *UserBuilder) WithAnonymousTrait() *UserBuilder
WithAnonymousTrait() enable the Anonymous trait
func (*UserBuilder) WithDefaultTrait ¶
func (b *UserBuilder) WithDefaultTrait() *UserBuilder
WithDefaultTrait() enable the Default trait
func (*UserBuilder) WithFactoryTrait ¶
func (b *UserBuilder) WithFactoryTrait() *UserBuilder
WithFactoryTrait() enable the Factory trait
func (*UserBuilder) WithLazyTrait ¶
func (b *UserBuilder) WithLazyTrait() *UserBuilder
WithLazyTrait() enable the Lazy trait
func (*UserBuilder) WithMixemailTrait ¶
func (b *UserBuilder) WithMixemailTrait() *UserBuilder
WithMixemailTrait() enable the Mixemail trait
func (*UserBuilder) WithMixnameTrait ¶
func (b *UserBuilder) WithMixnameTrait() *UserBuilder
WithMixnameTrait() enable the Mixname trait
func (*UserBuilder) WithMixtitleTrait ¶
func (b *UserBuilder) WithMixtitleTrait() *UserBuilder
WithMixtitleTrait() enable the Mixtitle trait
func (*UserBuilder) WithNilTrait ¶
func (b *UserBuilder) WithNilTrait() *UserBuilder
WithNilTrait() enable the Nil trait
func (*UserBuilder) WithSequenceTrait ¶
func (b *UserBuilder) WithSequenceTrait() *UserBuilder
WithSequenceTrait() enable the Sequence trait
type UserFactory ¶
type UserFactory struct {
// contains filtered or unexported fields
}
func (*UserFactory) CreateBatch ¶
CreateBatch return a []*model.User slice
func (*UserFactory) CreateBatchV ¶
CreateBatchV return a []model.User slice
func (*UserFactory) SetEmail ¶
func (f *UserFactory) SetEmail(i string) *UserBuilder
SetEmail set the Email field
func (*UserFactory) SetFooPost ¶
func (f *UserFactory) SetFooPost(i string) *UserBuilder
SetFooPost call the post function with string input
func (*UserFactory) SetGroup ¶
func (f *UserFactory) SetGroup(i *model.Group) *UserBuilder
SetGroup set the Group field
func (*UserFactory) SetName ¶
func (f *UserFactory) SetName(i string) *UserBuilder
SetName set the Name field
func (*UserFactory) SetTitle ¶
func (f *UserFactory) SetTitle(i string) *UserBuilder
SetTitle set the Title field
func (*UserFactory) WithAnonymousTrait ¶
func (f *UserFactory) WithAnonymousTrait() *UserBuilder
WithAnonymousTrait() enable the Anonymous trait
func (*UserFactory) WithDefaultTrait ¶
func (f *UserFactory) WithDefaultTrait() *UserBuilder
WithDefaultTrait() enable the Default trait
func (*UserFactory) WithFactoryTrait ¶
func (f *UserFactory) WithFactoryTrait() *UserBuilder
WithFactoryTrait() enable the Factory trait
func (*UserFactory) WithLazyTrait ¶
func (f *UserFactory) WithLazyTrait() *UserBuilder
WithLazyTrait() enable the Lazy trait
func (*UserFactory) WithMixemailTrait ¶
func (f *UserFactory) WithMixemailTrait() *UserBuilder
WithMixemailTrait() enable the Mixemail trait
func (*UserFactory) WithMixnameTrait ¶
func (f *UserFactory) WithMixnameTrait() *UserBuilder
WithMixnameTrait() enable the Mixname trait
func (*UserFactory) WithMixtitleTrait ¶
func (f *UserFactory) WithMixtitleTrait() *UserBuilder
WithMixtitleTrait() enable the Mixtitle trait
func (*UserFactory) WithNilTrait ¶
func (f *UserFactory) WithNilTrait() *UserBuilder
WithNilTrait() enable the Nil trait
func (*UserFactory) WithSequenceTrait ¶
func (f *UserFactory) WithSequenceTrait() *UserBuilder
WithSequenceTrait() enable the Sequence trait
type UserMetaFactory ¶
type UserMetaFactory struct {
// contains filtered or unexported fields
}
func (*UserMetaFactory) Build ¶
func (f *UserMetaFactory) Build() *UserFactory
Build create a UserFactory from UserMetaFactory
func (*UserMetaFactory) SetAfterCreateFunc ¶
func (f *UserMetaFactory) SetAfterCreateFunc(fn func(ctx context.Context, i *model.User) error) *UserMetaFactory
SetAfterCreateFunc register a function to be called after struct create
func (*UserMetaFactory) SetAnonymousTrait ¶
func (f *UserMetaFactory) SetAnonymousTrait(t *userTrait) *UserMetaFactory
SetAnonymousTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetBeforeCreateFunc ¶ added in v0.1.1
func (f *UserMetaFactory) SetBeforeCreateFunc(fn func(ctx context.Context, i *model.User) error) *UserMetaFactory
SetBeforeCreateFunc register a function to be called before struct create
func (*UserMetaFactory) SetDefaultTrait ¶
func (f *UserMetaFactory) SetDefaultTrait(t *userTrait) *UserMetaFactory
SetDefaultTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetEmailDefault ¶
func (f *UserMetaFactory) SetEmailDefault(v string) *UserMetaFactory
SetEmailDefault assign a default value to Email field
func (*UserMetaFactory) SetEmailFactory ¶
func (f *UserMetaFactory) SetEmailFactory(fn func(ctx context.Context) (string, error)) *UserMetaFactory
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 (*UserMetaFactory) SetEmailLazy ¶
func (f *UserMetaFactory) SetEmailLazy(fn func(ctx context.Context, i *model.User) (string, error)) *UserMetaFactory
SetEmailLazy register a function which accept the build struct and set return value to Email field
func (*UserMetaFactory) SetEmailSequence ¶
func (f *UserMetaFactory) SetEmailSequence(fn func(ctx context.Context, i int) (string, error)) *UserMetaFactory
SetEmailSequence register a function which accept a sequence counter and set return value to Email field
func (*UserMetaFactory) SetFactoryTrait ¶
func (f *UserMetaFactory) SetFactoryTrait(t *userTrait) *UserMetaFactory
SetFactoryTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetFooPostFunc ¶
func (f *UserMetaFactory) SetFooPostFunc(fn func(ctx context.Context, set bool, obj *model.User, i string) error) *UserMetaFactory
SetFooPostFunc register a post function which will be called in factory SetFooPost method
func (*UserMetaFactory) SetGroupDefault ¶
func (f *UserMetaFactory) SetGroupDefault(v *model.Group) *UserMetaFactory
SetGroupDefault assign a default value to Group field
func (*UserMetaFactory) SetGroupFactory ¶
func (f *UserMetaFactory) SetGroupFactory(fn func(ctx context.Context) (*model.Group, error)) *UserMetaFactory
SetGroupFactory register a factory function and assign return value to Group, you can also use related factory's Create/CreateV as input function here
func (*UserMetaFactory) SetGroupLazy ¶
func (f *UserMetaFactory) SetGroupLazy(fn func(ctx context.Context, i *model.User) (*model.Group, error)) *UserMetaFactory
SetGroupLazy register a function which accept the build struct and set return value to Group field
func (*UserMetaFactory) SetGroupSequence ¶
func (f *UserMetaFactory) SetGroupSequence(fn func(ctx context.Context, i int) (*model.Group, error)) *UserMetaFactory
SetGroupSequence register a function which accept a sequence counter and set return value to Group field
func (*UserMetaFactory) SetLazyTrait ¶
func (f *UserMetaFactory) SetLazyTrait(t *userTrait) *UserMetaFactory
SetLazyTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetMixemailTrait ¶
func (f *UserMetaFactory) SetMixemailTrait(t *userTrait) *UserMetaFactory
SetMixemailTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetMixnameTrait ¶
func (f *UserMetaFactory) SetMixnameTrait(t *userTrait) *UserMetaFactory
SetMixnameTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetMixtitleTrait ¶
func (f *UserMetaFactory) SetMixtitleTrait(t *userTrait) *UserMetaFactory
SetMixtitleTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetNameDefault ¶
func (f *UserMetaFactory) SetNameDefault(v string) *UserMetaFactory
SetNameDefault assign a default value to Name field
func (*UserMetaFactory) SetNameFactory ¶
func (f *UserMetaFactory) SetNameFactory(fn func(ctx context.Context) (string, error)) *UserMetaFactory
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 (*UserMetaFactory) SetNameLazy ¶
func (f *UserMetaFactory) SetNameLazy(fn func(ctx context.Context, i *model.User) (string, error)) *UserMetaFactory
SetNameLazy register a function which accept the build struct and set return value to Name field
func (*UserMetaFactory) SetNameSequence ¶
func (f *UserMetaFactory) SetNameSequence(fn func(ctx context.Context, i int) (string, error)) *UserMetaFactory
SetNameSequence register a function which accept a sequence counter and set return value to Name field
func (*UserMetaFactory) SetNilTrait ¶
func (f *UserMetaFactory) SetNilTrait(t *userTrait) *UserMetaFactory
SetNilTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetSequenceTrait ¶
func (f *UserMetaFactory) SetSequenceTrait(t *userTrait) *UserMetaFactory
SetSequenceTrait accept a userTrait, will override builder using Trait's methods if enable
func (*UserMetaFactory) SetTitleDefault ¶
func (f *UserMetaFactory) SetTitleDefault(v string) *UserMetaFactory
SetTitleDefault assign a default value to Title field
func (*UserMetaFactory) SetTitleFactory ¶
func (f *UserMetaFactory) SetTitleFactory(fn func(ctx context.Context) (string, error)) *UserMetaFactory
SetTitleFactory register a factory function and assign return value to Title, you can also use related factory's Create/CreateV as input function here
func (*UserMetaFactory) SetTitleLazy ¶
func (f *UserMetaFactory) SetTitleLazy(fn func(ctx context.Context, i *model.User) (string, error)) *UserMetaFactory
SetTitleLazy register a function which accept the build struct and set return value to Title field
func (*UserMetaFactory) SetTitleSequence ¶
func (f *UserMetaFactory) SetTitleSequence(fn func(ctx context.Context, i int) (string, error)) *UserMetaFactory
SetTitleSequence register a function which accept a sequence counter and set return value to Title field