refactor: localize protobuf definitions
This commit is contained in:
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package cloud
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -65,7 +64,7 @@ func local_request_Disk_CreateDir_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Disk_GetDir_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, 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_Disk_GetDir_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Disk_GetDir_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, 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) {
|
||||
@@ -119,7 +118,7 @@ func local_request_Disk_UpdateDir_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, 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) {
|
||||
@@ -134,7 +133,7 @@ func request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, 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_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -161,7 +160,7 @@ func request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
|
||||
func local_request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
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_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marsha
|
||||
|
||||
func request_Disk_GetDirTree_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, 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_Disk_GetDirTree_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Disk_GetDirTree_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, 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_Disk_UploadFile_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Disk_GetFile_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, 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_Disk_GetFile_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Disk_GetFile_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, 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) {
|
||||
@@ -308,7 +307,7 @@ func local_request_Disk_UpdateFile_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, 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) {
|
||||
@@ -323,7 +322,7 @@ func request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, 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) {
|
||||
@@ -335,7 +334,7 @@ func local_request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Disk_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -350,7 +349,7 @@ func request_Disk_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Disk_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
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_Disk_CopyFile_0(ctx context.Context, marshaler runtime.Marsha
|
||||
|
||||
func request_Disk_SearchFiles_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -431,7 +430,7 @@ func request_Disk_SearchFiles_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func local_request_Disk_SearchFiles_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
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