database

package
v0.0.0-...-a8e0ceb Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database type acts as the control interface for the Redis datastore.

func New

func New(uri string) Database

New creates a database connection.

func (Database) GetBestCandidateWord

func (d Database) GetBestCandidateWord(word string) string

GetBestCandidateWord returns the best replacement synonym for supplied word. The return order should be in the defined lexeme order in Lexeme.go.

func (Database) WaitForReady

func (d Database) WaitForReady(timeout int) error

WaitForReady waits for `ready` status message in `status` pubsub channel.

type Lexeme

type Lexeme int

Lexeme type defines the part of speech associated with the word lookup.

const (
	// Noun defines the noun lexeme.
	Noun Lexeme = iota
	// Verb defines the noun lexeme.
	Verb
	// Adjective defines the noun lexeme.
	Adjective
	// Adverb defines the noun lexeme.
	Adverb
)

func (Lexeme) String

func (l Lexeme) String() string

Jump to

Keyboard shortcuts

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