Documentation
¶
Index ¶
- Variables
- type DeviceLocationMod
- type DeviceLocationModFunc
- type DeviceLocationModSlice
- type DeviceLocationTemplate
- func (o *DeviceLocationTemplate) Apply(ctx context.Context, mods ...DeviceLocationMod)
- func (o DeviceLocationTemplate) Build() *models.DeviceLocation
- func (o DeviceLocationTemplate) BuildMany(number int) models.DeviceLocationSlice
- func (o DeviceLocationTemplate) BuildManySetter(number int) []*models.DeviceLocationSetter
- func (o DeviceLocationTemplate) BuildSetter() *models.DeviceLocationSetter
- func (o *DeviceLocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.DeviceLocation, error)
- func (o DeviceLocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.DeviceLocationSlice, error)
- func (o DeviceLocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.DeviceLocationSlice
- func (o *DeviceLocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.DeviceLocation
- func (o *DeviceLocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.DeviceLocation
- func (o DeviceLocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.DeviceLocationSlice
- type Factory
- func (f *Factory) AddBaseDeviceLocationMod(mods ...DeviceLocationMod)
- func (f *Factory) AddBaseSchemaMigrationMod(mods ...SchemaMigrationMod)
- func (f *Factory) ClearBaseDeviceLocationMods()
- func (f *Factory) ClearBaseSchemaMigrationMods()
- func (f *Factory) FromExistingDeviceLocation(m *models.DeviceLocation) *DeviceLocationTemplate
- func (f *Factory) FromExistingSchemaMigration(m *models.SchemaMigration) *SchemaMigrationTemplate
- func (f *Factory) NewDeviceLocation(mods ...DeviceLocationMod) *DeviceLocationTemplate
- func (f *Factory) NewDeviceLocationWithContext(ctx context.Context, mods ...DeviceLocationMod) *DeviceLocationTemplate
- func (f *Factory) NewSchemaMigration(mods ...SchemaMigrationMod) *SchemaMigrationTemplate
- func (f *Factory) NewSchemaMigrationWithContext(ctx context.Context, mods ...SchemaMigrationMod) *SchemaMigrationTemplate
- type SchemaMigrationMod
- type SchemaMigrationModFunc
- type SchemaMigrationModSlice
- type SchemaMigrationTemplate
- func (o *SchemaMigrationTemplate) Apply(ctx context.Context, mods ...SchemaMigrationMod)
- func (o SchemaMigrationTemplate) Build() *models.SchemaMigration
- func (o SchemaMigrationTemplate) BuildMany(number int) models.SchemaMigrationSlice
- func (o SchemaMigrationTemplate) BuildManySetter(number int) []*models.SchemaMigrationSetter
- func (o SchemaMigrationTemplate) BuildSetter() *models.SchemaMigrationSetter
- func (o *SchemaMigrationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.SchemaMigration, error)
- func (o SchemaMigrationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.SchemaMigrationSlice, error)
- func (o SchemaMigrationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.SchemaMigrationSlice
- func (o *SchemaMigrationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.SchemaMigration
- func (o *SchemaMigrationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.SchemaMigration
- func (o SchemaMigrationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.SchemaMigrationSlice
Constants ¶
This section is empty.
Variables ¶
var DeviceLocationMods deviceLocationMods
DeviceLocation has methods that act as mods for the DeviceLocationTemplate
var SchemaMigrationMods schemaMigrationMods
SchemaMigration has methods that act as mods for the SchemaMigrationTemplate
Functions ¶
This section is empty.
Types ¶
type DeviceLocationMod ¶
type DeviceLocationMod interface {
Apply(context.Context, *DeviceLocationTemplate)
}
type DeviceLocationModFunc ¶
type DeviceLocationModFunc func(context.Context, *DeviceLocationTemplate)
func (DeviceLocationModFunc) Apply ¶
func (f DeviceLocationModFunc) Apply(ctx context.Context, n *DeviceLocationTemplate)
type DeviceLocationModSlice ¶
type DeviceLocationModSlice []DeviceLocationMod
func (DeviceLocationModSlice) Apply ¶
func (mods DeviceLocationModSlice) Apply(ctx context.Context, n *DeviceLocationTemplate)
type DeviceLocationTemplate ¶
type DeviceLocationTemplate struct {
Time func() time.Time
DeviceID func() string
SpaceSlug func() string
Latitude func() float64
Longitude func() float64
Accuracy func() float64
// contains filtered or unexported fields
}
DeviceLocationTemplate is an object representing the database table. all columns are optional and should be set by mods
func (*DeviceLocationTemplate) Apply ¶
func (o *DeviceLocationTemplate) Apply(ctx context.Context, mods ...DeviceLocationMod)
Apply mods to the DeviceLocationTemplate
func (DeviceLocationTemplate) Build ¶
func (o DeviceLocationTemplate) Build() *models.DeviceLocation
Build returns an *models.DeviceLocation Related objects are also created and placed in the .R field NOTE: Objects are not inserted into the database. Use DeviceLocationTemplate.Create
func (DeviceLocationTemplate) BuildMany ¶
func (o DeviceLocationTemplate) BuildMany(number int) models.DeviceLocationSlice
BuildMany returns an models.DeviceLocationSlice Related objects are also created and placed in the .R field NOTE: Objects are not inserted into the database. Use DeviceLocationTemplate.CreateMany
func (DeviceLocationTemplate) BuildManySetter ¶
func (o DeviceLocationTemplate) BuildManySetter(number int) []*models.DeviceLocationSetter
BuildManySetter returns an []*models.DeviceLocationSetter this does nothing with the relationship templates
func (DeviceLocationTemplate) BuildSetter ¶
func (o DeviceLocationTemplate) BuildSetter() *models.DeviceLocationSetter
BuildSetter returns an *models.DeviceLocationSetter this does nothing with the relationship templates
func (*DeviceLocationTemplate) Create ¶
func (o *DeviceLocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.DeviceLocation, error)
Create builds a deviceLocation and inserts it into the database Relations objects are also inserted and placed in the .R field
func (DeviceLocationTemplate) CreateMany ¶
func (o DeviceLocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.DeviceLocationSlice, error)
CreateMany builds multiple deviceLocations and inserts them into the database Relations objects are also inserted and placed in the .R field
func (DeviceLocationTemplate) CreateManyOrFail ¶
func (o DeviceLocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.DeviceLocationSlice
CreateManyOrFail builds multiple deviceLocations and inserts them into the database Relations objects are also inserted and placed in the .R field It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (*DeviceLocationTemplate) CreateOrFail ¶
func (o *DeviceLocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.DeviceLocation
CreateOrFail builds a deviceLocation and inserts it into the database Relations objects are also inserted and placed in the .R field It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (*DeviceLocationTemplate) MustCreate ¶
func (o *DeviceLocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.DeviceLocation
MustCreate builds a deviceLocation and inserts it into the database Relations objects are also inserted and placed in the .R field panics if an error occurs
func (DeviceLocationTemplate) MustCreateMany ¶
func (o DeviceLocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.DeviceLocationSlice
MustCreateMany builds multiple deviceLocations and inserts them into the database Relations objects are also inserted and placed in the .R field panics if an error occurs
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func (*Factory) AddBaseDeviceLocationMod ¶
func (f *Factory) AddBaseDeviceLocationMod(mods ...DeviceLocationMod)
func (*Factory) AddBaseSchemaMigrationMod ¶
func (f *Factory) AddBaseSchemaMigrationMod(mods ...SchemaMigrationMod)
func (*Factory) ClearBaseDeviceLocationMods ¶
func (f *Factory) ClearBaseDeviceLocationMods()
func (*Factory) ClearBaseSchemaMigrationMods ¶
func (f *Factory) ClearBaseSchemaMigrationMods()
func (*Factory) FromExistingDeviceLocation ¶
func (f *Factory) FromExistingDeviceLocation(m *models.DeviceLocation) *DeviceLocationTemplate
func (*Factory) FromExistingSchemaMigration ¶
func (f *Factory) FromExistingSchemaMigration(m *models.SchemaMigration) *SchemaMigrationTemplate
func (*Factory) NewDeviceLocation ¶
func (f *Factory) NewDeviceLocation(mods ...DeviceLocationMod) *DeviceLocationTemplate
func (*Factory) NewDeviceLocationWithContext ¶
func (f *Factory) NewDeviceLocationWithContext(ctx context.Context, mods ...DeviceLocationMod) *DeviceLocationTemplate
func (*Factory) NewSchemaMigration ¶
func (f *Factory) NewSchemaMigration(mods ...SchemaMigrationMod) *SchemaMigrationTemplate
func (*Factory) NewSchemaMigrationWithContext ¶
func (f *Factory) NewSchemaMigrationWithContext(ctx context.Context, mods ...SchemaMigrationMod) *SchemaMigrationTemplate
type SchemaMigrationMod ¶
type SchemaMigrationMod interface {
Apply(context.Context, *SchemaMigrationTemplate)
}
type SchemaMigrationModFunc ¶
type SchemaMigrationModFunc func(context.Context, *SchemaMigrationTemplate)
func (SchemaMigrationModFunc) Apply ¶
func (f SchemaMigrationModFunc) Apply(ctx context.Context, n *SchemaMigrationTemplate)
type SchemaMigrationModSlice ¶
type SchemaMigrationModSlice []SchemaMigrationMod
func (SchemaMigrationModSlice) Apply ¶
func (mods SchemaMigrationModSlice) Apply(ctx context.Context, n *SchemaMigrationTemplate)
type SchemaMigrationTemplate ¶
type SchemaMigrationTemplate struct {
Version func() string
// contains filtered or unexported fields
}
SchemaMigrationTemplate is an object representing the database table. all columns are optional and should be set by mods
func (*SchemaMigrationTemplate) Apply ¶
func (o *SchemaMigrationTemplate) Apply(ctx context.Context, mods ...SchemaMigrationMod)
Apply mods to the SchemaMigrationTemplate
func (SchemaMigrationTemplate) Build ¶
func (o SchemaMigrationTemplate) Build() *models.SchemaMigration
Build returns an *models.SchemaMigration Related objects are also created and placed in the .R field NOTE: Objects are not inserted into the database. Use SchemaMigrationTemplate.Create
func (SchemaMigrationTemplate) BuildMany ¶
func (o SchemaMigrationTemplate) BuildMany(number int) models.SchemaMigrationSlice
BuildMany returns an models.SchemaMigrationSlice Related objects are also created and placed in the .R field NOTE: Objects are not inserted into the database. Use SchemaMigrationTemplate.CreateMany
func (SchemaMigrationTemplate) BuildManySetter ¶
func (o SchemaMigrationTemplate) BuildManySetter(number int) []*models.SchemaMigrationSetter
BuildManySetter returns an []*models.SchemaMigrationSetter this does nothing with the relationship templates
func (SchemaMigrationTemplate) BuildSetter ¶
func (o SchemaMigrationTemplate) BuildSetter() *models.SchemaMigrationSetter
BuildSetter returns an *models.SchemaMigrationSetter this does nothing with the relationship templates
func (*SchemaMigrationTemplate) Create ¶
func (o *SchemaMigrationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.SchemaMigration, error)
Create builds a schemaMigration and inserts it into the database Relations objects are also inserted and placed in the .R field
func (SchemaMigrationTemplate) CreateMany ¶
func (o SchemaMigrationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.SchemaMigrationSlice, error)
CreateMany builds multiple schemaMigrations and inserts them into the database Relations objects are also inserted and placed in the .R field
func (SchemaMigrationTemplate) CreateManyOrFail ¶
func (o SchemaMigrationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.SchemaMigrationSlice
CreateManyOrFail builds multiple schemaMigrations and inserts them into the database Relations objects are also inserted and placed in the .R field It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (*SchemaMigrationTemplate) CreateOrFail ¶
func (o *SchemaMigrationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.SchemaMigration
CreateOrFail builds a schemaMigration and inserts it into the database Relations objects are also inserted and placed in the .R field It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (*SchemaMigrationTemplate) MustCreate ¶
func (o *SchemaMigrationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.SchemaMigration
MustCreate builds a schemaMigration and inserts it into the database Relations objects are also inserted and placed in the .R field panics if an error occurs
func (SchemaMigrationTemplate) MustCreateMany ¶
func (o SchemaMigrationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.SchemaMigrationSlice
MustCreateMany builds multiple schemaMigrations and inserts them into the database Relations objects are also inserted and placed in the .R field panics if an error occurs