568 lines
		
	
	
		
			20 KiB
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			568 lines
		
	
	
		
			20 KiB
		
	
	
	
		
			Go
		
	
	
	
| // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 | |
| // versions:
 | |
| // - protoc-gen-go-grpc v1.5.1
 | |
| // - protoc             (unknown)
 | |
| // source: album.proto
 | |
| 
 | |
| package cloud
 | |
| 
 | |
| import (
 | |
| 	context "context"
 | |
| 	grpc "google.golang.org/grpc"
 | |
| 	codes "google.golang.org/grpc/codes"
 | |
| 	status "google.golang.org/grpc/status"
 | |
| )
 | |
| 
 | |
| // This is a compile-time assertion to ensure that this generated file
 | |
| // is compatible with the grpc package it is being compiled against.
 | |
| // Requires gRPC-Go v1.64.0 or later.
 | |
| const _ = grpc.SupportPackageIsVersion9
 | |
| 
 | |
| const (
 | |
| 	Album_CreateAlbum_FullMethodName   = "/cloud.Album/CreateAlbum"
 | |
| 	Album_GetAlbum_FullMethodName      = "/cloud.Album/GetAlbum"
 | |
| 	Album_UpdateAlbum_FullMethodName   = "/cloud.Album/UpdateAlbum"
 | |
| 	Album_DeleteAlbum_FullMethodName   = "/cloud.Album/DeleteAlbum"
 | |
| 	Album_ListAlbums_FullMethodName    = "/cloud.Album/ListAlbums"
 | |
| 	Album_SetCoverPhoto_FullMethodName = "/cloud.Album/SetCoverPhoto"
 | |
| 	Album_UploadPhoto_FullMethodName   = "/cloud.Album/UploadPhoto"
 | |
| 	Album_GetPhoto_FullMethodName      = "/cloud.Album/GetPhoto"
 | |
| 	Album_UpdatePhoto_FullMethodName   = "/cloud.Album/UpdatePhoto"
 | |
| 	Album_DeletePhoto_FullMethodName   = "/cloud.Album/DeletePhoto"
 | |
| 	Album_ListPhotos_FullMethodName    = "/cloud.Album/ListPhotos"
 | |
| 	Album_MovePhoto_FullMethodName     = "/cloud.Album/MovePhoto"
 | |
| )
 | |
| 
 | |
| // AlbumClient is the client API for Album service.
 | |
| //
 | |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 | |
| //
 | |
| // 相册服务
 | |
| type AlbumClient interface {
 | |
| 	// 创建相册
 | |
| 	CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 获取相册详情
 | |
| 	GetAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error)
 | |
| 	// 更新相册
 | |
| 	UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 删除相册
 | |
| 	DeleteAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 获取相册列表
 | |
| 	ListAlbums(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error)
 | |
| 	// 设置封面照片
 | |
| 	SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 上传照片
 | |
| 	UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 获取照片详情
 | |
| 	GetPhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error)
 | |
| 	// 更新照片
 | |
| 	UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 删除照片
 | |
| 	DeletePhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| 	// 获取照片列表
 | |
| 	ListPhotos(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error)
 | |
| 	// 移动照片到其他相册
 | |
| 	MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*StatusReply, error)
 | |
| }
 | |
| 
 | |
| type albumClient struct {
 | |
| 	cc grpc.ClientConnInterface
 | |
| }
 | |
| 
 | |
| func NewAlbumClient(cc grpc.ClientConnInterface) AlbumClient {
 | |
| 	return &albumClient{cc}
 | |
| }
 | |
| 
 | |
