1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00
go-micro/services
2021-12-24 11:43:20 +00:00
..
address Update services/ (#2392) 2021-12-21 13:18:29 +00:00
answer Update services/ (#2392) 2021-12-21 13:18:29 +00:00
app Update services/ (#2392) 2021-12-21 13:18:29 +00:00
avatar Update services/ (#2392) 2021-12-21 13:18:29 +00:00
cache Update services/ (#2392) 2021-12-21 13:18:29 +00:00
client Update services/ (#2392) 2021-12-21 13:18:29 +00:00
cmd/m3o-go-url Update services/ (#2392) 2021-12-21 13:18:29 +00:00
contact Update services/ (#2392) 2021-12-21 13:18:29 +00:00
crypto Update services/ (#2392) 2021-12-21 13:18:29 +00:00
currency Update services/ (#2392) 2021-12-21 13:18:29 +00:00
db Update services/ (#2392) 2021-12-21 13:18:29 +00:00
email Update services/ (#2392) 2021-12-21 13:18:29 +00:00
emoji Update services/ (#2392) 2021-12-21 13:18:29 +00:00
evchargers Update services/ (#2392) 2021-12-21 13:18:29 +00:00
event Update services/ (#2392) 2021-12-21 13:18:29 +00:00
file Update services/ (#2392) 2021-12-21 13:18:29 +00:00
forex Update services/ (#2392) 2021-12-21 13:18:29 +00:00
function Update services/ (#2392) 2021-12-21 13:18:29 +00:00
geocoding Update services/ (#2392) 2021-12-21 13:18:29 +00:00
gifs Update services/ (#2392) 2021-12-21 13:18:29 +00:00
google Update services/ (#2392) 2021-12-21 13:18:29 +00:00
helloworld Update services/ (#2392) 2021-12-21 13:18:29 +00:00
holidays Update services/ (#2392) 2021-12-21 13:18:29 +00:00
id Update services/ (#2392) 2021-12-21 13:18:29 +00:00
image Update services/ (#2392) 2021-12-21 13:18:29 +00:00
ip Update services/ (#2392) 2021-12-21 13:18:29 +00:00
joke Update services/ (#2392) 2021-12-21 13:18:29 +00:00
location Update services/ (#2392) 2021-12-21 13:18:29 +00:00
movie Update services/ (#2392) 2021-12-21 13:18:29 +00:00
mq Update services/ (#2392) 2021-12-21 13:18:29 +00:00
news Update services/ (#2392) 2021-12-21 13:18:29 +00:00
nft Update services/ (#2392) 2021-12-21 13:18:29 +00:00
notes Update services/ (#2392) 2021-12-21 13:18:29 +00:00
otp Update services/ (#2392) 2021-12-21 13:18:29 +00:00
postcode Update services/ (#2392) 2021-12-21 13:18:29 +00:00
prayer Update services/ (#2392) 2021-12-21 13:18:29 +00:00
qr Update services/ (#2392) 2021-12-21 13:18:29 +00:00
quran Update services/ (#2392) 2021-12-21 13:18:29 +00:00
routing Update services/ (#2392) 2021-12-21 13:18:29 +00:00
rss Update services/ (#2392) 2021-12-21 13:18:29 +00:00
search Update services/ (#2392) 2021-12-21 13:18:29 +00:00
sentiment Update services/ (#2392) 2021-12-21 13:18:29 +00:00
sms Update services/ (#2392) 2021-12-21 13:18:29 +00:00
space Update services/ (#2392) 2021-12-21 13:18:29 +00:00
spam Update services/ (#2392) 2021-12-21 13:18:29 +00:00
stock Update services/ (#2392) 2021-12-21 13:18:29 +00:00
stream Update services/ (#2392) 2021-12-21 13:18:29 +00:00
sunnah Update services/ (#2392) 2021-12-21 13:18:29 +00:00
thumbnail Update services/ (#2392) 2021-12-21 13:18:29 +00:00
time Update services/ (#2392) 2021-12-21 13:18:29 +00:00
translate Update services/ (#2392) 2021-12-21 13:18:29 +00:00
twitter Update services/ (#2392) 2021-12-21 13:18:29 +00:00
url Update services/ (#2392) 2021-12-21 13:18:29 +00:00
user Update services/ (#2392) 2021-12-21 13:18:29 +00:00
vehicle Update services/ (#2392) 2021-12-21 13:18:29 +00:00
weather Update services/ (#2392) 2021-12-21 13:18:29 +00:00
youtube Update services/ (#2392) 2021-12-21 13:18:29 +00:00
go.mod Update services/ (#2392) 2021-12-21 13:18:29 +00:00
go.sum Update services/ (#2392) 2021-12-21 13:18:29 +00:00
README.md go-micro.dev/v4 (#2305) 2021-10-12 12:55:53 +01:00
services.go Update and rename m3o.go to services.go 2021-12-24 11:43:20 +00:00

Services

Micro Services provide additional functionality via external third party services.

Overview

Go Micro provides core abstractions for building distributed systems which are likely direct dependencies on locally hosted infrastructure. In the case of external services such as sending email, sms, etc we leave this up to the user. Yet they are becoming more core to all forms of distributed systems development beyond infrastructure.

This directory serves as guidance for accessing external Micro services managed and hosted by m3o.com and powered by Micro.

Features

The types of services available are as follows:

  • Address - Address lookup by postcode
  • Answer - Instant answers to any question
  • Cache - Quick access key-value storage
  • Crypto - Cryptocurrency prices, quotes, and news
  • Currency - Exchange rates and currency conversion
  • Db - Simple database service
  • Email - Send emails in a flash
  • Emoji - All the emojis you need 🎉
  • File - Store, list, and retrieve text files
  • Forex - Foreign exchange (FX) rates
  • Geocoding - Geocode an address to gps location and the reverse.
  • Helloworld - Just saying hello world
  • Holidays - Find the holidays observed in a particular country
  • Id - Generate unique IDs (uuid, snowflake, etc)
  • Image - Quickly upload, resize, and convert images
  • Ip - IP to geolocation lookup
  • Location - Real time GPS location tracking and search
  • Otp - One time password generation
  • Postcode - Fast UK postcode lookup
  • Prayer - Islamic prayer times
  • Qr - QR code generator
  • Quran - The Holy Quran
  • Routing - Etas, routes and turn by turn directions
  • Rss - RSS feed crawler and reader
  • Sentiment - Real time sentiment analysis
  • Sms - Send an SMS message
  • Stock - Live stock quotes and prices
  • Stream - Publish and subscribe to messages
  • Sunnah - Traditions and practices of the Islamic prophet, Muhammad (pbuh)
  • Thumbnail - Create website thumbnails
  • Time - Time, date, and timezone info
  • Twitter - Realtime twitter timeline & search
  • Url - URL shortening, sharing, and tracking
  • User - User management and authentication
  • Weather - Real time weather forecast

Explore

The source code for all services exist in github.com/micro/services.

The hosted versions of all services can be found on m3o.com.

Usage

  • Head to m3o.com and signup for a free account.
  • Generate an API key on the Settings page.
  • Browse the APIs on the Explore page.
  • Call any API using your token in the Authorization: Bearer [Token] header and https://api.m3o.com/v1/[service]/[endpoint] url.

Example

Find the service you're looking for and browse to its API page e.g https://m3o.com/currency/api.

Copy the example for the relevant endpoint

package main

import (
	"fmt"
	"os"

	"go-micro.dev/v4/services/currency"
)

var (
	token = os.Getenv("MICRO_API_TOKEN")
)

func main() {
	// Convert returns the currency conversion rate between two pairs e.g USD/GBP
	currencyService := currency.NewCurrencyService(token)

	rsp, err := currencyService.Convert(&currency.ConvertRequest{
		From: "USD",
		To:   "GBP",
	})

	// {
	//	"from": "USD",
	//	"to": "GBP",
	//	"rate": 0.7104
	// }
	fmt.Println(rsp, err)
}