repoimpl

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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) Add

func (b *BBoltAsset) Add(ws model.WSName, asset *model.Asset) (model.AssetID, error)

func (*BBoltAsset) AddByFilePathIfDoesNotExist

func (b *BBoltAsset) AddByFilePathIfDoesNotExist(ws model.WSName, filePath string) (model.AssetID, bool, error)

func (*BBoltAsset) AddByFilePathListIfDoesNotExist

func (b *BBoltAsset) AddByFilePathListIfDoesNotExist(ws model.WSName, filePathList []string) ([]model.AssetID, error)

func (*BBoltAsset) AddList

func (b *BBoltAsset) AddList(ws model.WSName, assets []*model.Asset) ([]model.AssetID, error)

func (*BBoltAsset) BatchUpdate

func (b *BBoltAsset) BatchUpdate(ws model.WSName, assets []*model.Asset) error

func (*BBoltAsset) Delete

func (b *BBoltAsset) Delete(ws model.WSName, id model.AssetID) error

func (*BBoltAsset) ForEach

func (b *BBoltAsset) ForEach(ws model.WSName, f func(asset *model.Asset) error) error

func (*BBoltAsset) Get

func (b *BBoltAsset) Get(ws model.WSName, id model.AssetID) (asset *model.Asset, exist bool, err error)

func (*BBoltAsset) GetByPath

func (b *BBoltAsset) GetByPath(ws model.WSName, path string) (asset *model.Asset, exist bool, err error)

func (*BBoltAsset) Has

func (b *BBoltAsset) Has(ws model.WSName, id model.AssetID) (ok bool, err error)

func (*BBoltAsset) Init

func (b *BBoltAsset) Init(ws model.WSName) error

func (*BBoltAsset) List

func (b *BBoltAsset) List(ctx context.Context, ws model.WSName, cap int) (assetChan <-chan *model.Asset, err error)

func (*BBoltAsset) ListBy

func (b *BBoltAsset) ListBy(ws model.WSName, f func(asset *model.Asset) bool) (assets []*model.Asset, err error)

func (*BBoltAsset) ListByAsync

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 (*BBoltAsset) ListByTags

func (b *BBoltAsset) ListByTags(ws model.WSName, tags []model.Tag) (assets []*model.Asset, err error)

func (*BBoltAsset) ListRawByAsync

func (b *BBoltAsset) ListRawByAsync(ctx context.Context, ws model.WSName, f func(v []byte) bool, cap int) (vc <-chan []byte, err error)

func (*BBoltAsset) Revalidate

func (b *BBoltAsset) Revalidate(ws model.WSName) error

func (*BBoltAsset) Update

func (b *BBoltAsset) Update(ws model.WSName, asset *model.Asset) error

type BBoltTag

type BBoltTag struct {
	// contains filtered or unexported fields
}

func (*BBoltTag) Add

func (b *BBoltTag) Add(ws model.WSName, tagWithIndex *model.TagWithIndex) (model.TagID, error)

func (*BBoltTag) ForEach

func (b *BBoltTag) ForEach(ws model.WSName, f func(tagWithIndex *model.TagWithIndex) error) error

func (*BBoltTag) Get

func (b *BBoltTag) Get(ws model.WSName, id model.TagID) (tagWithIndex *model.TagWithIndex, exist bool, err error)

func (*BBoltTag) Init

func (b *BBoltTag) Init(ws model.WSName) error

func (*BBoltTag) ListAll

func (b *BBoltTag) ListAll(ws model.WSName) (assets []*model.TagWithIndex, err error)

func (*BBoltTag) ListAsSet

func (b *BBoltTag) ListAsSet(ws model.WSName) (set *model.TagSet, err error)

func (*BBoltTag) ListBy

func (b *BBoltTag) ListBy(ws model.WSName, f func(tag *model.TagWithIndex) bool) (assets []*model.TagWithIndex, err error)

func (*BBoltTag) ListByAsync

func (b *BBoltTag) ListByAsync(ws model.WSName, f func(tagWithIndex *model.TagWithIndex) bool, cap int) (assetChan <-chan *model.TagWithIndex, err error)

func (*BBoltTag) RecreateBucket

func (b *BBoltTag) RecreateBucket(ws model.WSName) error

func (*BBoltTag) Update

func (b *BBoltTag) Update(ws model.WSName, tagWithIndex *model.TagWithIndex) error

type BBoltWorkSpace

type BBoltWorkSpace struct {
	// contains filtered or unexported fields
}

func (*BBoltWorkSpace) Add

func (b *BBoltWorkSpace) Add(ws *model.WorkSpace) error

func (*BBoltWorkSpace) Init

func (b *BBoltWorkSpace) Init() error

func (*BBoltWorkSpace) List

func (b *BBoltWorkSpace) List() (workspaces []*model.WorkSpace, err error)

func (*BBoltWorkSpace) Update

func (b *BBoltWorkSpace) Update(ws *model.WorkSpace) error

type BoltMeta

type BoltMeta struct {
	// contains filtered or unexported fields
}

func (*BoltMeta) GetDBVersion

func (b *BoltMeta) GetDBVersion() (v *semver.Version, exist bool, err error)

func (*BoltMeta) Init

func (b *BoltMeta) Init() error

func (*BoltMeta) SetDBVersion

func (b *BoltMeta) SetDBVersion(version *semver.Version) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL