index

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MasterKeyLength = 32

The length of the master key.

Variables

View Source
var ErrInvalidMasterKeyLength = fmt.Errorf("invalid key length, accepted key length is %d bytes", MasterKeyLength)

Error returned if a master key with invalid length is used.

View Source
var ErrNodeAlreadyExists = errors.New("node already exists")

Error returned if an node already exists in the IO Provider.

View Source
var ErrNodeNotFound = errors.New("node not found")

Error returned if an node was not found in the IO Provider.

View Source
var ErrNotAuthenticated = errors.New("user not authenticated")

Error returned if the caller cannot be authenticated by the Identity Provider.

View Source
var ErrNotAuthorized = errors.New("user not authorized")

Error returned if a user tries to access data they are not authorized for.

Functions

This section is empty.

Types

type SecureIndex

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

func NewSecureIndex

func NewSecureIndex(ctx context.Context, keyProvider key.Provider, ioProvider io.Provider, idProvider id.Provider) (SecureIndex, error)

NewSecureIndex creates a SecureIndex which is used to manage keyword/identifier pairs.

func (*SecureIndex) Add

func (i *SecureIndex) Add(ctx context.Context, token, keyword, identifier string) error

Add adds a keyword/identifier pair to the secure index.

func (*SecureIndex) Delete

func (i *SecureIndex) Delete(ctx context.Context, token, keyword, identifier string) error

Delete deletes all occurrences of a keyword/identifier pair from the secure index.

func (*SecureIndex) Search

func (i *SecureIndex) Search(ctx context.Context, token, keyword string) ([]string, error)

Search returns all identifiers that the given keyword is contained in.

Jump to

Keyboard shortcuts

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