beater

package
v7.6.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error)

New creates an instance of safecastbeat.

Types

type SFResponse

type SFResponse struct {
	// contains filtered or unexported fields
}

type SafecastResponseData

type SafecastResponseData struct {
	Id                    int     `json:"id"`
	User_id               int     `json:"user_id"`
	Value                 float32 `json:"value"`
	Unit                  string  `json:"unit"`
	Location_name         string  `json:"location_name"`
	Device_id             int     `json:"device_id"`
	Original_id           int     `json:"original_id"`
	Measurement_import_id int     `json:"measurement_import_id"`
	Captured_at           string  `json:"captured_at"`
	Height                int     `json:"height"`
	Devicetype_id         string  `json:"devicetype_id"`
	Sensor_id             int     `json:"sensor_id"`
	Station_id            int     `json:"station_id"`
	Channel_id            int     `json:"channel_id"`
	Latitude              float32 `json:"latitude"`
	Longitude             float32 `json:"longitude"`
}

type Safecastbeat

type Safecastbeat struct {
	// contains filtered or unexported fields
}

Safecastbeat configuration.

func (*Safecastbeat) GetSafecast

func (bt *Safecastbeat) GetSafecast(b *beat.Beat, lastRun time.Time, CAFile string) (error, SFResponse)

func (*Safecastbeat) Run

func (bt *Safecastbeat) Run(b *beat.Beat) error

Run starts safecastbeat.

func (*Safecastbeat) Stop

func (bt *Safecastbeat) Stop()

Stop stops safecastbeat.

func (*Safecastbeat) TransformStationData

func (bt *Safecastbeat) TransformStationData(data []SafecastResponseData) []common.MapStr

Jump to

Keyboard shortcuts

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