loader

package
v0.0.0-...-01d1cd0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package loader provides support for update new and old city information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateData

func UpdateData(log *log.Logger, gqlConfig data.GraphQLConfig, traceID string, config Config, search Search) error

UpdateData retrieves and stores the feed data for this API.

func UpdateSchema

func UpdateSchema(gqlConfig data.GraphQLConfig, schemaConfig schema.Config) error

UpdateSchema creates/updates the schema for the database.

Types

type Config

type Config struct {
	Filter Filter
	Keys   Keys
	URL    URL
}

Config defines the set of mandatory settings.

type Filter

type Filter struct {
	Categories []string
	Radius     uint
}

Filter represents search related refinements.

type Keys

type Keys struct {
	MapKey     string
	WeatherKey string
}

Keys represents the set of keys needed for the different API's that are used to retrieve data.

type Search struct {
	CityName    string
	CountryCode string
	Lat         float64
	Lng         float64
}

Search represents a city and its coordinates. All fields must be populated for a Search to be successful.

type URL

type URL struct {
	Advisory string
	Weather  string
}

URL represents the set of url's needed for the different API's that are used to retrieve data.

Jump to

Keyboard shortcuts

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