mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-13 12:33:35 +02:00
frdrpc+travis: update protobuf version to match lnd
This commit is contained in:
parent
df39c5a5c9
commit
574dbfd01d
4 changed files with 380 additions and 18 deletions
|
|
@ -9,6 +9,8 @@ import (
|
|||
proto "github.com/golang/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
math "math"
|
||||
)
|
||||
|
||||
|
|
@ -1566,6 +1568,29 @@ type FaradayServerServer interface {
|
|||
NodeReport(context.Context, *NodeReportRequest) (*NodeReportResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedFaradayServerServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedFaradayServerServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedFaradayServerServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OutlierRecommendations not implemented")
|
||||
}
|
||||
func (*UnimplementedFaradayServerServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ThresholdRecommendations not implemented")
|
||||
}
|
||||
func (*UnimplementedFaradayServerServer) RevenueReport(ctx context.Context, req *RevenueReportRequest) (*RevenueReportResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RevenueReport not implemented")
|
||||
}
|
||||
func (*UnimplementedFaradayServerServer) ChannelInsights(ctx context.Context, req *ChannelInsightsRequest) (*ChannelInsightsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChannelInsights not implemented")
|
||||
}
|
||||
func (*UnimplementedFaradayServerServer) FiatEstimate(ctx context.Context, req *FiatEstimateRequest) (*FiatEstimateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FiatEstimate not implemented")
|
||||
}
|
||||
func (*UnimplementedFaradayServerServer) NodeReport(ctx context.Context, req *NodeReportRequest) (*NodeReportResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NodeReport not implemented")
|
||||
}
|
||||
|
||||
func RegisterFaradayServerServer(s *grpc.Server, srv FaradayServerServer) {
|
||||
s.RegisterService(&_FaradayServer_serviceDesc, srv)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang/protobuf/descriptor"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||
|
|
@ -22,11 +23,13 @@ import (
|
|||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
|
||||
var (
|
||||
filter_FaradayServer_OutlierRecommendations_0 = &utilities.DoubleArray{Encoding: map[string]int{"rec_request": 0, "metric": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
|
||||
|
|
@ -51,6 +54,47 @@ func request_FaradayServer_OutlierRecommendations_0(ctx context.Context, marshal
|
|||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "rec_request.metric", val)
|
||||
|
||||
e, err = runtime.Enum(val, CloseRecommendationRequest_Metric_value)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "rec_request.metric", err)
|
||||
}
|
||||
|
||||
protoReq.RecRequest.Metric = CloseRecommendationRequest_Metric(e)
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FaradayServer_OutlierRecommendations_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.OutlierRecommendations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_FaradayServer_OutlierRecommendations_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq OutlierRecommendationsRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
e int32
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["rec_request.metric"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "rec_request.metric")
|
||||
}
|
||||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "rec_request.metric", val)
|
||||
|
||||
e, err = runtime.Enum(val, CloseRecommendationRequest_Metric_value)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "rec_request.metric", err)
|
||||
}
|
||||
|
|
@ -61,7 +105,7 @@ func request_FaradayServer_OutlierRecommendations_0(ctx context.Context, marshal
|
|||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.OutlierRecommendations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := server.OutlierRecommendations(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
|
@ -89,6 +133,47 @@ func request_FaradayServer_ThresholdRecommendations_0(ctx context.Context, marsh
|
|||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "rec_request.metric", val)
|
||||
|
||||
e, err = runtime.Enum(val, CloseRecommendationRequest_Metric_value)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "rec_request.metric", err)
|
||||
}
|
||||
|
||||
protoReq.RecRequest.Metric = CloseRecommendationRequest_Metric(e)
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FaradayServer_ThresholdRecommendations_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ThresholdRecommendations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_FaradayServer_ThresholdRecommendations_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ThresholdRecommendationsRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
e int32
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["rec_request.metric"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "rec_request.metric")
|
||||
}
|
||||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "rec_request.metric", val)
|
||||
|
||||
e, err = runtime.Enum(val, CloseRecommendationRequest_Metric_value)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "rec_request.metric", err)
|
||||
}
|
||||
|
|
@ -99,7 +184,7 @@ func request_FaradayServer_ThresholdRecommendations_0(ctx context.Context, marsh
|
|||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ThresholdRecommendations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := server.ThresholdRecommendations(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
|
@ -112,7 +197,10 @@ func request_FaradayServer_RevenueReport_0(ctx context.Context, marshaler runtim
|
|||
var protoReq RevenueReportRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FaradayServer_RevenueReport_0); err != nil {
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FaradayServer_RevenueReport_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -121,6 +209,19 @@ func request_FaradayServer_RevenueReport_0(ctx context.Context, marshaler runtim
|
|||
|
||||
}
|
||||
|
||||
func local_request_FaradayServer_RevenueReport_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RevenueReportRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FaradayServer_RevenueReport_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.RevenueReport(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_FaradayServer_ChannelInsights_0(ctx context.Context, marshaler runtime.Marshaler, client FaradayServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ChannelInsightsRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
|
@ -130,6 +231,15 @@ func request_FaradayServer_ChannelInsights_0(ctx context.Context, marshaler runt
|
|||
|
||||
}
|
||||
|
||||
func local_request_FaradayServer_ChannelInsights_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ChannelInsightsRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.ChannelInsights(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_FaradayServer_FiatEstimate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
|
@ -138,7 +248,10 @@ func request_FaradayServer_FiatEstimate_0(ctx context.Context, marshaler runtime
|
|||
var protoReq FiatEstimateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FaradayServer_FiatEstimate_0); err != nil {
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FaradayServer_FiatEstimate_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -147,6 +260,19 @@ func request_FaradayServer_FiatEstimate_0(ctx context.Context, marshaler runtime
|
|||
|
||||
}
|
||||
|
||||
func local_request_FaradayServer_FiatEstimate_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq FiatEstimateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FaradayServer_FiatEstimate_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.FiatEstimate(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_FaradayServer_NodeReport_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
|
@ -155,7 +281,10 @@ func request_FaradayServer_NodeReport_0(ctx context.Context, marshaler runtime.M
|
|||
var protoReq NodeReportRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FaradayServer_NodeReport_0); err != nil {
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FaradayServer_NodeReport_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -164,6 +293,147 @@ func request_FaradayServer_NodeReport_0(ctx context.Context, marshaler runtime.M
|
|||
|
||||
}
|
||||
|
||||
func local_request_FaradayServer_NodeReport_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq NodeReportRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FaradayServer_NodeReport_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.NodeReport(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterFaradayServerHandlerServer registers the http handlers for service FaradayServer to "mux".
|
||||
// UnaryRPC :call FaradayServerServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
func RegisterFaradayServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaradayServerServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_FaradayServer_OutlierRecommendations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FaradayServer_OutlierRecommendations_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FaradayServer_OutlierRecommendations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_FaradayServer_ThresholdRecommendations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FaradayServer_ThresholdRecommendations_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FaradayServer_ThresholdRecommendations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_FaradayServer_RevenueReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FaradayServer_RevenueReport_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FaradayServer_RevenueReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_FaradayServer_ChannelInsights_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FaradayServer_ChannelInsights_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FaradayServer_ChannelInsights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_FaradayServer_FiatEstimate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FaradayServer_FiatEstimate_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FaradayServer_FiatEstimate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_FaradayServer_NodeReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FaradayServer_NodeReport_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FaradayServer_NodeReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterFaradayServerHandlerFromEndpoint is same as RegisterFaradayServerHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterFaradayServerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
|
|
@ -326,17 +596,17 @@ func RegisterFaradayServerHandlerClient(ctx context.Context, mux *runtime.ServeM
|
|||
}
|
||||
|
||||
var (
|
||||
pattern_FaradayServer_OutlierRecommendations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "faraday", "outliers", "rec_request.metric"}, ""))
|
||||
pattern_FaradayServer_OutlierRecommendations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "faraday", "outliers", "rec_request.metric"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_FaradayServer_ThresholdRecommendations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "faraday", "threshold", "rec_request.metric"}, ""))
|
||||
pattern_FaradayServer_ThresholdRecommendations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "faraday", "threshold", "rec_request.metric"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_FaradayServer_RevenueReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "revenue"}, ""))
|
||||
pattern_FaradayServer_RevenueReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "revenue"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_FaradayServer_ChannelInsights_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "insights"}, ""))
|
||||
pattern_FaradayServer_ChannelInsights_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "insights"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_FaradayServer_FiatEstimate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "fiat"}, ""))
|
||||
pattern_FaradayServer_FiatEstimate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "fiat"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_FaradayServer_NodeReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "nodereport"}, ""))
|
||||
pattern_FaradayServer_NodeReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "nodereport"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
"title": "rpc.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
|
|
@ -26,6 +22,12 @@
|
|||
"schema": {
|
||||
"$ref": "#/definitions/frdrpcFiatEstimateResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
|
|
@ -64,6 +66,12 @@
|
|||
"schema": {
|
||||
"$ref": "#/definitions/frdrpcChannelInsightsResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
|
|
@ -82,6 +90,12 @@
|
|||
"schema": {
|
||||
"$ref": "#/definitions/frdrpcNodeReportResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
|
|
@ -137,6 +151,12 @@
|
|||
"schema": {
|
||||
"$ref": "#/definitions/frdrpcCloseRecommendationsResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
|
|
@ -188,6 +208,12 @@
|
|||
"schema": {
|
||||
"$ref": "#/definitions/frdrpcRevenueReportResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
|
|
@ -235,6 +261,12 @@
|
|||
"schema": {
|
||||
"$ref": "#/definitions/frdrpcCloseRecommendationsResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
|
|
@ -579,6 +611,39 @@
|
|||
"description": "Reports is a set of pairwise revenue report generated for the channel(s)\nover the period specified."
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtimeError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ set -ev
|
|||
|
||||
# Faraday uses the same versions/commits as lnd.
|
||||
PROTOC_VERSION=3.4.0
|
||||
PROTOBUF_VERSION="b5d812f8a3706043e23a9cd5babf2e5423744d30"
|
||||
GENPROTO_VERSION="a8101f21cf983e773d0c1133ebc5424792003214"
|
||||
GRPC_GATEWAY_VERSION="v1.8.6"
|
||||
PROTOBUF_VERSION="v1.3.2"
|
||||
GENPROTO_VERSION="20e1ac93f88cf06d2b1defb90b9e9e126c7dfff6"
|
||||
GRPC_GATEWAY_VERSION="v1.14.3"
|
||||
|
||||
# This script is specific to Travis CI so we only need to support linux x64.
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
|
||||
|
|
@ -49,6 +49,7 @@ install_genproto() {
|
|||
git clone https://github.com/google/go-genproto "$install_path"
|
||||
fi
|
||||
pushd "$install_path"
|
||||
git reset --hard master && git checkout master && git pull
|
||||
git reset --hard $GENPROTO_VERSION
|
||||
popd
|
||||
}
|
||||
|
|
@ -61,6 +62,7 @@ install_grpc_gateway() {
|
|||
git clone https://github.com/grpc-ecosystem/grpc-gateway "$install_path"
|
||||
fi
|
||||
pushd "$install_path"
|
||||
git reset --hard master && git checkout master && git pull
|
||||
git reset --hard $GRPC_GATEWAY_VERSION
|
||||
GO111MODULE=on go install ./protoc-gen-grpc-gateway ./protoc-gen-swagger
|
||||
popd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue