Documentation ¶
Index ¶
- func CreateRandomScooter(s *ScooterDataSeeder) (*string, error)
- func ShiftLocation(latitude, longitude float64, distance float64, bearing int) (lat, lng float64)
- type ScooterDataSeeder
- type ScooterDataSeederOptions
- func WithDistanceShift(distance float64) ScooterDataSeederOptions
- func WithLat(lat float64) ScooterDataSeederOptions
- func WithLng(lng float64) ScooterDataSeederOptions
- func WithNumberOfInitialScooters(c int) ScooterDataSeederOptions
- func WithScooterPerCircle(spc int) ScooterDataSeederOptions
- func WithStartDelay(delay time.Duration) ScooterDataSeederOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRandomScooter ¶
func CreateRandomScooter(s *ScooterDataSeeder) (*string, error)
Types ¶
type ScooterDataSeeder ¶
type ScooterDataSeeder struct {
// contains filtered or unexported fields
}
func NewScooterDataSeeder ¶
func NewScooterDataSeeder(ctx context.Context, DB *mongo.Database, options ...ScooterDataSeederOptions) *ScooterDataSeeder
func (*ScooterDataSeeder) Start ¶
func (s *ScooterDataSeeder) Start()
type ScooterDataSeederOptions ¶
type ScooterDataSeederOptions func(s *ScooterDataSeeder)
func WithDistanceShift ¶
func WithDistanceShift(distance float64) ScooterDataSeederOptions
func WithLat ¶
func WithLat(lat float64) ScooterDataSeederOptions
func WithLng ¶
func WithLng(lng float64) ScooterDataSeederOptions
func WithNumberOfInitialScooters ¶
func WithNumberOfInitialScooters(c int) ScooterDataSeederOptions
func WithScooterPerCircle ¶
func WithScooterPerCircle(spc int) ScooterDataSeederOptions
func WithStartDelay ¶
func WithStartDelay(delay time.Duration) ScooterDataSeederOptions
Click to show internal directories.
Click to hide internal directories.