Documentation ¶
Overview ¶
Package generator provides an interface to generate values
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPayload ¶
GetPayload returns the payload in bytes array format
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator holds the parameters required to generate Data and the paylod generated
func NewGenerator ¶
func NewGenerator(opts ...GeneratorOption) (*Generator, error)
NewGenerator creates a new generator structure
type GeneratorOption ¶
GeneratorOption holds the function option for generator
func Generate ¶
func Generate(t GeneratorType) GeneratorOption
Generate the payload depending on the type of generator
func WithOWeatherConfig ¶
func WithOWeatherConfig(apikey string, city string) GeneratorOption
WithOWeatherConfig creates the structure with OW options
func WithRandomBase ¶
func WithRandomBase( temperature_base float64, humidity_base float64, pressure_base float64, temperature_variation float64, humidity_variation float64, pressure_variation float64, ) GeneratorOption
WithRandomBase creates the structure for random values
type GeneratorType ¶
type GeneratorType int
GeneratorType is an alias for the enumeration value of the generator
const ( Random GeneratorType = iota // Random generator type OpenWeather GeneratorType = iota // OpenWeather generator type )
Directories ¶
Path | Synopsis |
---|---|
Package converter converts datatypes to array of bytes
|
Package converter converts datatypes to array of bytes |
Package openweather provides interface to openweather Based on https://gist.github.com/aodin/9493190 https://medium.com/@xcoulon/nested-structs-in-golang-2c750403a007
|
Package openweather provides interface to openweather Based on https://gist.github.com/aodin/9493190 https://medium.com/@xcoulon/nested-structs-in-golang-2c750403a007 |
Package random provides functions to generate random values for metheorological data
|
Package random provides functions to generate random values for metheorological data |
Click to show internal directories.
Click to hide internal directories.