| func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_CreateAlbum_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| 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...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_UpdateAlbum_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) DeleteAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_DeleteAlbum_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| 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...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_SetCoverPhoto_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_UploadPhoto_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| 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...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_UpdatePhoto_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) DeletePhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_DeletePhoto_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| 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...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) {
 | |
| 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 | |
| 	out := new(StatusReply)
 | |
| 	err := c.cc.Invoke(ctx, Album_MovePhoto_FullMethodName, in, out, cOpts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| // AlbumServer is the server API for Album service.
 | |
| // All implementations must embed UnimplementedAlbumServer
 | |
| // for forward compatibility.
 | |
| //
 | |
| // 相册服务
 | |
| type AlbumServer interface {
 | |
| 	// 创建相册
 | |
| 	CreateAlbum(context.Context, *CreateAlbumRequest) (*StatusReply, error)
 | |
| 	// 获取相册详情
 | |
| 	GetAlbum(context.Context, *IdentRequest) (*CloudAlbumItem, error)
 | |
| 	// 更新相册
 | |
| 	UpdateAlbum(context.Context, *CloudAlbumItem) (*StatusReply, error)
 | |
| 	// 删除相册
 | |
| 	DeleteAlbum(context.Context, *IdentRequest) (*StatusReply, error)
 | |
| 	// 获取相册列表
 | |
| 	ListAlbums(context.Context, *FetchRequest) (*ListAlbumsResponse, error)
 | |
| 	// 设置封面照片
 | |
| 	SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*StatusReply, error)
 | |
| 	// 上传照片
 | |
| 	UploadPhoto(context.Context, *CloudPhotoItem) (*StatusReply, error)
 | |
| 	// 获取照片详情
 | |
| 	GetPhoto(context.Context, *IdentRequest) (*CloudPhotoItem, error)
 | |
| 	// 更新照片
 | |
| 	UpdatePhoto(context.Context, *CloudPhotoItem) (*StatusReply, error)
 | |
| 	// 删除照片
 | |
| 	DeletePhoto(context.Context, *IdentRequest) (*StatusReply, error)
 | |
| 	// 获取照片列表
 | |
| 	ListPhotos(context.Context, *FetchRequest) (*ListPhotosResponse, error)
 | |
| 	// 移动照片到其他相册
 | |
| 	MovePhoto(context.Context, *MovePhotoRequest) (*StatusReply, error)
 | |
| 	mustEmbedUnimplementedAlbumServer()
 | |
| }
 | |
| 
 | |
| // UnimplementedAlbumServer must be embedded to have
 | |
| // forward compatible implementations.
 | |
| //
 | |
| // NOTE: this should be embedded by value instead of pointer to avoid a nil
 | |
| // pointer dereference when methods are called.
 | |
| type UnimplementedAlbumServer struct{}
 | |
| 
 | |
| func (UnimplementedAlbumServer) CreateAlbum(context.Context, *CreateAlbumRequest) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method CreateAlbum not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) GetAlbum(context.Context, *IdentRequest) (*CloudAlbumItem, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method GetAlbum not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) UpdateAlbum(context.Context, *CloudAlbumItem) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method UpdateAlbum not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) DeleteAlbum(context.Context, *IdentRequest) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method DeleteAlbum not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) ListAlbums(context.Context, *FetchRequest) (*ListAlbumsResponse, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method ListAlbums not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method SetCoverPhoto not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) UploadPhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method UploadPhoto not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) GetPhoto(context.Context, *IdentRequest) (*CloudPhotoItem, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method GetPhoto not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) UpdatePhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method UpdatePhoto not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) DeletePhoto(context.Context, *IdentRequest) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method DeletePhoto not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) ListPhotos(context.Context, *FetchRequest) (*ListPhotosResponse, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method ListPhotos not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) MovePhoto(context.Context, *MovePhotoRequest) (*StatusReply, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method MovePhoto not implemented")
 | |
| }
 | |
| func (UnimplementedAlbumServer) mustEmbedUnimplementedAlbumServer() {}
 | |
| func (UnimplementedAlbumServer) testEmbeddedByValue()               {}
 | |
| 
 | |
| // UnsafeAlbumServer may be embedded to opt out of forward compatibility for this service.
 | |
| // Use of this interface is not recommended, as added methods to AlbumServer will
 | |
| // result in compilation errors.
 | |
| type UnsafeAlbumServer interface {
 | |
| 	mustEmbedUnimplementedAlbumServer()
 | |
| }
 | |
| 
 | |
