usecase

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

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

func NewAsset

func NewAsset(assetRepository repository.Asset, tagRepository repository.Tag) *Asset

func (*Asset) AddAssetFromImagePath

func (a *Asset) AddAssetFromImagePath(ws model.WSName, filePath string) (model.AssetID, error)

func (*Asset) AddAssetFromImagePathIfDoesNotExist

func (a *Asset) AddAssetFromImagePathIfDoesNotExist(ws model.WSName, filePath string) (model.AssetID, bool, error)

func (*Asset) AddAssetFromImagePathListIfDoesNotExist

func (a *Asset) AddAssetFromImagePathListIfDoesNotExist(ws model.WSName, filePathList []string) ([]model.AssetID, error)

func (*Asset) AddImportAssets added in v0.1.1

func (a *Asset) AddImportAssets(ws model.WSName, assets []*model.ImportAsset, cap int) ([]model.AssetID, error)

func (*Asset) AssignBoundingBox

func (a *Asset) AssignBoundingBox(ws model.WSName, assetID model.AssetID, box *model.BoundingBox) (*model.Asset, error)

AssignBoundingBox assign bounding box to asset

func (*Asset) DeleteBoundingBox

func (a *Asset) DeleteBoundingBox(ws model.WSName, assetID model.AssetID, boxID model.BoundingBoxID) error

func (*Asset) ImportFromReader added in v0.1.1

func (a *Asset) ImportFromReader(ws model.WSName, reader io.Reader, new bool) error

func (*Asset) Init

func (a *Asset) Init(ws model.WSName) error

func (*Asset) ListAsync

func (a *Asset) ListAsync(ctx context.Context, ws model.WSName) (<-chan *model.Asset, error)

func (*Asset) ListAsyncByQueries

func (a *Asset) ListAsyncByQueries(ctx context.Context, ws model.WSName, queries []*model.Query) (<-chan *model.Asset, error)

func (*Asset) ModifyBoundingBox

func (a *Asset) ModifyBoundingBox(ws model.WSName, assetID model.AssetID, box *model.BoundingBox) (*model.Asset, error)

func (*Asset) UnAssignBoundingBox

func (a *Asset) UnAssignBoundingBox(ws model.WSName, assetID model.AssetID, boxID model.BoundingBoxID) (*model.Asset, error)

type AssetImportResult added in v0.1.1

type AssetImportResult struct {
	Asset *model.ImportAsset
	Err   error
}

type Migration

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

func NewMigration

func NewMigration(assetRepository repository.Asset, metaRepository repository.Meta) *Migration

func (*Migration) Migrate

func (m *Migration) Migrate() error

type Tag

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

func NewTag

func NewTag(tagRepository repository.Tag) *Tag

func (*Tag) List

func (a *Tag) List(ws model.WSName) (tags []*model.Tag, err error)

func (*Tag) SetTags

func (a *Tag) SetTags(ws model.WSName, tags []*model.Tag) error

SetTags set tag list to workspace

Jump to

Keyboard shortcuts

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