update all

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-03 18:01:37 +03:00
parent 652d74cc3a
commit 2073a6b3f4
36 changed files with 731 additions and 817 deletions

View File

@@ -1,19 +1,18 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.1
// protoc v3.19.4
// source: test.proto
package pb
import (
reflect "reflect"
sync "sync"
_ "go.unistack.org/micro-proto/v3/api"
_ "go.unistack.org/micro-proto/v3/openapiv3"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@@ -504,21 +503,18 @@ func file_test_proto_rawDescGZIP() []byte {
return file_test_proto_rawDescData
}
var (
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
file_test_proto_goTypes = []interface{}{
(*MailUserReq)(nil), // 0: test.MailUserReq
(*MailUserRsp)(nil), // 1: test.MailUserRsp
(*UpdateUserReq)(nil), // 2: test.UpdateUserReq
(*UpdateUserRsp)(nil), // 3: test.UpdateUserRsp
(*DeleteUserReq)(nil), // 4: test.DeleteUserReq
(*DeleteUserRsp)(nil), // 5: test.DeleteUserRsp
(*LookupUserReq)(nil), // 6: test.LookupUserReq
(*LookupUserRsp)(nil), // 7: test.LookupUserRsp
(*Error)(nil), // 8: test.Error
}
)
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_test_proto_goTypes = []interface{}{
(*MailUserReq)(nil), // 0: test.MailUserReq
(*MailUserRsp)(nil), // 1: test.MailUserRsp
(*UpdateUserReq)(nil), // 2: test.UpdateUserReq
(*UpdateUserRsp)(nil), // 3: test.UpdateUserRsp
(*DeleteUserReq)(nil), // 4: test.DeleteUserReq
(*DeleteUserRsp)(nil), // 5: test.DeleteUserRsp
(*LookupUserReq)(nil), // 6: test.LookupUserReq
(*LookupUserRsp)(nil), // 7: test.LookupUserRsp
(*Error)(nil), // 8: test.Error
}
var file_test_proto_depIdxs = []int32{
6, // 0: test.TestService.LookupUser:input_type -> test.LookupUserReq
2, // 1: test.TestService.UpdateUser:input_type -> test.UpdateUserReq

View File

@@ -6,7 +6,6 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
)

View File

@@ -6,13 +6,12 @@ package pb
import (
context "context"
http "net/http"
time "time"
v3 "go.unistack.org/micro-client-http/v3"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
http "net/http"
time "time"
)
type testServiceClient struct {
@@ -25,6 +24,11 @@ func NewTestServiceClient(name string, c client.Client) TestServiceClient {
}
func (c *testServiceClient) LookupUser(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodGet),
v3.Path("/v1/user/{name}"),
@@ -39,6 +43,11 @@ func (c *testServiceClient) LookupUser(ctx context.Context, req *LookupUserReq,
}
func (c *testServiceClient) UpdateUser(ctx context.Context, req *UpdateUserReq, opts ...client.CallOption) (*UpdateUserRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPut),
v3.Path("/v1/user/{name}"),
@@ -54,6 +63,11 @@ func (c *testServiceClient) UpdateUser(ctx context.Context, req *UpdateUserReq,
}
func (c *testServiceClient) DeleteUser(ctx context.Context, req *DeleteUserReq, opts ...client.CallOption) (*DeleteUserRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodDelete),
v3.Path("/v1/user/{name}"),
@@ -68,6 +82,11 @@ func (c *testServiceClient) DeleteUser(ctx context.Context, req *DeleteUserReq,
}
func (c *testServiceClient) MailUser(ctx context.Context, req *MailUserReq, opts ...client.CallOption) (*MailUserRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPost),
v3.Path("/v1/user/{name}/mail"),