refactor: localize protobuf definitions
This commit is contained in:
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package mall
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -38,7 +37,7 @@ var (
|
||||
|
||||
func request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.MallFetchRequest
|
||||
protoReq MallFetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -53,7 +52,7 @@ func request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func local_request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.MallFetchRequest
|
||||
protoReq MallFetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -65,7 +64,7 @@ func local_request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Ma
|
||||
|
||||
func request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -80,7 +79,7 @@ func request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -92,7 +91,7 @@ func local_request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.StoreSerialRequest
|
||||
protoReq StoreSerialRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -107,7 +106,7 @@ func request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime
|
||||
|
||||
func local_request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.StoreSerialRequest
|
||||
protoReq StoreSerialRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -173,7 +172,7 @@ func local_request_Product_ItemCreate_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -188,7 +187,7 @@ func request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -254,7 +253,7 @@ func local_request_Product_ItemBatchOp_0(ctx context.Context, marshaler runtime.
|
||||
|
||||
func request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.MallFetchRequest
|
||||
protoReq MallFetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -269,7 +268,7 @@ func request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func local_request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.MallFetchRequest
|
||||
protoReq MallFetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -335,7 +334,7 @@ func local_request_Product_SpecModify_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -350,7 +349,7 @@ func request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -362,7 +361,7 @@ func local_request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -377,7 +376,7 @@ func request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -416,7 +415,7 @@ func local_request_Product_PhotoCreate_0(ctx context.Context, marshaler runtime.
|
||||
|
||||
func request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -431,7 +430,7 @@ func request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marsha
|
||||
|
||||
func local_request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -470,7 +469,7 @@ func local_request_Product_PhotoList_0(ctx context.Context, marshaler runtime.Ma
|
||||
|
||||
func request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.MallFetchRequest
|
||||
protoReq MallFetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -485,7 +484,7 @@ func request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func local_request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.MallFetchRequest
|
||||
protoReq MallFetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -551,7 +550,7 @@ func local_request_Product_CommentRe_0(ctx context.Context, marshaler runtime.Ma
|
||||
|
||||
func request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -566,7 +565,7 @@ func request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func local_request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
Reference in New Issue
Block a user