search

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserIndex

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

func NewUserIndex

func NewUserIndex(db *database.Database, dataDir string) (*UserIndex, error)

NewUserIndex returns a new *UserIndex based upon the database and data directory given. Indexes will be stored at: {dataDir}/indexes/user

func (UserIndex) CompletionSuggestions

func (ui UserIndex) CompletionSuggestions(query string) ([]core.User, error)

CompletionSuggestions returns user suggestions starting with the query string or the query string with an ampersand in front.

func (UserIndex) Deindex

func (ui UserIndex) Deindex(u core.User) error

Deindex deletes the index for a single user

func (UserIndex) EmailExists added in v0.3.0

func (ui UserIndex) EmailExists(email string) (bool, error)

EmailExists returns whether a user with an email exists, regardless of whether the existing user has verified that email.

func (UserIndex) FromEmail added in v0.3.0

func (ui UserIndex) FromEmail(email string) (core.User, error)

FromEmail returns the one verified user with this email or else a KeyNotFoundErr

func (UserIndex) Index

func (ui UserIndex) Index(u core.User) error

Index will index a single user

func (UserIndex) Reindex

func (ui UserIndex) Reindex() error

Reindex takes all users in the database and reindexes them.

func (UserIndex) VerifiedEmailExists added in v0.3.0

func (ui UserIndex) VerifiedEmailExists(email string) (bool, error)

VerifiedEmailExists returns whether a user with an email exists if this existing user has also verified that email.

func (UserIndex) WithEmail added in v0.3.0

func (ui UserIndex) WithEmail(email string) ([]core.User, error)

WithEmail returns all users with this email regardless of whether they have verified the email.

Jump to

Keyboard shortcuts

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