update go mod (#334)

This commit is contained in:
Asim Aslam
2021-12-16 12:31:04 +00:00
committed by GitHub
parent f9e539ad88
commit 527dcc12c3
16 changed files with 164 additions and 165 deletions

2
go.mod
View File

@@ -31,7 +31,7 @@ require (
github.com/m3o/goduckgo v0.0.0-20210630141545-c760fe67b945 github.com/m3o/goduckgo v0.0.0-20210630141545-c760fe67b945
github.com/mattheath/base62 v0.0.0-20150408093626-b80cdc656a7a // indirect github.com/mattheath/base62 v0.0.0-20150408093626-b80cdc656a7a // indirect
github.com/mattheath/kala v0.0.0-20171219141654-d6276794bf0e github.com/mattheath/kala v0.0.0-20171219141654-d6276794bf0e
github.com/micro/micro/v3 v3.8.0 github.com/micro/micro/v3 v3.8.1-0.20211216122745-2e7245423520
github.com/miekg/dns v1.1.31 // indirect github.com/miekg/dns v1.1.31 // indirect
github.com/minio/minio-go/v7 v7.0.16 github.com/minio/minio-go/v7 v7.0.16
github.com/o1egl/govatar v0.3.0 github.com/o1egl/govatar v0.3.0

2
go.sum
View File

@@ -495,6 +495,8 @@ github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4f
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/micro/micro/v3 v3.8.0 h1:RTH2835RJ4/aqLZGMjGCIf7HroCmYlJh2KRHHuSL/AE= github.com/micro/micro/v3 v3.8.0 h1:RTH2835RJ4/aqLZGMjGCIf7HroCmYlJh2KRHHuSL/AE=
github.com/micro/micro/v3 v3.8.0/go.mod h1:gjFa8T2ouD6BvorPTVPXLWtrRJwSKT5KxUNuu23Kkts= github.com/micro/micro/v3 v3.8.0/go.mod h1:gjFa8T2ouD6BvorPTVPXLWtrRJwSKT5KxUNuu23Kkts=
github.com/micro/micro/v3 v3.8.1-0.20211216122745-2e7245423520 h1:LtErHRofRQf5damrjb5AkpvmklaIhx3anLJ9sN4fMrI=
github.com/micro/micro/v3 v3.8.1-0.20211216122745-2e7245423520/go.mod h1:gjFa8T2ouD6BvorPTVPXLWtrRJwSKT5KxUNuu23Kkts=
github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo= github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo=

View File

@@ -1,2 +1,3 @@
package main package main
//go:generate make proto //go:generate make proto

View File

@@ -1,2 +1,3 @@
package main package main
//go:generate make proto //go:generate make proto

View File

@@ -104,4 +104,3 @@ type Token struct {
EthPrice string `json:"eth_price,omitempty"` EthPrice string `json:"eth_price,omitempty"`
UsdPrice string `json:"usd_price,omitempty"` UsdPrice string `json:"usd_price,omitempty"`
} }

View File

@@ -1,2 +1,3 @@
package main package main
//go:generate make proto //go:generate make proto

View File

@@ -3,13 +3,11 @@ package handler
import ( import (
"context" "context"
pb "github.com/micro/services/nft/proto" pb "github.com/micro/services/nft/proto"
) )
type Nft struct{} type Nft struct{}
func (n *Nft) Assets(ctx context.Context, req *pb.AssetsRequest, rsp *pb.AssetsResponse) error { func (n *Nft) Assets(ctx context.Context, req *pb.AssetsRequest, rsp *pb.AssetsResponse) error {
return nil return nil
} }

View File

@@ -4,12 +4,12 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/micro/services/pkg/api"
"github.com/micro/services/nft/domain"
"github.com/micro/micro/v3/service/config" "github.com/micro/micro/v3/service/config"
"github.com/micro/micro/v3/service/logger"
"github.com/micro/micro/v3/service/errors" "github.com/micro/micro/v3/service/errors"
"github.com/micro/micro/v3/service/logger"
"github.com/micro/services/nft/domain"
pb "github.com/micro/services/nft/proto" pb "github.com/micro/services/nft/proto"
"github.com/micro/services/pkg/api"
) )
// OpenSea handler // OpenSea handler
@@ -23,7 +23,6 @@ var (
openseaURL = "https://api.opensea.io/api/v1" openseaURL = "https://api.opensea.io/api/v1"
) )
func New() *OpenSea { func New() *OpenSea {
v, err := config.Get("nft.key") v, err := config.Get("nft.key")
if err != nil { if err != nil {
@@ -38,7 +37,7 @@ func New() *OpenSea {
// set the api key // set the api key
api.SetKey("X-API-KEY", key) api.SetKey("X-API-KEY", key)
return &OpenSea { return &OpenSea{
apiKey: key, apiKey: key,
Nft: new(Nft), Nft: new(Nft),
} }
@@ -83,7 +82,7 @@ func (o *OpenSea) Assets(ctx context.Context, req *pb.AssetsRequest, rsp *pb.Ass
var resp domain.AssetsResponse var resp domain.AssetsResponse
if err := api.Get(uri + params, &resp); err != nil { if err := api.Get(uri+params, &resp); err != nil {
return errors.InternalServerError("nft.assets", "failed to get assets: %v", err) return errors.InternalServerError("nft.assets", "failed to get assets: %v", err)
} }
@@ -241,11 +240,11 @@ func (o *OpenSea) Collections(ctx context.Context, req *pb.CollectionsRequest, r
offset = req.Offset offset = req.Offset
} }
params += fmt.Sprintf("limit=%d&offset=%d",limit, offset) params += fmt.Sprintf("limit=%d&offset=%d", limit, offset)
var resp domain.CollectionsResponse var resp domain.CollectionsResponse
if err := api.Get(uri + params, &resp); err != nil { if err := api.Get(uri+params, &resp); err != nil {
return errors.InternalServerError("nft.collections", "failed to get collections: %v", err) return errors.InternalServerError("nft.collections", "failed to get collections: %v", err)
} }
@@ -262,4 +261,3 @@ func (o *OpenSea) Collections(ctx context.Context, req *pb.CollectionsRequest, r
return nil return nil
} }

View File

@@ -1,10 +1,10 @@
package main package main
import ( import (
"github.com/micro/services/nft/handler"
pb "github.com/micro/services/nft/proto"
"github.com/micro/micro/v3/service" "github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger" "github.com/micro/micro/v3/service/logger"
"github.com/micro/services/nft/handler"
pb "github.com/micro/services/nft/proto"
) )
func main() { func main() {

View File

@@ -1,2 +1,3 @@
package main package main
//go:generate make proto //go:generate make proto

View File

@@ -5,9 +5,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/micro/services/pkg/tenant"
"github.com/micro/micro/v3/service/store" "github.com/micro/micro/v3/service/store"
"github.com/micro/services/pkg/tenant"
pb "github.com/micro/services/search/proto" pb "github.com/micro/services/search/proto"
) )
@@ -34,7 +33,7 @@ func (n *Search) Vote(ctx context.Context, req *pb.VoteRequest, rsp *pb.VoteResp
id = "micro" id = "micro"
} }
rec := store.NewRecord(voteKey + id, &Vote{ rec := store.NewRecord(voteKey+id, &Vote{
Id: id, Id: id,
Message: req.Message, Message: req.Message,
VotedAt: time.Now(), VotedAt: time.Now(),
@@ -47,4 +46,3 @@ func (n *Search) Vote(ctx context.Context, req *pb.VoteRequest, rsp *pb.VoteResp
return nil return nil
} }

View File

@@ -1,10 +1,10 @@
package main package main
import ( import (
"github.com/micro/services/search/handler"
pb "github.com/micro/services/search/proto"
"github.com/micro/micro/v3/service" "github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger" "github.com/micro/micro/v3/service/logger"
"github.com/micro/services/search/handler"
pb "github.com/micro/services/search/proto"
) )
func main() { func main() {

View File

@@ -3,8 +3,8 @@ package handler
import ( import (
"context" "context"
me "github.com/micro/micro/v3/service/errors"
"github.com/micro/micro/v3/service/config" "github.com/micro/micro/v3/service/config"
me "github.com/micro/micro/v3/service/errors"
"github.com/micro/micro/v3/service/logger" "github.com/micro/micro/v3/service/logger"
"github.com/pkg/errors" "github.com/pkg/errors"
"golang.org/x/text/language" "golang.org/x/text/language"

View File

@@ -50,7 +50,7 @@ func (y *Youtube) Embed(ctx context.Context, req *pb.EmbedRequest, rsp *pb.Embed
} }
} }
rsp.LongUrl = "https://www.youtube.com/watch?v="+id rsp.LongUrl = "https://www.youtube.com/watch?v=" + id
rsp.ShortUrl = "https://youtu.be/" + id rsp.ShortUrl = "https://youtu.be/" + id
rsp.EmbedUrl = "https://www.youtube.com/embed/" + id rsp.EmbedUrl = "https://www.youtube.com/embed/" + id
rsp.HtmlScript = `<iframe width="560" height="315" src="` + rsp.EmbedUrl + `" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>` rsp.HtmlScript = `<iframe width="560" height="315" src="` + rsp.EmbedUrl + `" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`