mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 02:44:27 +00:00
gofmt
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
package main
|
||||
|
||||
//go:generate make proto
|
||||
|
||||
@@ -369,7 +369,7 @@ func (e *Function) Describe(ctx context.Context, req *function.DescribeRequest,
|
||||
rsp.Function = f
|
||||
} else {
|
||||
rsp.Function = &function.Func{
|
||||
Name: req.Name,
|
||||
Name: req.Name,
|
||||
Project: req.Project,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
package main
|
||||
|
||||
//go:generate make proto
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
type Google struct {
|
||||
Client *customsearch.Service
|
||||
CxId string
|
||||
CxId string
|
||||
}
|
||||
|
||||
func New(apiKey, cxId string) *Google {
|
||||
@@ -22,7 +22,7 @@ func New(apiKey, cxId string) *Google {
|
||||
|
||||
return &Google{
|
||||
Client: cs,
|
||||
CxId: cxId,
|
||||
CxId: cxId,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
package main
|
||||
|
||||
//go:generate make proto
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"github.com/asim/mq/broker"
|
||||
"github.com/micro/micro/v3/service/errors"
|
||||
log "github.com/micro/micro/v3/service/logger"
|
||||
"github.com/micro/services/pkg/tenant"
|
||||
pb "github.com/micro/services/mq/proto"
|
||||
"github.com/micro/services/pkg/tenant"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
)
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
timepb "github.com/micro/services/time/proto"
|
||||
)
|
||||
|
||||
type Prayer struct{
|
||||
type Prayer struct {
|
||||
Geocode geocode.GeocodingService
|
||||
Time timepb.TimeService
|
||||
Time timepb.TimeService
|
||||
}
|
||||
|
||||
func New(c client.Client) *Prayer {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
package main
|
||||
|
||||
//go:generate make proto
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
package main
|
||||
|
||||
//go:generate make proto
|
||||
|
||||
@@ -31,10 +31,10 @@ type Metadata struct {
|
||||
}
|
||||
|
||||
type Stream struct {
|
||||
Id string
|
||||
Id string
|
||||
Description string
|
||||
Messages []*Message
|
||||
Updated int64
|
||||
Messages []*Message
|
||||
Updated int64
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
@@ -71,9 +71,9 @@ func newStore() *Store {
|
||||
|
||||
func newStream(id, desc string) *Stream {
|
||||
return &Stream{
|
||||
Id: id,
|
||||
Id: id,
|
||||
Description: desc,
|
||||
Updated: time.Now().UnixNano(),
|
||||
Updated: time.Now().UnixNano(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,9 +117,9 @@ func (s *Stream) ListChannels(ctx context.Context, req *pb.ListChannelsRequest,
|
||||
name := strings.TrimPrefix(channel.Id, id+"/")
|
||||
|
||||
rsp.Channels = append(rsp.Channels, &pb.Channel{
|
||||
Name: name,
|
||||
Name: name,
|
||||
Description: channel.Description,
|
||||
LastActive: time.Unix(0, channel.Updated).Format(time.RFC3339Nano),
|
||||
LastActive: time.Unix(0, channel.Updated).Format(time.RFC3339Nano),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
package main
|
||||
|
||||
//go:generate make proto
|
||||
|
||||
@@ -16,14 +16,14 @@ func main() {
|
||||
service.Version("latest"),
|
||||
)
|
||||
|
||||
v, err := config.Get("dvla.api_key")
|
||||
if err != nil {
|
||||
logger.Fatalf("sunnha.api_key config not found: %v", err)
|
||||
}
|
||||
key := v.String("")
|
||||
if len(key) == 0 {
|
||||
logger.Fatal("dvla.api_key config not found")
|
||||
}
|
||||
v, err := config.Get("dvla.api_key")
|
||||
if err != nil {
|
||||
logger.Fatalf("sunnha.api_key config not found: %v", err)
|
||||
}
|
||||
key := v.String("")
|
||||
if len(key) == 0 {
|
||||
logger.Fatal("dvla.api_key config not found")
|
||||
}
|
||||
|
||||
// Register handler
|
||||
pb.RegisterVehicleHandler(srv.Server(), handler.New(key))
|
||||
|
||||
Reference in New Issue
Block a user