meta

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: AGPL-3.0 Imports: 7 Imported by: 9

README

Meta Service

A central storage for all nodes metadata.

API

Metadata are stored JSON-serialized and associated to nodes UUID. This service is not indexed (except by node UUID). See the Search service if you need to make metadata queryable.

This service provides two handlers:

  • GRPC: for internal communication
  • HTTP API: for setting/reading meta from the clients.

TODO: Later should be transformed to a REST service.

Events

Meta service publishes the following NodeChange events to the topic common.TOPIC_META_CHANGES :

  • NodeChangeEvent_UPDATE_META
  • NodeChangeEvent_DELETE

Meta service is subscribing to the following NodeChange events on topic common.TOPIC_TREE_CHANGES

  • NodeChangeEvent_CREATE : extract meta from node and store it
  • NodeChangeEvent_UPDATE_PATH : same
  • NodeChangeEvent_UPDATE_META : same
  • NodeChangeEvent_DELETE : remove all metadata stored for this node

Storage

Storage is currently implemented in SQL, providing both MySQL and Sqlite implementations.

Documentation

Overview

Package meta provides storage for files and folders metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDAO

func NewDAO(o dao.DAO) dao.DAO

Types

type DAO

type DAO interface {
	dao.DAO

	SetMetadata(nodeId string, author string, metadata map[string]string) (err error)
	GetMetadata(nodeId string) (metadata map[string]string, err error)
	ListMetadata(query string) (metadataByUuid map[string]map[string]string, err error)
}

Directories

Path Synopsis
Package meta provides a GRPC access to the underlying persistence layer for files metadata
Package meta provides a GRPC access to the underlying persistence layer for files metadata
Package rest provides a REST API for querying the tree metadata.
Package rest provides a REST API for querying the tree metadata.

Jump to

Keyboard shortcuts

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