mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
File resource type was useless till now, remove it before new release. relate: https://github.com/milvus-io/milvus/issues/43687 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
36 lines
592 B
Go
36 lines
592 B
Go
package model
|
|
|
|
import (
|
|
pb "github.com/milvus-io/milvus/pkg/v2/proto/datapb"
|
|
)
|
|
|
|
type FileResource struct {
|
|
ID int64
|
|
Name string
|
|
Path string
|
|
}
|
|
|
|
func (resource *FileResource) Marshal() *pb.FileResourceInfo {
|
|
if resource == nil {
|
|
return nil
|
|
}
|
|
|
|
return &pb.FileResourceInfo{
|
|
ResourceId: resource.ID,
|
|
Name: resource.Name,
|
|
Path: resource.Path,
|
|
}
|
|
}
|
|
|
|
func UnmarshalFileResourceInfo(resource *pb.FileResourceInfo) *FileResource {
|
|
if resource == nil {
|
|
return nil
|
|
}
|
|
|
|
return &FileResource{
|
|
ID: resource.ResourceId,
|
|
Name: resource.Name,
|
|
Path: resource.Path,
|
|
}
|
|
}
|