mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-24 22:26:54 +02:00
switch services client
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
package address
|
package address
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Address interface {
|
type Address interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package answer
|
package answer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Answer interface {
|
type Answer interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type App interface {
|
type App interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package avatar
|
package avatar
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Avatar interface {
|
type Avatar interface {
|
||||||
|
2
services/cache/cache.go
vendored
2
services/cache/cache.go
vendored
@ -1,7 +1,7 @@
|
|||||||
package cache
|
package cache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Cache interface {
|
type Cache interface {
|
||||||
|
220
services/client/client.go
Normal file
220
services/client/client.go
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
package client
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// local address for api
|
||||||
|
localAddress = "http://localhost:8080"
|
||||||
|
// public address for api
|
||||||
|
liveAddress = "https://api.m3o.com"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Options of the Client
|
||||||
|
type Options struct {
|
||||||
|
// Token for authentication
|
||||||
|
Token string
|
||||||
|
// Address of the micro platform.
|
||||||
|
// By default it connects to live. Change it or use the local flag
|
||||||
|
// to connect to your local installation.
|
||||||
|
Address string
|
||||||
|
// Helper flag to help users connect to the default local address
|
||||||
|
Local bool
|
||||||
|
// set a timeout
|
||||||
|
Timeout time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request is the request of the generic `api-client` call
|
||||||
|
type Request struct {
|
||||||
|
// eg. "go.micro.srv.greeter"
|
||||||
|
Service string `json:"service"`
|
||||||
|
// eg. "Say.Hello"
|
||||||
|
Endpoint string `json:"endpoint"`
|
||||||
|
// json and then base64 encoded body
|
||||||
|
Body string `json:"body"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response is the response of the generic `api-client` call.
|
||||||
|
type Response struct {
|
||||||
|
// json and base64 encoded response body
|
||||||
|
Body string `json:"body"`
|
||||||
|
// error fields. Error json example
|
||||||
|
// {"id":"go.micro.client","code":500,"detail":"malformed method name: \"\"","status":"Internal Server Error"}
|
||||||
|
Code int `json:"code"`
|
||||||
|
ID string `json:"id"`
|
||||||
|
Detail string `json:"detail"`
|
||||||
|
Status string `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Client enables generic calls to micro
|
||||||
|
type Client struct {
|
||||||
|
options Options
|
||||||
|
}
|
||||||
|
|
||||||
|
type Stream struct {
|
||||||
|
conn *websocket.Conn
|
||||||
|
service, endpoint string
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewClient returns a generic micro client that connects to live by default
|
||||||
|
func NewClient(options *Options) *Client {
|
||||||
|
ret := new(Client)
|
||||||
|
ret.options = Options{
|
||||||
|
Address: liveAddress,
|
||||||
|
}
|
||||||
|
|
||||||
|
// no options provided
|
||||||
|
if options == nil {
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
if options.Token != "" {
|
||||||
|
ret.options.Token = options.Token
|
||||||
|
}
|
||||||
|
|
||||||
|
if options.Local {
|
||||||
|
ret.options.Address = localAddress
|
||||||
|
ret.options.Local = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if options.Timeout > 0 {
|
||||||
|
ret.options.Timeout = options.Timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetToken sets the api auth token
|
||||||
|
func (client *Client) SetToken(t string) {
|
||||||
|
client.options.Token = t
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout sets the http client's timeout
|
||||||
|
func (client *Client) SetTimeout(d time.Duration) {
|
||||||
|
client.options.Timeout = d
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call enables you to access any endpoint of any service on Micro
|
||||||
|
func (client *Client) Call(service, endpoint string, request, response interface{}) error {
|
||||||
|
// example curl: curl -XPOST -d '{"service": "go.micro.srv.greeter", "endpoint": "Say.Hello"}'
|
||||||
|
// -H 'Content-Type: application/json' http://localhost:8080/client {"body":"eyJtc2ciOiJIZWxsbyAifQ=="}
|
||||||
|
uri, err := url.Parse(client.options.Address)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the url to go through the v1 api
|
||||||
|
uri.Path = "/v1/" + service + "/" + endpoint
|
||||||
|
|
||||||
|
b, err := marshalRequest(service, endpoint, request)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequest("POST", uri.String(), bytes.NewBuffer(b))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the token if it exists
|
||||||
|
if len(client.options.Token) > 0 {
|
||||||
|
req.Header.Set("Authorization", "Bearer "+client.options.Token)
|
||||||
|
}
|
||||||
|
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
|
||||||
|
// if user didn't specify Timeout the default is 0 i.e no timeout
|
||||||
|
httpClient := &http.Client{
|
||||||
|
Timeout: client.options.Timeout,
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := httpClient.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if !(resp.StatusCode >= 200 && resp.StatusCode < 300) {
|
||||||
|
return errors.New(string(body))
|
||||||
|
}
|
||||||
|
return unmarshalResponse(body, response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stream enables the ability to stream via websockets
|
||||||
|
func (client *Client) Stream(service, endpoint string, request interface{}) (*Stream, error) {
|
||||||
|
b, err := marshalRequest(service, endpoint, request)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
uri, err := url.Parse(client.options.Address)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the url to go through the v1 api
|
||||||
|
uri.Path = "/v1/" + service + "/" + endpoint
|
||||||
|
|
||||||
|
// replace http with websocket
|
||||||
|
uri.Scheme = strings.Replace(uri.Scheme, "http", "ws", 1)
|
||||||
|
|
||||||
|
// create the headers
|
||||||
|
header := make(http.Header)
|
||||||
|
// set the token if it exists
|
||||||
|
if len(client.options.Token) > 0 {
|
||||||
|
header.Set("Authorization", "Bearer "+client.options.Token)
|
||||||
|
}
|
||||||
|
header.Set("Content-Type", "application/json")
|
||||||
|
|
||||||
|
// dial the connection
|
||||||
|
conn, _, err := websocket.DefaultDialer.Dial(uri.String(), header)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// send the first request
|
||||||
|
if err := conn.WriteMessage(websocket.TextMessage, b); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &Stream{conn, service, endpoint}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Stream) Recv(v interface{}) error {
|
||||||
|
// read response
|
||||||
|
_, message, err := s.conn.ReadMessage()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return unmarshalResponse(message, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Stream) Send(v interface{}) error {
|
||||||
|
b, err := marshalRequest(s.service, s.endpoint, v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return s.conn.WriteMessage(websocket.TextMessage, b)
|
||||||
|
}
|
||||||
|
|
||||||
|
func marshalRequest(service, endpoint string, v interface{}) ([]byte, error) {
|
||||||
|
return json.Marshal(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func unmarshalResponse(body []byte, v interface{}) error {
|
||||||
|
return json.Unmarshal(body, &v)
|
||||||
|
}
|
24
services/client/client_test.go
Normal file
24
services/client/client_test.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package client
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestBasicCall(t *testing.T) {
|
||||||
|
if v := os.Getenv("IN_TRAVIS"); v == "yes" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
response := map[string]interface{}{}
|
||||||
|
if err := NewClient(&Options{
|
||||||
|
Token: os.Getenv("TOKEN"),
|
||||||
|
}).Call("groups", "list", map[string]interface{}{
|
||||||
|
"memberId": "random",
|
||||||
|
}, &response); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if len(response) > 0 {
|
||||||
|
t.Fatal(len(response))
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
package contact
|
package contact
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Contact interface {
|
type Contact interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package crypto
|
package crypto
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Crypto interface {
|
type Crypto interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package currency
|
package currency
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Currency interface {
|
type Currency interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Db interface {
|
type Db interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package email
|
package email
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Email interface {
|
type Email interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package emoji
|
package emoji
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Emoji interface {
|
type Emoji interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package evchargers
|
package evchargers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Evchargers interface {
|
type Evchargers interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package event
|
package event
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Event interface {
|
type Event interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package file
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type File interface {
|
type File interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package forex
|
package forex
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Forex interface {
|
type Forex interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package function
|
package function
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Function interface {
|
type Function interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package geocoding
|
package geocoding
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Geocoding interface {
|
type Geocoding interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package gifs
|
package gifs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Gifs interface {
|
type Gifs interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package google
|
package google
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Google interface {
|
type Google interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package helloworld
|
package helloworld
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Helloworld interface {
|
type Helloworld interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package holidays
|
package holidays
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Holidays interface {
|
type Holidays interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package id
|
package id
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Id interface {
|
type Id interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package image
|
package image
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Image interface {
|
type Image interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package ip
|
package ip
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Ip interface {
|
type Ip interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package joke
|
package joke
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Joke interface {
|
type Joke interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package location
|
package location
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Location interface {
|
type Location interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package movie
|
package movie
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Movie interface {
|
type Movie interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package mq
|
package mq
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Mq interface {
|
type Mq interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package news
|
package news
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type News interface {
|
type News interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package nft
|
package nft
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Nft interface {
|
type Nft interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package notes
|
package notes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Notes interface {
|
type Notes interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package otp
|
package otp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Otp interface {
|
type Otp interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package postcode
|
package postcode
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Postcode interface {
|
type Postcode interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package prayer
|
package prayer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Prayer interface {
|
type Prayer interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package qr
|
package qr
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Qr interface {
|
type Qr interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package quran
|
package quran
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Quran interface {
|
type Quran interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package routing
|
package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Routing interface {
|
type Routing interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package rss
|
package rss
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Rss interface {
|
type Rss interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package search
|
package search
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Search interface {
|
type Search interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package sentiment
|
package sentiment
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Sentiment interface {
|
type Sentiment interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package sms
|
package sms
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Sms interface {
|
type Sms interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package space
|
package space
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Space interface {
|
type Space interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package spam
|
package spam
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Spam interface {
|
type Spam interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package stock
|
package stock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Stock interface {
|
type Stock interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package stream
|
package stream
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Stream interface {
|
type Stream interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package sunnah
|
package sunnah
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Sunnah interface {
|
type Sunnah interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package thumbnail
|
package thumbnail
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Thumbnail interface {
|
type Thumbnail interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package time
|
package time
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Time interface {
|
type Time interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package translate
|
package translate
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Translate interface {
|
type Translate interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package twitter
|
package twitter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Twitter interface {
|
type Twitter interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package url
|
package url
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Url interface {
|
type Url interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package user
|
package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type User interface {
|
type User interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package vehicle
|
package vehicle
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Vehicle interface {
|
type Vehicle interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package weather
|
package weather
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Weather interface {
|
type Weather interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package youtube
|
package youtube
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.m3o.com/client"
|
"go-micro.dev/v4/services/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Youtube interface {
|
type Youtube interface {
|
||||||
|
Reference in New Issue
Block a user