meta

package
v5.0.0-...-b98a0e9 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

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

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

func (s *TagsValuesClient) StoreNewTags(ctx context.Context, namespace string, tags []string) error

StoreNewTags checks if there are new values and update the list in the docstore accordingly

Directories

Path Synopsis
dao
sql
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

Jump to

Keyboard shortcuts

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