index

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: AGPL-3.0 Imports: 9 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 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(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(token, keyword, identifier string) error

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

func (*SecureIndex) Delete

func (i *SecureIndex) Delete(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(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