Documentation
¶
Index ¶
- Constants
- func GetVideoHeight(source string) string
- func InitKey() []byte
- func SaveConfig(name string, config Config) error
- func Tag(tie *TieClient, info TagInfo) error
- type AddReply
- type AssociatedOptions
- type AssociatedReply
- type BatchReply
- type Config
- type DeleteReply
- type DirUID
- type GetOptions
- type GetReply
- type ImportConfig
- type ObjectManager
- func (om *ObjectManager[T]) Add(object any) error
- func (om *ObjectManager[T]) Associated(property string) (objects []T, err error)
- func (om *ObjectManager[T]) Delete(object any) error
- func (om *ObjectManager[T]) Get(uid string) (T, error)
- func (om *ObjectManager[T]) GetAll() ([]T, error)
- func (om *ObjectManager[T]) ResultToMap(result tiedb.TripleSet) (objects map[string]T)
- func (om *ObjectManager[T]) ResultToObject(uid string, result tiedb.TripleSet) (obj T)
- func (om *ObjectManager[T]) ResultToSlice(result tiedb.TripleSet) (objects []T)
- func (om *ObjectManager[T]) Upsert(object any) error
- type TagInfo
- type TagOptions
- type TieCategory
- type TieClient
- func (tc *TieClient) Add(key, value1, value2 string, handler func(reply AddReply))
- func (tc *TieClient) Associated(key string, handler func(reply AssociatedReply))
- func (tc *TieClient) AssociatedWith(key string, o AssociatedOptions, handler func(reply AssociatedReply))
- func (tc *TieClient) Batch(batch *api.Batch, handler func(reply BatchReply))
- func (tc *TieClient) CollectionInfo() api.CollectionInfo
- func (tie *TieClient) CreateTieRootDir() error
- func (tc *TieClient) Delete(key, value1, value2 string, handler func(reply DeleteReply))
- func (tie *TieClient) DirUIDFromPath(path string) (DirUID, error)
- func (tc *TieClient) Exists(key string) bool
- func (tc *TieClient) Get(key string, o GetOptions, handler func(reply GetReply))
- func (tie *TieClient) ImportDir(dir string, host string, parentDir DirUID, dirType TieType, tags []string) error
- func (tie *TieClient) ImportFile(file string, host string, tags []string, directory DirUID, dirType TieType) error
- func (tie *TieClient) MkTieDir(path string) (DirUID, error)
- func (tie *TieClient) MkTieDirAll(path string) (DirUID, error)
- func (tc *TieClient) NewBatch() *api.Batch
- func (tc *TieClient) NewUpdate(key, value1, value2, newValue2 string) api.Update
- func (tc *TieClient) PrintState()
- func (tie *TieClient) ReadTieDir(path string) (DirUID, error)
- func (tc *TieClient) SimpleGet(key string, handler func(reply GetReply))
- func (tc *TieClient) Sync() error
- func (tc *TieClient) Update(update api.Update, handler func(reply UpdateReply))
- type TieProperty
- type TieType
- type Uid
- type Update
- type UpdateReply
Constants ¶
View Source
const (
FileURIScheme string = "file:"
)
Variables ¶
This section is empty.
Functions ¶
func GetVideoHeight ¶
func SaveConfig ¶ added in v0.3.2
Types ¶
type AssociatedOptions ¶ added in v0.3.2
type AssociatedOptions = api.AssociatedOptions
type AssociatedReply ¶ added in v0.1.8
type AssociatedReply = *api.AssociatedReply
type BatchReply ¶
type BatchReply = *api.BatchReply
type Config ¶
type Config struct { Username string Password string Namespace string Collection string Webservice string UIDService string DefaultFileHosts []string Import ImportConfig FileHosts map[string]string // contains filtered or unexported fields }
func DefaultConfig ¶
func DefaultConfig() Config
func LoadConfig ¶ added in v0.3.2
func TestingConfig ¶
func TestingConfig() Config
type DeleteReply ¶
type DeleteReply = *api.DeleteReply
type GetOptions ¶ added in v0.3.2
type GetOptions = api.GetOptions
type ImportConfig ¶ added in v0.3.2
type ObjectManager ¶ added in v0.1.5
func NewObjectManager ¶ added in v0.1.5
func NewObjectManager[T any](client *TieClient, collectionUid string) ObjectManager[T]
func (*ObjectManager[T]) Add ¶ added in v0.1.6
func (om *ObjectManager[T]) Add(object any) error
func (*ObjectManager[T]) Associated ¶ added in v0.1.8
func (om *ObjectManager[T]) Associated(property string) (objects []T, err error)
func (*ObjectManager[T]) Delete ¶ added in v0.1.7
func (om *ObjectManager[T]) Delete(object any) error
func (*ObjectManager[T]) Get ¶ added in v0.1.8
func (om *ObjectManager[T]) Get(uid string) (T, error)
func (*ObjectManager[T]) GetAll ¶ added in v0.1.5
func (om *ObjectManager[T]) GetAll() ([]T, error)
func (*ObjectManager[T]) ResultToMap ¶ added in v0.1.8
func (om *ObjectManager[T]) ResultToMap(result tiedb.TripleSet) (objects map[string]T)
func (*ObjectManager[T]) ResultToObject ¶ added in v0.1.8
func (om *ObjectManager[T]) ResultToObject(uid string, result tiedb.TripleSet) (obj T)
func (*ObjectManager[T]) ResultToSlice ¶ added in v0.1.8
func (om *ObjectManager[T]) ResultToSlice(result tiedb.TripleSet) (objects []T)
func (*ObjectManager[T]) Upsert ¶ added in v0.1.6
func (om *ObjectManager[T]) Upsert(object any) error
type TagOptions ¶
type TieCategory ¶ added in v0.3.2
type TieCategory int
type TieClient ¶
type TieClient struct { Config Config // contains filtered or unexported fields }
func NewTieClient ¶
func (*TieClient) Associated ¶ added in v0.1.8
func (tc *TieClient) Associated(key string, handler func(reply AssociatedReply))
Get a TripleSet with all triples that are associated with 'key'
func (*TieClient) AssociatedWith ¶ added in v0.3.2
func (tc *TieClient) AssociatedWith(key string, o AssociatedOptions, handler func(reply AssociatedReply))
Get a TripleSet with all triples that are associated with 'key'
func (*TieClient) Batch ¶
func (tc *TieClient) Batch(batch *api.Batch, handler func(reply BatchReply))
Run a batch - make new Batch with NewBatch
func (*TieClient) CollectionInfo ¶
func (tc *TieClient) CollectionInfo() api.CollectionInfo
func (*TieClient) CreateTieRootDir ¶ added in v0.3.4
func (*TieClient) Delete ¶
func (tc *TieClient) Delete(key, value1, value2 string, handler func(reply DeleteReply))
Delete a triple from the collection
func (*TieClient) DirUIDFromPath ¶ added in v0.3.4
func (*TieClient) Get ¶
func (tc *TieClient) Get(key string, o GetOptions, handler func(reply GetReply))
Get a TripleSet from a key with options
func (*TieClient) ImportFile ¶ added in v0.3.2
func (*TieClient) MkTieDirAll ¶ added in v0.3.5
func (*TieClient) PrintState ¶
func (tc *TieClient) PrintState()
func (*TieClient) ReadTieDir ¶ added in v0.3.4
type TieProperty ¶ added in v0.3.2
type TieProperty int
const ( TieUid TieProperty = iota // tie-uid TieDirectory // directory TieIsDir // is-dir TieFilename // filename TieFilesize // filesize TieName // name TieMediaType // media-type TieFileHost // filehost TieTag // tag TiePath // path TieParent // parent TieTags // tags TieTagDate // tag-date TieCollection // collection TieTypeProperty // tie-type TieAll // all )
func (TieProperty) String ¶ added in v0.3.2
func (i TieProperty) String() string
type TieType ¶ added in v0.3.2
type TieType int
const ( TieUnknownFile TieType = iota // unknown-file TieImageFile // image-file TieAudioFile // audio-file TieVideoFile // video-file TieDocumentFile // document-file TieArchiveFile // archive-file TieImageDir // image-dir TieAudioDir // audio-dir TieVideoDir // video-dir TieDocumentDir // document-dir TieImageArchive // image-archive TieVideoArchive // video-archive TieDocumentArchive // document-archive )
func GetTieTypeFromPath ¶ added in v0.3.2
type UpdateReply ¶
type UpdateReply = *api.UpdateReply
Click to show internal directories.
Click to hide internal directories.