refactor: localize protobuf definitions

This commit is contained in:
2026-08-09 20:14:57 +08:00
parent 9f6f318bbb
commit 5ea45a76fe
429 changed files with 54058 additions and 61623 deletions

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package relation
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -38,7 +37,7 @@ var (
func request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.SearchRequest
protoReq SearchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -53,7 +52,7 @@ func request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, c
func local_request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.SearchRequest
protoReq SearchRequest
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_Friend_Search_0(ctx context.Context, marshaler runtime.Marsha
func request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.VersionRequest
protoReq VersionRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -80,7 +79,7 @@ func request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl
func local_request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.VersionRequest
protoReq VersionRequest
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_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshal
func request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, clie
func local_request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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_Friend_ModifyNickname_0(ctx context.Context, marshaler runtim
func request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler
func local_request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Mar
func request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshal
func local_request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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) {
@@ -200,7 +199,7 @@ func local_request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.M
func request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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) {
@@ -215,7 +214,7 @@ func request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c
func local_request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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) {
@@ -227,7 +226,7 @@ func local_request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marsha
func request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.VersionRequest
protoReq VersionRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -242,7 +241,7 @@ func request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshale
func local_request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.VersionRequest
protoReq VersionRequest
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_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Ma
func request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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) {
@@ -269,7 +268,7 @@ func request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler,
func local_request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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_Friend_ApplyDoPass_0(ctx context.Context, marshaler runtime.M
func request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marsh
func local_request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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) {
@@ -389,7 +388,7 @@ func local_request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime
func request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.Empty
protoReq Empty
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -404,7 +403,7 @@ func request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler,
func local_request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.Empty
protoReq Empty
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_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Mars
func request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, 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_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Mars
func local_request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, 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) {