Documentation ¶
Index ¶
- func NewBBoltAsset(b *bolt.DB) repository.Asset
- func NewBBoltTag(b *bolt.DB) repository.Tag
- func NewBBoltWorkSpace(b *bolt.DB) repository.WorkSpace
- func NewBoltMeta(b *bolt.DB) repository.Meta
- type BBoltAsset
- func (b *BBoltAsset) Add(ws model.WSName, asset *model.Asset) (model.AssetID, error)
- func (b *BBoltAsset) AddByFilePathIfDoesNotExist(ws model.WSName, filePath string) (model.AssetID, bool, error)
- func (b *BBoltAsset) AddByFilePathListIfDoesNotExist(ws model.WSName, filePathList []string) ([]model.AssetID, error)
- func (b *BBoltAsset) BatchAdd(ws model.WSName, assets []*model.Asset) ([]model.AssetID, error)
- func (b *BBoltAsset) BatchUpdateByID(ws model.WSName, assets []*model.Asset) (updatedAssets, skippedAssets []*model.Asset, err error)
- func (b *BBoltAsset) BatchUpdateByPath(ws model.WSName, assets []*model.Asset) (updatedAssets, skippedAssets []*model.Asset, err error)
- func (b *BBoltAsset) Close() error
- func (b *BBoltAsset) Delete(ws model.WSName, id model.AssetID) error
- func (b *BBoltAsset) ForEach(ws model.WSName, f func(asset *model.Asset) error) error
- func (b *BBoltAsset) Get(ws model.WSName, id model.AssetID) (asset *model.Asset, exist bool, err error)
- func (b *BBoltAsset) GetByPath(ws model.WSName, path string) (asset *model.Asset, exist bool, err error)
- func (b *BBoltAsset) Has(ws model.WSName, id model.AssetID) (ok bool, err error)
- func (b *BBoltAsset) Init(ws model.WSName) error
- func (b *BBoltAsset) List(ws model.WSName) (assets []*model.Asset, err error)
- func (b *BBoltAsset) ListAsync(ctx context.Context, ws model.WSName, cap int) (assetChan <-chan *model.Asset, err error)
- func (b *BBoltAsset) ListBy(ws model.WSName, f func(asset *model.Asset) bool) (assets []*model.Asset, err error)
- func (b *BBoltAsset) ListByAsync(ctx context.Context, ws model.WSName, f func(asset *model.Asset) bool, cap int) (assetChan <-chan *model.Asset, err error)
- func (b *BBoltAsset) ListByIDList(ws model.WSName, idList []model.AssetID) (assets []*model.Asset, err error)
- func (b *BBoltAsset) ListByIDListAsync(ctx context.Context, ws model.WSName, idList []model.AssetID, cap int) (assetChan <-chan *model.Asset, errChan <-chan error, err error)
- func (b *BBoltAsset) ListByPaths(ws model.WSName, paths []string) (assets []*model.Asset, err error)
- func (b *BBoltAsset) ListByTags(ws model.WSName, tags []model.UnindexedTag) (assets []*model.Asset, err error)
- func (b *BBoltAsset) ListRawByAsync(ctx context.Context, ws model.WSName, f func(v []byte) bool, cap int) (vc <-chan []byte, err error)
- func (b *BBoltAsset) Revalidate(ws model.WSName) error
- func (b *BBoltAsset) Update(ws model.WSName, asset *model.Asset) error
- type BBoltBaseTag
- func (b *BBoltBaseTag) Add(ws model.WSName, unregisteredTag *model.UnregisteredUnindexedTag) (*model.Tag, error)
- func (b *BBoltBaseTag) AddByName(ws model.WSName, tagName string) (*model.Tag, bool, error)
- func (b *BBoltBaseTag) AddByNames(ws model.WSName, tagNames []string) ([]*model.Tag, error)
- func (b *BBoltBaseTag) AddWithIndex(ws model.WSName, unregisteredTagWithIndex *model.UnregisteredTag) (*model.Tag, error)
- func (b *BBoltBaseTag) Delete(ws model.WSName, idList []model.TagID) error
- func (b *BBoltBaseTag) ForEach(ws model.WSName, f func(tagWithIndex *model.Tag) error) error
- func (b *BBoltBaseTag) Get(ws model.WSName, id model.TagID) (tagWithIndex *model.Tag, exist bool, err error)
- func (b *BBoltBaseTag) ListAll(ws model.WSName) (assets []*model.Tag, err error)
- func (b *BBoltBaseTag) ListAsSet(ws model.WSName) (set *model.TagSet, err error)
- func (b *BBoltBaseTag) ListBy(ws model.WSName, f func(tag *model.Tag) bool) (assets []*model.Tag, err error)
- func (b *BBoltBaseTag) ListByAsync(ws model.WSName, f func(tagWithIndex *model.Tag) bool, cap int) (assetChan <-chan *model.Tag, err error)
- func (b *BBoltBaseTag) Save(ws model.WSName, tagWithIndex *model.Tag) (*model.Tag, error)
- type BBoltTag
- func (b *BBoltTag) AddByName(ws model.WSName, tagName string) (*model.Tag, bool, error)
- func (b *BBoltTag) AddByNames(ws model.WSName, tagNames []string) ([]*model.Tag, error)
- func (b *BBoltTag) AddWithIndex(ws model.WSName, tagWithIndex *model.UnregisteredTag) (*model.Tag, error)
- func (b *BBoltTag) Init(ws model.WSName) error
- type BBoltWorkSpace
- type BoltMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBBoltAsset ¶
func NewBBoltAsset(b *bolt.DB) repository.Asset
func NewBBoltTag ¶
func NewBBoltTag(b *bolt.DB) repository.Tag
func NewBBoltWorkSpace ¶
func NewBBoltWorkSpace(b *bolt.DB) repository.WorkSpace
func NewBoltMeta ¶
func NewBoltMeta(b *bolt.DB) repository.Meta
Types ¶
type BBoltAsset ¶
type BBoltAsset struct {
// contains filtered or unexported fields
}
func (*BBoltAsset) AddByFilePathIfDoesNotExist ¶
func (*BBoltAsset) AddByFilePathListIfDoesNotExist ¶
func (*BBoltAsset) BatchAdd ¶ added in v0.1.1
BatchAdd add Assets. provided assets must not have ID and must have path. If asset does not satisfy them, error will be returned.
func (*BBoltAsset) BatchUpdateByID ¶ added in v0.1.3
func (b *BBoltAsset) BatchUpdateByID(ws model.WSName, assets []*model.Asset) (updatedAssets, skippedAssets []*model.Asset, err error)
BatchUpdate update assets by ID. Invalid asset will be skip. For example, an asset that contains a bounding box that does not have an ID.
func (*BBoltAsset) BatchUpdateByPath ¶ added in v0.1.3
func (b *BBoltAsset) BatchUpdateByPath(ws model.WSName, assets []*model.Asset) (updatedAssets, skippedAssets []*model.Asset, err error)
BatchUpdateByPath update assets by path. Invalid asset will be skip. For example, an asset that contains a bounding box that does not have an ID. If asset which have non exist path is provided, it will be ignored.
func (*BBoltAsset) Close ¶ added in v0.1.3
func (b *BBoltAsset) Close() error
func (*BBoltAsset) ListByAsync ¶
func (*BBoltAsset) ListByIDList ¶ added in v0.1.3
func (b *BBoltAsset) ListByIDList(ws model.WSName, idList []model.AssetID) (assets []*model.Asset, err error)
ListByIDList list assets by provided ID ID list. If ID which does not exist is provided, nil will be returned.
func (*BBoltAsset) ListByIDListAsync ¶ added in v0.1.3
func (*BBoltAsset) ListByPaths ¶ added in v0.1.3
func (*BBoltAsset) ListByTags ¶
func (b *BBoltAsset) ListByTags(ws model.WSName, tags []model.UnindexedTag) (assets []*model.Asset, err error)
func (*BBoltAsset) ListRawByAsync ¶
func (*BBoltAsset) Revalidate ¶
func (b *BBoltAsset) Revalidate(ws model.WSName) error
type BBoltBaseTag ¶ added in v0.1.4
type BBoltBaseTag struct {
// contains filtered or unexported fields
}
func NewBBoltBaseTag ¶ added in v0.1.4
func NewBBoltBaseTag(b *bolt.DB, bucketName string) *BBoltBaseTag
func (*BBoltBaseTag) Add ¶ added in v0.1.4
func (b *BBoltBaseTag) Add(ws model.WSName, unregisteredTag *model.UnregisteredUnindexedTag) (*model.Tag, error)
func (*BBoltBaseTag) AddByNames ¶ added in v0.1.4
AddByNames adds tags which have provided names. Then returns ID list of created tags. If tag which have same name exists, do nothing and return the exist tag ID. For example, assume that ["tag1", "tag2", "tag3"] are provided as tagNames, and "tag2" already exist with ID=1. In this case, return values is [2,1,3].
func (*BBoltBaseTag) AddWithIndex ¶ added in v0.1.4
func (b *BBoltBaseTag) AddWithIndex(ws model.WSName, unregisteredTagWithIndex *model.UnregisteredTag) (*model.Tag, error)
func (*BBoltBaseTag) Delete ¶ added in v0.1.4
Delete deletes tags which have provided ID. Internally, even if tag is deleted, it still reserved on tag bucket with `deleted` flag.
func (*BBoltBaseTag) ListByAsync ¶ added in v0.1.4
type BBoltTag ¶
type BBoltTag struct { *BBoltBaseTag // contains filtered or unexported fields }
func (*BBoltTag) AddByNames ¶ added in v0.1.1
AddByNames adds tags which have provided names. Then returns ID list of created tags. If tag which have same name exists, do nothing and return the exist tag ID. For example, assume that ["tag1", "tag2", "tag3"] are provided as tagNames, and "tag2" already exist with ID=1. In this case, return values is [2,1,3].
func (*BBoltTag) AddWithIndex ¶ added in v0.1.4
type BBoltWorkSpace ¶
type BBoltWorkSpace struct {
// contains filtered or unexported fields
}
func (*BBoltWorkSpace) Init ¶
func (b *BBoltWorkSpace) Init() error
type BoltMeta ¶
type BoltMeta struct {
// contains filtered or unexported fields
}