This is an API written in Go to get and manipulate current weather datas.
317
This is a Go package using OpenWeatherMap to get and manipulate current weather datas from a wished city in a wished country.
This project is about the development of a Go package using OpenWeatherMap to get and manipulate current weather datas from a wished city in a wished country. This repository is composed of one Go file named weathermodule.go which contain the WeatherModule main type to get, to encapsulate and to manage weather, one Dockerfile to build your own Docker image to run examples, one LICENCE file to define the license (here the GNU version 3.0 one), the src directory which contains all defined classes used in the WeatherModule type definition and the tthe samples directory which contain all defined samples to test locally the WeatherModule type, all of the other types used to define weather and their functions.
You can test all available samples with Docker. That will permit you to test the Go package, to study it, and to show how to integrate it in your own project. There are 2 ways to run the samples via Docker and to study their integration in it: with the current project's Dockerfile or the official Docker images hosted in the Docker Hub web service.
A Docker image to running weathermodule samples is available on Docker Hub service, just here.
To running it and finaly enjoy all samples of the API, please follow the instructions below:
# Pulling the 'weathermodule' from Docker hub in the current machine...
docker pull wicken/weathermodule:latest
# Running the 'weathermodule' Docker image as a Docker container to test all of the Go samples...
docker container run -it wicken/weathermodule:latest
Now enjoy !
The users can also build their own Docker image to running weathermodule samples using the current Dockerfile.
To build, run it and finaly enjoy all samples of the API, please follow the instructions below:
# Cloning the the 'weathermodule' project from GitHub...
git clone https://github.com/Vicken-Ghoubiguian/weathermodule
# Placing in the 'weathermodule' GitHub project's folder...
cd weathermodule
# Creating the weathermodule Docker image with the value of the user's OpenWeatherMap API key passed into the the parameter 'user_api_key'...
docker build . -t weathermodule:latest --build-arg user_api_key="<wished_openWeatherMap_API_key>"
# Running the 'weathermodule' Docker image as a Docker container to test all of the Go samples...
docker container run -it weathermodule:latest
Now enjoy !
It has been an exciting project, easily usable by anyone in any other project written in Go language regardless of its size (large or small) and which has broadened my knowledge in Go language development as potentially every other beginner or confirmed developer.
Content type
Image
Digest
Size
295.6 MB
Last updated
over 5 years ago
docker pull wicken/weathermodule