meta

package
v4.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: AGPL-3.0 Imports: 20 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 TagsDocStoreId = "user_meta_tags"

Variables

This section is empty.

Functions

func NewDAO

func NewDAO(ctx context.Context, o dao.DAO) (dao.DAO, error)

Types

type DAO

type DAO interface {
	resources.DAO

	GetNamespaceDao() namespace.DAO

	Set(meta *idm.UserMeta) (*idm.UserMeta, string, error)
	Del(meta *idm.UserMeta) (prevValue string, e error)
	Search(metaIds []string, nodeUuids []string, namespace string, ownerSubject string, q *service.ResourcePolicyQuery) ([]*idm.UserMeta, error)
}

DAO interface

type TagsValuesClient added in v4.3.0

type TagsValuesClient struct {
	// contains filtered or unexported fields
}

TagsValuesClient is an utilitary used for listing/storing a set of values used in a given usermeta namespace

func (*TagsValuesClient) DeleteAllTags added in v4.3.0

func (s *TagsValuesClient) DeleteAllTags(ctx context.Context, namespace string) error

DeleteAllTags can be used to clear all values for this namespace

func (*TagsValuesClient) ListTags added in v4.3.0

func (s *TagsValuesClient) ListTags(ctx context.Context, namespace string) ([]string, *docstore.Document)

ListTags retrieves all values from the docstore

func (*TagsValuesClient) StoreNewTags added in v4.3.0

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
Package grpc provides persistence layer for user-defined metadata
Package grpc provides persistence layer for user-defined metadata
Package namespace provides operations for managing user-metadata namespaces
Package namespace provides operations for managing user-metadata namespaces
Package provides a gateway to the underlying grpc service
Package provides a gateway to the underlying grpc service

Jump to

Keyboard shortcuts

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