seeder

package
v0.0.0-...-b412545 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomScooter

func CreateRandomScooter(s *ScooterDataSeeder) (*string, error)

func ShiftLocation

func ShiftLocation(latitude, longitude float64, distance float64, bearing int) (lat, lng float64)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL