update tests and go.mod
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
47
server/http/proto/test_micro.pb.go
Normal file
47
server/http/proto/test_micro.pb.go
Normal file
@@ -0,0 +1,47 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// source: test.proto
|
||||
package pb
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
micro_api "github.com/unistack-org/micro/v3/api"
|
||||
micro_client "github.com/unistack-org/micro/v3/client"
|
||||
)
|
||||
|
||||
// NewTestEndpoints provides api endpoints metdata for Test service
|
||||
func NewTestEndpoints() []*micro_api.Endpoint {
|
||||
endpoints := make([]*micro_api.Endpoint, 0, 2)
|
||||
var endpoint *micro_api.Endpoint
|
||||
endpoint = µ_api.Endpoint{
|
||||
Name: "Test.Call",
|
||||
Path: []string{"/v1/test/call/{name}"},
|
||||
Method: []string{"POST"},
|
||||
Body: "*",
|
||||
Handler: "rpc",
|
||||
}
|
||||
endpoints = append(endpoints, endpoint)
|
||||
endpoint = µ_api.Endpoint{
|
||||
Name: "Test.CallError",
|
||||
Path: []string{"/v1/test/callerror/{name}"},
|
||||
Method: []string{"POST"},
|
||||
Body: "*",
|
||||
Handler: "rpc",
|
||||
}
|
||||
endpoints = append(endpoints, endpoint)
|
||||
return endpoints
|
||||
}
|
||||
|
||||
// TestService interface
|
||||
type TestService interface {
|
||||
Call(context.Context, *CallReq, ...micro_client.CallOption) (*CallRsp, error)
|
||||
CallError(context.Context, *CallReq1, ...micro_client.CallOption) (*CallRsp1, error)
|
||||
}
|
||||
|
||||
// Micro server stuff
|
||||
|
||||
// TestHandler server handler
|
||||
type TestHandler interface {
|
||||
Call(context.Context, *CallReq, *CallRsp) error
|
||||
CallError(context.Context, *CallReq1, *CallRsp1) error
|
||||
}
|
Reference in New Issue
Block a user