refactor: localize protobuf definitions
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
package cloud
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -41,29 +40,29 @@ const (
|
||||
// 相册服务
|
||||
type AlbumClient interface {
|
||||
// 创建相册
|
||||
CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取相册详情
|
||||
GetAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error)
|
||||
GetAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error)
|
||||
// 更新相册
|
||||
UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 删除相册
|
||||
DeleteAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
DeleteAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取相册列表
|
||||
ListAlbums(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error)
|
||||
ListAlbums(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error)
|
||||
// 设置封面照片
|
||||
SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 上传照片
|
||||
UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取照片详情
|
||||
GetPhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error)
|
||||
GetPhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error)
|
||||
// 更新照片
|
||||
UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 删除照片
|
||||
DeletePhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
DeletePhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取照片列表
|
||||
ListPhotos(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error)
|
||||
ListPhotos(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error)
|
||||
// 移动照片到其他相册
|
||||
MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type albumClient struct {
|
||||
@@ -74,9 +73,9 @@ func NewAlbumClient(cc grpc.ClientConnInterface) AlbumClient {
|
||||
return &albumClient{cc}
|
||||
}
|
||||
|
||||
func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_CreateAlbum_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,7 +83,7 @@ func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, o
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) GetAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error) {
|
||||
func (c *albumClient) GetAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CloudAlbumItem)
|
||||
err := c.cc.Invoke(ctx, Album_GetAlbum_FullMethodName, in, out, cOpts...)
|
||||
@@ -94,9 +93,9 @@ func (c *albumClient) GetAlbum(ctx context.Context, in *protobuf.IdentRequest, o
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_UpdateAlbum_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -104,9 +103,9 @@ func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) DeleteAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) DeleteAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_DeleteAlbum_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -114,7 +113,7 @@ func (c *albumClient) DeleteAlbum(ctx context.Context, in *protobuf.IdentRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) ListAlbums(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error) {
|
||||
func (c *albumClient) ListAlbums(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListAlbumsResponse)
|
||||
err := c.cc.Invoke(ctx, Album_ListAlbums_FullMethodName, in, out, cOpts...)
|
||||
@@ -124,9 +123,9 @@ func (c *albumClient) ListAlbums(ctx context.Context, in *protobuf.FetchRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_SetCoverPhoto_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -134,9 +133,9 @@ func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoReques
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_UploadPhoto_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -144,7 +143,7 @@ func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) GetPhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error) {
|
||||
func (c *albumClient) GetPhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CloudPhotoItem)
|
||||
err := c.cc.Invoke(ctx, Album_GetPhoto_FullMethodName, in, out, cOpts...)
|
||||
@@ -154,9 +153,9 @@ func (c *albumClient) GetPhoto(ctx context.Context, in *protobuf.IdentRequest, o
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_UpdatePhoto_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -164,9 +163,9 @@ func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) DeletePhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) DeletePhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_DeletePhoto_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -174,7 +173,7 @@ func (c *albumClient) DeletePhoto(ctx context.Context, in *protobuf.IdentRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) ListPhotos(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error) {
|
||||
func (c *albumClient) ListPhotos(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListPhotosResponse)
|
||||
err := c.cc.Invoke(ctx, Album_ListPhotos_FullMethodName, in, out, cOpts...)
|
||||
@@ -184,9 +183,9 @@ func (c *albumClient) ListPhotos(ctx context.Context, in *protobuf.FetchRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Album_MovePhoto_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -201,29 +200,29 @@ func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts
|
||||
// 相册服务
|
||||
type AlbumServer interface {
|
||||
// 创建相册
|
||||
CreateAlbum(context.Context, *CreateAlbumRequest) (*protobuf.StatusReply, error)
|
||||
CreateAlbum(context.Context, *CreateAlbumRequest) (*StatusReply, error)
|
||||
// 获取相册详情
|
||||
GetAlbum(context.Context, *protobuf.IdentRequest) (*CloudAlbumItem, error)
|
||||
GetAlbum(context.Context, *IdentRequest) (*CloudAlbumItem, error)
|
||||
// 更新相册
|
||||
UpdateAlbum(context.Context, *CloudAlbumItem) (*protobuf.StatusReply, error)
|
||||
UpdateAlbum(context.Context, *CloudAlbumItem) (*StatusReply, error)
|
||||
// 删除相册
|
||||
DeleteAlbum(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
DeleteAlbum(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
// 获取相册列表
|
||||
ListAlbums(context.Context, *protobuf.FetchRequest) (*ListAlbumsResponse, error)
|
||||
ListAlbums(context.Context, *FetchRequest) (*ListAlbumsResponse, error)
|
||||
// 设置封面照片
|
||||
SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*protobuf.StatusReply, error)
|
||||
SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*StatusReply, error)
|
||||
// 上传照片
|
||||
UploadPhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error)
|
||||
UploadPhoto(context.Context, *CloudPhotoItem) (*StatusReply, error)
|
||||
// 获取照片详情
|
||||
GetPhoto(context.Context, *protobuf.IdentRequest) (*CloudPhotoItem, error)
|
||||
GetPhoto(context.Context, *IdentRequest) (*CloudPhotoItem, error)
|
||||
// 更新照片
|
||||
UpdatePhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error)
|
||||
UpdatePhoto(context.Context, *CloudPhotoItem) (*StatusReply, error)
|
||||
// 删除照片
|
||||
DeletePhoto(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
DeletePhoto(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
// 获取照片列表
|
||||
ListPhotos(context.Context, *protobuf.FetchRequest) (*ListPhotosResponse, error)
|
||||
ListPhotos(context.Context, *FetchRequest) (*ListPhotosResponse, error)
|
||||
// 移动照片到其他相册
|
||||
MovePhoto(context.Context, *MovePhotoRequest) (*protobuf.StatusReply, error)
|
||||
MovePhoto(context.Context, *MovePhotoRequest) (*StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedAlbumServer should be embedded to have
|
||||
@@ -233,40 +232,40 @@ type AlbumServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAlbumServer struct{}
|
||||
|
||||
func (UnimplementedAlbumServer) CreateAlbum(context.Context, *CreateAlbumRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) CreateAlbum(context.Context, *CreateAlbumRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateAlbum not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) GetAlbum(context.Context, *protobuf.IdentRequest) (*CloudAlbumItem, error) {
|
||||
func (UnimplementedAlbumServer) GetAlbum(context.Context, *IdentRequest) (*CloudAlbumItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetAlbum not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) UpdateAlbum(context.Context, *CloudAlbumItem) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) UpdateAlbum(context.Context, *CloudAlbumItem) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateAlbum not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) DeleteAlbum(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) DeleteAlbum(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteAlbum not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) ListAlbums(context.Context, *protobuf.FetchRequest) (*ListAlbumsResponse, error) {
|
||||
func (UnimplementedAlbumServer) ListAlbums(context.Context, *FetchRequest) (*ListAlbumsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListAlbums not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetCoverPhoto not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) UploadPhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) UploadPhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UploadPhoto not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) GetPhoto(context.Context, *protobuf.IdentRequest) (*CloudPhotoItem, error) {
|
||||
func (UnimplementedAlbumServer) GetPhoto(context.Context, *IdentRequest) (*CloudPhotoItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetPhoto not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) UpdatePhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) UpdatePhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdatePhoto not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) DeletePhoto(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) DeletePhoto(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeletePhoto not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) ListPhotos(context.Context, *protobuf.FetchRequest) (*ListPhotosResponse, error) {
|
||||
func (UnimplementedAlbumServer) ListPhotos(context.Context, *FetchRequest) (*ListPhotosResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListPhotos not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) MovePhoto(context.Context, *MovePhotoRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAlbumServer) MovePhoto(context.Context, *MovePhotoRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MovePhoto not implemented")
|
||||
}
|
||||
func (UnimplementedAlbumServer) testEmbeddedByValue() {}
|
||||
@@ -308,7 +307,7 @@ func _Album_CreateAlbum_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
|
||||
func _Album_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -320,7 +319,7 @@ func _Album_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
FullMethod: Album_GetAlbum_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AlbumServer).GetAlbum(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(AlbumServer).GetAlbum(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -344,7 +343,7 @@ func _Album_UpdateAlbum_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
|
||||
func _Album_DeleteAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -356,13 +355,13 @@ func _Album_DeleteAlbum_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
FullMethod: Album_DeleteAlbum_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AlbumServer).DeleteAlbum(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(AlbumServer).DeleteAlbum(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Album_ListAlbums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.FetchRequest)
|
||||
in := new(FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -374,7 +373,7 @@ func _Album_ListAlbums_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
FullMethod: Album_ListAlbums_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AlbumServer).ListAlbums(ctx, req.(*protobuf.FetchRequest))
|
||||
return srv.(AlbumServer).ListAlbums(ctx, req.(*FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -416,7 +415,7 @@ func _Album_UploadPhoto_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
|
||||
func _Album_GetPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -428,7 +427,7 @@ func _Album_GetPhoto_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
FullMethod: Album_GetPhoto_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AlbumServer).GetPhoto(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(AlbumServer).GetPhoto(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -452,7 +451,7 @@ func _Album_UpdatePhoto_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
|
||||
func _Album_DeletePhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -464,13 +463,13 @@ func _Album_DeletePhoto_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
FullMethod: Album_DeletePhoto_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AlbumServer).DeletePhoto(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(AlbumServer).DeletePhoto(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Album_ListPhotos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.FetchRequest)
|
||||
in := new(FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -482,7 +481,7 @@ func _Album_ListPhotos_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
FullMethod: Album_ListPhotos_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AlbumServer).ListPhotos(ctx, req.(*protobuf.FetchRequest))
|
||||
return srv.(AlbumServer).ListPhotos(ctx, req.(*FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user