Skip to content

Go program that fetches water temperature information from an API.

Notifications You must be signed in to change notification settings

fredrikwangberg/watertemp-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watertemp

A Go program developed for learning purposes, that fetches water temperature information from a public API.

Datasource

The data retrieved is published by Södertälje kommun. It represents the water temperature at locations around Södertälje. The endpoint used in this project exposes the most recently available data, i.e. it answers the question "What temperature is it right now?". Example:

[
  {
    "type": "Watertemp",
    "temp_water": 7.8,
    "formatted_time": "Nov 02 2021 20:10:14",
    "alias": "Eklundsnäsbadet",
    "ts": 1635880214580,
    "latitude": 59.16883,
    "longitude": 17.59184,
    "gmap": "https://www.google.com/maps/search/?api=1&query=59.16883,17.59184"
  },
  ...
] 

For more information, see

Project goals

  • Manage to run test files locally
  • Build and test using automated workflow in github
  • Choose cloud provider - Azure
    • Set up account
  • Deploy to Azure
    • Package Golang code. In GitHub?
    • Set up docker image registry in Azure
    • Create environment to run image
    • Start image
  • Create server.go that creates a Golang web server that exposes an api endpoint
    • Decide an API interface, e.g. a json {"location": "a place", "temperature": 123}
    • Create web server
    • Create function that drops data from watertemp schema and converts the data to a json object (name of location and temperature) - create own class
    • Test function (server_test.go)
  • Expose front-end/back-end publically on the internet
  • Automating CI/CD pipeline in github
  • Production/staging environment
  • Create front-end app
    • Create new repository in GitHub, watertemp-app
    • Chose framwork - ask Pär for advice
    • Code
  • Collect data by running the app on a regular basis, insert data in a database
  • Build a new app that analyses the database contents with respect to some basic statistical properties
  • ...

About

Go program that fetches water temperature information from an API.

Resources

Stars

Watchers

Forks

Packages