Documentation ¶
Index ¶
- func FilterByIndex(assets []*model.Asset, indices []int) (newAssets []*model.Asset)
- func FilterNil(assets []*model.Asset) (filteredAssets []*model.Asset)
- func NilIndex(assets []*model.Asset) (indices []int)
- func Query(assets []*model.Asset, queries []*model.Query, tagSet *model.TagSet, ...) (matchedAssets, filteredAssets []*model.Asset)
- func QueryIndex(assets []*model.Asset, queries []*model.Query, tagSet *model.TagSet, ...) (matchedAssetsIndex, filteredAssetsIndex []int)
- func ReRegister(assets []*model.Asset, idList []model.AssetID) error
- func SplitBy(assets []*model.Asset, f func(asset *model.Asset) bool) (trueAssets, falseAssets []*model.Asset)
- func SplitByID(assets []*model.Asset) (assetsWithID, assetsWithOutID []*model.Asset)
- func SplitByPath(assets []*model.Asset) (assetsWithPath, assetsWithOutPath []*model.Asset)
- func ToAssetIDList(assets []*model.Asset) (assetIDList []model.AssetID)
- func ToAssets(importAssets []*model.ImportAsset, tagSet *model.TagSet) (assets []*model.Asset, err error)
- func ToPaths(assets []*model.Asset) (paths []string)
- func ToUniqTagNames(assets []*model.ImportAsset) (tagNames []string)
- func Update(baseAssets, otherAssets []*model.Asset) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterByIndex ¶ added in v0.1.6
func Query ¶ added in v0.1.6
func Query(assets []*model.Asset, queries []*model.Query, tagSet *model.TagSet, matchToNil bool) (matchedAssets, filteredAssets []*model.Asset)
Query filter assets by queries and return matched assets. if asset is nil, it will be filtered.
func QueryIndex ¶ added in v0.1.6
func QueryIndex(assets []*model.Asset, queries []*model.Query, tagSet *model.TagSet, matchToNil bool) (matchedAssetsIndex, filteredAssetsIndex []int)
QueryIndex filter assets by queries and return matched asset indices. if asset is nil, it will be filtered.
func ReRegister ¶ added in v0.1.6
ReRegister set ID to asset. This is destructive method.
func SplitByPath ¶
func ToUniqTagNames ¶
func ToUniqTagNames(assets []*model.ImportAsset) (tagNames []string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.