 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func CheckExist(ctx context.Context, id types.SFID) bool
- func CheckFileMd5SumAndGetData(ctx context.Context, fh *multipart.FileHeader, md5Str string) (data []byte, sum string, err error)
- func Create(ctx context.Context, acc types.SFID, fh *multipart.FileHeader, ...) (*models.Resource, []byte, error)
- func GetByMd5(ctx context.Context, md5 string) (*models.Resource, error)
- func GetBySFID(ctx context.Context, id types.SFID) (*models.Resource, error)
- func GetContentByMd5(ctx context.Context, md5 string) (*models.Resource, []byte, error)
- func GetContentBySFID(ctx context.Context, id types.SFID) (*models.Resource, []byte, error)
- func GetOwnerByAccountAndSFID(ctx context.Context, acc, res types.SFID) (*models.ResourceOwnership, error)
- func ReadContent(ctx context.Context, m *models.Resource) ([]byte, error)
- func RemoveOwnershipBySFID(ctx context.Context, id types.SFID) error
- func UploadFile(ctx context.Context, data []byte, id types.SFID) (path string, err error)
- type CondArgs
- type DownLoadResourceRsp
- type ListReq
- type ListRsp
- type ResourceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileMd5SumAndGetData ¶ added in v1.1.0
func GetContentByMd5 ¶ added in v1.1.0
func GetContentBySFID ¶ added in v1.1.0
func GetOwnerByAccountAndSFID ¶ added in v1.1.0
func ReadContent ¶ added in v1.1.0
func RemoveOwnershipBySFID ¶ added in v1.1.0
Types ¶
type CondArgs ¶ added in v1.1.0
type CondArgs struct {
	AccountID      types.SFID      `name:"-"`
	ResourceIDs    []types.SFID    `in:"query" name:"resourceID,omitempty"`
	UploadedBefore types.Timestamp `in:"query" name:"uploadedBefore,omitempty"`
	UploadedAfter  types.Timestamp `in:"query" name:"uploadedAfter,omitempty"`
	ExpireBefore   types.Timestamp `in:"query" name:"expireBefore,omitempty"`
	ExpireAfter    types.Timestamp `in:"query" name:"expireAfter,omitempty"`
	FilenameLike   string          `in:"query" name:"filenameLike,omitempty"`
	Filenames      []string        `in:"query" name:"filename,omitempty"`
	Md5            string          `in:"query" name:"md5,omitempty"`
}
    func (*CondArgs) Condition ¶ added in v1.1.0
func (r *CondArgs) Condition() builder.SqlCondition
type DownLoadResourceRsp ¶ added in v1.2.3
func GetDownloadUrlBySFID ¶ added in v1.2.3
type ListRsp ¶ added in v1.1.0
type ListRsp struct {
	Data  []*ResourceInfo `json:"data"`
	Total int64           `json:"total"`
}
    type ResourceInfo ¶ added in v1.1.0
type ResourceInfo struct {
	models.RelResource
	models.ResourceInfo
	models.ResourceOwnerInfo
	datatypes.OperationTimes
}
     Click to show internal directories. 
   Click to hide internal directories.