aoiasd ed69375f00
enhance: remove resource type from file resource config (#45103)
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>
2025-11-03 10:15:32 +08:00

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,
}
}