client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: BSD-3-Clause Imports: 16 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVideoHeight

func GetVideoHeight(source string) string

func InitKey

func InitKey() []byte

func LoadJSON

func LoadJSON(inputFile string, dest interface{}) bool

func SaveJSON

func SaveJSON(outputFile string, source interface{}) bool

Types

type AddReply

type AddReply = *api.AddReply

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 ReadConfig(configFile string) Config

func TestingConfig

func TestingConfig() Config

type DeleteReply

type DeleteReply = *api.DeleteReply

type GetReply

type GetReply = *api.GetReply

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 TagOptions struct {
	AddOriginalPath               bool
	PutlibForceGenerateThumbnails bool
}

type TieClient

type TieClient struct {
	Config Config
	// contains filtered or unexported fields
}

func NewTieClient

func NewTieClient(config Config) (client *TieClient)

func (*TieClient) Add

func (tc *TieClient) Add(key, value1, value2 string, handler func(reply AddReply))

func (*TieClient) Associated added in v0.1.8

func (tc *TieClient) Associated(key string, handler func(reply AssociatedReply))

func (*TieClient) Batch

func (tc *TieClient) Batch(batch *api.Batch, handler func(reply BatchReply))

func (*TieClient) CollectionInfo

func (tc *TieClient) CollectionInfo() api.CollectionInfo

func (*TieClient) Delete

func (tc *TieClient) Delete(key, value1, value2 string, handler func(reply DeleteReply))

func (*TieClient) Exists added in v0.1.6

func (tc *TieClient) Exists(key string) bool

func (*TieClient) Get

func (tc *TieClient) Get(key string, handler func(reply GetReply))

func (*TieClient) NewBatch

func (tc *TieClient) NewBatch() *api.Batch

func (*TieClient) NewUpdate added in v0.1.1

func (tc *TieClient) NewUpdate(key, value1, value2, newValue2 string) api.Update

func (*TieClient) PrintState

func (tc *TieClient) PrintState()

func (*TieClient) Update

func (tc *TieClient) Update(update api.Update, handler func(reply UpdateReply))

type Update added in v0.1.6

type Update = api.Update

type UpdateReply

type UpdateReply = *api.UpdateReply

Jump to

Keyboard shortcuts

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