Documentation
¶
Index ¶
- func GetVideoHeight(source string) string
- func InitKey() []byte
- func LoadJSON(inputFile string, dest interface{}) bool
- func SaveJSON(outputFile string, source interface{}) bool
- type AddReply
- type AssociatedReply
- type BatchReply
- type Config
- type DeleteReply
- type GetReply
- 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 TagOptions
- 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) Batch(batch *api.Batch, handler func(reply BatchReply))
- func (tc *TieClient) CollectionInfo() api.CollectionInfo
- func (tc *TieClient) Delete(key, value1, value2 string, handler func(reply DeleteReply))
- func (tc *TieClient) Exists(key string) bool
- func (tc *TieClient) Get(key string, handler func(reply GetReply))
- func (tc *TieClient) NewBatch() *api.Batch
- func (tc *TieClient) NewUpdate(key, value1, value2, newValue2 string) api.Update
- func (tc *TieClient) PrintState()
- func (tc *TieClient) Sync() error
- func (tc *TieClient) Update(update api.Update, handler func(reply UpdateReply))
- type Update
- type UpdateReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVideoHeight ¶
Types ¶
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
ServeUrl string
DataHost string
ThumbnailHost string
Key []byte
Verbose bool
// contains filtered or unexported fields
}
func DefaultConfig ¶
func DefaultConfig() Config
func ReadConfig ¶
func TestingConfig ¶
func TestingConfig() Config
type DeleteReply ¶
type DeleteReply = *api.DeleteReply
type ObjectManager ¶ added in v0.1.5
type ObjectManager[T any] struct { // contains filtered or unexported fields }
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 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) 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) Delete ¶
func (tc *TieClient) Delete(key, value1, value2 string, handler func(reply DeleteReply))
Delete a triple from the collection
func (*TieClient) PrintState ¶
func (tc *TieClient) PrintState()
type UpdateReply ¶
type UpdateReply = *api.UpdateReply
Click to show internal directories.
Click to hide internal directories.