| func RegisterAlbumServer(s grpc.ServiceRegistrar, srv AlbumServer) {
 | |
| 	// If the following call pancis, it indicates UnimplementedAlbumServer was
 | |
| 	// embedded by pointer and is nil.  This will cause panics if an
 | |
| 	// unimplemented method is ever invoked, so we test this at initialization
 | |
| 	// time to prevent it from happening at runtime later due to I/O.
 | |
| 	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
 | |
| 		t.testEmbeddedByValue()
 | |
| 	}
 | |
| 	s.RegisterService(&Album_ServiceDesc, srv)
 | |
| }
 | |
| 
 | |
| func _Album_CreateAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(CreateAlbumRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).CreateAlbum(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_CreateAlbum_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).CreateAlbum(ctx, req.(*CreateAlbumRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(IdentRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).GetAlbum(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_GetAlbum_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).GetAlbum(ctx, req.(*IdentRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_UpdateAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(CloudAlbumItem)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).UpdateAlbum(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_UpdateAlbum_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).UpdateAlbum(ctx, req.(*CloudAlbumItem))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_DeleteAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(IdentRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).DeleteAlbum(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_DeleteAlbum_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		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(FetchRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).ListAlbums(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_ListAlbums_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).ListAlbums(ctx, req.(*FetchRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_SetCoverPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(SetCoverPhotoRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).SetCoverPhoto(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_SetCoverPhoto_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).SetCoverPhoto(ctx, req.(*SetCoverPhotoRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_UploadPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(CloudPhotoItem)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).UploadPhoto(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_UploadPhoto_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).UploadPhoto(ctx, req.(*CloudPhotoItem))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_GetPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(IdentRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).GetPhoto(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_GetPhoto_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).GetPhoto(ctx, req.(*IdentRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_UpdatePhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(CloudPhotoItem)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).UpdatePhoto(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_UpdatePhoto_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).UpdatePhoto(ctx, req.(*CloudPhotoItem))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_DeletePhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(IdentRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).DeletePhoto(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_DeletePhoto_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		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(FetchRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).ListPhotos(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_ListPhotos_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).ListPhotos(ctx, req.(*FetchRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| func _Album_MovePhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(MovePhotoRequest)
 | |
| 	if err := dec(in); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	if interceptor == nil {
 | |
| 		return srv.(AlbumServer).MovePhoto(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: Album_MovePhoto_FullMethodName,
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(AlbumServer).MovePhoto(ctx, req.(*MovePhotoRequest))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| // Album_ServiceDesc is the grpc.ServiceDesc for Album service.
 | |
| // It's only intended for direct use with grpc.RegisterService,
 | |
| // and not to be introspected or modified (even as a copy)
 | |
| var Album_ServiceDesc = grpc.ServiceDesc{
 | |
| 	ServiceName: "cloud.Album",
 | |
| 	HandlerType: (*AlbumServer)(nil),
 | |
| 	Methods: []grpc.MethodDesc{
 | |
| 		{
 | |
| 			MethodName: "CreateAlbum",
 | |
| 			Handler:    _Album_CreateAlbum_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "GetAlbum",
 | |
| 			Handler:    _Album_GetAlbum_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "UpdateAlbum",
 | |
| 			Handler:    _Album_UpdateAlbum_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "DeleteAlbum",
 | |
| 			Handler:    _Album_DeleteAlbum_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "ListAlbums",
 | |
| 			Handler:    _Album_ListAlbums_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "SetCoverPhoto",
 | |
| 			Handler:    _Album_SetCoverPhoto_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "UploadPhoto",
 | |
| 			Handler:    _Album_UploadPhoto_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "GetPhoto",
 | |
| 			Handler:    _Album_GetPhoto_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "UpdatePhoto",
 | |
| 			Handler:    _Album_UpdatePhoto_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "DeletePhoto",
 | |
| 			Handler:    _Album_DeletePhoto_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "ListPhotos",
 | |
| 			Handler:    _Album_ListPhotos_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "MovePhoto",
 | |
| 			Handler:    _Album_MovePhoto_Handler,
 | |
| 		},
 | |
| 	},
 | |
| 	Streams:  []grpc.StreamDesc{},
 | |
| 	Metadata: "album.proto",
 | |
| }
 |