refactor: centralize protobuf and remove go-zero

This commit is contained in:
2026-08-09 15:10:19 +08:00
parent 5cc5fd92ed
commit 4bbed3156c
357 changed files with 14208 additions and 19903 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: supply.proto
// source: module/ec/market/proto/supply.proto
/*
Package market is a reverse proxy.
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
package market
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -43,6 +44,9 @@ func request_Supply_Create_0(ctx context.Context, marshaler runtime.Marshaler, c
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
@@ -61,19 +65,22 @@ func local_request_Supply_Create_0(ctx context.Context, marshaler runtime.Marsha
func request_Supply_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SupplyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq IdentRequest
protoReq blocks.IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Supply_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SupplyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq IdentRequest
protoReq blocks.IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -85,19 +92,22 @@ func local_request_Supply_Get_0(ctx context.Context, marshaler runtime.Marshaler
func request_Supply_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client SupplyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq FetchRequest
protoReq blocks.MarketFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Supply_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server SupplyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq FetchRequest
protoReq blocks.MarketFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -115,6 +125,9 @@ func request_Supply_Modify_0(ctx context.Context, marshaler runtime.Marshaler, c
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
@@ -133,19 +146,22 @@ func local_request_Supply_Modify_0(ctx context.Context, marshaler runtime.Marsha
func request_Supply_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SupplyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq IdentRequest
protoReq blocks.IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Supply_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server SupplyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq IdentRequest
protoReq blocks.IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {