2026-08-09 10:43:45 +08:00
|
|
|
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
|
|
import (
|
2026-08-09 12:41:08 +08:00
|
|
|
"bsm/full/module/base/cloud/internal/logic/album"
|
|
|
|
|
pb "bsm/full/module/base/cloud/pb"
|
2026-08-09 15:10:19 +08:00
|
|
|
"context"
|
2026-08-09 10:43:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type AlbumServer struct {
|
|
|
|
|
pb.UnimplementedAlbumServer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewAlbumServer() *AlbumServer {
|
|
|
|
|
return &AlbumServer{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建相册
|
|
|
|
|
func (s *AlbumServer) CreateAlbum(ctx context.Context, in *pb.CreateAlbumRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return album.CreateAlbum(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取相册详情
|
|
|
|
|
func (s *AlbumServer) GetAlbum(ctx context.Context, in *pb.IdentRequest) (*pb.CloudAlbumItem, error) {
|
|
|
|
|
return album.GetAlbum(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新相册
|
|
|
|
|
func (s *AlbumServer) UpdateAlbum(ctx context.Context, in *pb.CloudAlbumItem) (*pb.StatusReply, error) {
|
|
|
|
|
return album.UpdateAlbum(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除相册
|
|
|
|
|
func (s *AlbumServer) DeleteAlbum(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return album.DeleteAlbum(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取相册列表
|
|
|
|
|
func (s *AlbumServer) ListAlbums(ctx context.Context, in *pb.FetchRequest) (*pb.ListAlbumsResponse, error) {
|
|
|
|
|
return album.ListAlbums(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 设置封面照片
|
|
|
|
|
func (s *AlbumServer) SetCoverPhoto(ctx context.Context, in *pb.SetCoverPhotoRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return album.SetCoverPhoto(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 上传照片
|
|
|
|
|
func (s *AlbumServer) UploadPhoto(ctx context.Context, in *pb.CloudPhotoItem) (*pb.StatusReply, error) {
|
|
|
|
|
return album.UploadPhoto(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取照片详情
|
|
|
|
|
func (s *AlbumServer) GetPhoto(ctx context.Context, in *pb.IdentRequest) (*pb.CloudPhotoItem, error) {
|
|
|
|
|
return album.GetPhoto(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新照片
|
|
|
|
|
func (s *AlbumServer) UpdatePhoto(ctx context.Context, in *pb.CloudPhotoItem) (*pb.StatusReply, error) {
|
|
|
|
|
return album.UpdatePhoto(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除照片
|
|
|
|
|
func (s *AlbumServer) DeletePhoto(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return album.DeletePhoto(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取照片列表
|
|
|
|
|
func (s *AlbumServer) ListPhotos(ctx context.Context, in *pb.FetchRequest) (*pb.ListPhotosResponse, error) {
|
|
|
|
|
return album.ListPhotos(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 移动照片到其他相册
|
|
|
|
|
func (s *AlbumServer) MovePhoto(ctx context.Context, in *pb.MovePhotoRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return album.MovePhoto(ctx, in)
|
|
|
|
|
}
|