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_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, 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_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
|
||||
func local_request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, 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) {
|
||||
@@ -92,7 +91,7 @@ func local_request_Freight_Modify_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, 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) {
|
||||
@@ -107,7 +106,7 @@ func request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, 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) {
|
||||
@@ -146,7 +145,7 @@ func local_request_Freight_Create_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, 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) {
|
||||
@@ -161,7 +160,7 @@ func request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, 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) {
|
||||
@@ -173,7 +172,7 @@ func local_request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, 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) {
|
||||
@@ -188,7 +187,7 @@ func request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Ma
|
||||
|
||||
func local_request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, 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) {
|
||||
@@ -227,7 +226,7 @@ func local_request_Freight_DenyRegionCreate_0(ctx context.Context, marshaler run
|
||||
|
||||
func request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, 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) {
|
||||
@@ -242,7 +241,7 @@ func request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func local_request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, 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