Documentation ¶
Overview ¶
Package meta add persistence layer for meta data defined by the end users to enrich the nodes.
Meta data might be defined by an admin and modified by normal end-users. Typically, to manage bookmarks or ratings.
Index ¶
Constants ¶
View Source
const (
ReservedNamespaceBookmark = "bookmark"
)
View Source
const TagsDocStoreId = "user_meta_tags"
Variables ¶
View Source
var Drivers = service.StorageDrivers{}
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO interface { resources.DAO GetNamespaceDao() NamespaceDAO Migrate(ctx context.Context) error Set(ctx context.Context, meta *idm.UserMeta) (*idm.UserMeta, string, error) Del(ctx context.Context, meta *idm.UserMeta) (prevValue string, e error) Search(ctx context.Context, query service2.Enquirer) ([]*idm.UserMeta, error) }
DAO interface
type NamespaceDAO ¶
type NamespaceDAO interface { resources.DAO Add(ctx context.Context, ns *idm.UserMetaNamespace) error Del(ctx context.Context, ns *idm.UserMetaNamespace) (e error) List(ctx context.Context) (map[string]*idm.UserMetaNamespace, error) }
NamespaceDAO interface
type TagsValuesClient ¶
type TagsValuesClient struct{}
TagsValuesClient is an utilitary used for listing/storing a set of values used in a given usermeta namespace
func (*TagsValuesClient) DeleteAllTags ¶
func (s *TagsValuesClient) DeleteAllTags(ctx context.Context, namespace string) error
DeleteAllTags can be used to clear all values for this namespace
func (*TagsValuesClient) ListTags ¶
func (s *TagsValuesClient) ListTags(ctx context.Context, namespace string) ([]string, *docstore.Document)
ListTags retrieves all values from the docstore
func (*TagsValuesClient) StoreNewTags ¶
StoreNewTags checks if there are new values and update the list in the docstore accordingly
Directories ¶
Path | Synopsis |
---|---|
dao
|
|
service
Package service provides a GRPC persistence layer for user-defined metadata
|
Package service provides a GRPC persistence layer for user-defined metadata |
service
Package service provides a REST gateway to the underlying grpc service
|
Package service provides a REST gateway to the underlying grpc service |
Click to show internal directories.
Click to hide internal directories.