dbh

package
v0.0.0-...-554f554 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Tag feature.Tag = "qf-indexing-dbh"

Variables

This section is empty.

Functions

func Join

func Join[V interface{}](slice []V, delim string) (joined string)

Types

type CFeature

type CFeature struct {
	feature.CFeature
	// contains filtered or unexported fields
}

func (*CFeature) EQL

func (*CFeature) GetAuthorKeyFrom

func (f *CFeature) GetAuthorKeyFrom(nameOrKey string) (flat string, ok bool)

func (*CFeature) GetAuthorNameFrom

func (f *CFeature) GetAuthorNameFrom(nameOrKey string) (fullName string, ok bool)

func (*CFeature) GetAuthorNames

func (f *CFeature) GetAuthorNames(nameOrKey string) (fullName, lastName, flat string, ok bool)

func (*CFeature) GetBuilderKeyCount

func (f *CFeature) GetBuilderKeyCount(prefix string) (count int, ok bool)

func (*CFeature) GetBuilderKeyFor

func (f *CFeature) GetBuilderKeyFor(shasum string) (key string, ok bool)

func (*CFeature) GetBuilderKeyQuotes

func (f *CFeature) GetBuilderKeyQuotes(prefix string) (keys []string, quotes []*quote.Quote)

func (*CFeature) GetFirstWordLetters

func (f *CFeature) GetFirstWordLetters() (letters []string)

func (*CFeature) GetFirstWords

func (f *CFeature) GetFirstWords(letter string) (words []string)

func (*CFeature) GetHumanBuilderKey

func (f *CFeature) GetHumanBuilderKey(widString string) (human string)

func (*CFeature) GetIndexedBuilderKey

func (f *CFeature) GetIndexedBuilderKey(human string) (indexed string)

func (*CFeature) GetNextBuilderKeyWords

func (f *CFeature) GetNextBuilderKeyWords(prefix string) (words []string)

func (*CFeature) GetPaginatedWordPageStubs

func (f *CFeature) GetPaginatedWordPageStubs(word string, pg, size int) (stubs []*feature.PageStub, total int)

func (*CFeature) GetPaginatedWordShasums

func (f *CFeature) GetPaginatedWordShasums(word string, pg, size int) (shasums []string)

func (*CFeature) GetRandomAuthor

func (f *CFeature) GetRandomAuthor() (name string)

func (*CFeature) GetRandomQuote

func (f *CFeature) GetRandomQuote() (shasum string)

func (*CFeature) GetRandomQuoteUrl

func (f *CFeature) GetRandomQuoteUrl() (url, hash string)

func (*CFeature) GetRandomTopic

func (f *CFeature) GetRandomTopic() (topic string)

func (*CFeature) GetRandomWord

func (f *CFeature) GetRandomWord() (word string)

func (*CFeature) GetSecondWords

func (f *CFeature) GetSecondWords(letter string, first int) (words []string)

func (*CFeature) GetShortestBuilderKey

func (f *CFeature) GetShortestBuilderKey(full string) (shortest string, ok bool)

func (*CFeature) GetTopicKeyFrom

func (f *CFeature) GetTopicKeyFrom(nameOrKey string) (flat string, ok bool)

func (*CFeature) GetTopicNameFrom

func (f *CFeature) GetTopicNameFrom(nameOrKey string) (topic string, ok bool)

func (*CFeature) GetTopicNames

func (f *CFeature) GetTopicNames(nameOrKey string) (topic, key string, ok bool)

func (*CFeature) GetWidFrom

func (f *CFeature) GetWidFrom(word string) (wid int64, ok bool)

func (*CFeature) GetWids2Words

func (f *CFeature) GetWids2Words(wids ...int64) (wids2words map[int64]string)

func (*CFeature) GetWordFrom

func (f *CFeature) GetWordFrom(wid int64) (word string, ok bool)

func (*CFeature) GetWordInfoFrom

func (f *CFeature) GetWordInfoFrom(inputs ...string) (wordList []string, lookupWid map[string]int64, lookupFlat, lookupWord map[string]string)

func (*CFeature) GetWordPageStubs

func (f *CFeature) GetWordPageStubs(word string) (stubs []*feature.PageStub)

func (*CFeature) GetWordShasums

func (f *CFeature) GetWordShasums(word string) (shasums []string)

func (*CFeature) GetWords

func (f *CFeature) GetWords(wids ...int64) (words []string)

func (*CFeature) GetWords2Wids

func (f *CFeature) GetWords2Wids(words ...string) (words2wids map[string]int64)

func (*CFeature) Init

func (f *CFeature) Init(this interface{})

func (*CFeature) Make

func (f *CFeature) Make() Feature

func (*CFeature) PageTypeNames

func (f *CFeature) PageTypeNames() (names []string)

func (*CFeature) ProcessRequestPageType

func (f *CFeature) ProcessRequestPageType(r *http.Request, p feature.Page) (pg feature.Page, redirect string, processed bool, err error)

func (*CFeature) Setup

func (f *CFeature) Setup(enjin feature.Internals)

func (*CFeature) Startup

func (f *CFeature) Startup(ctx *cli.Context) (err error)

func (*CFeature) TotalAuthors

func (f *CFeature) TotalAuthors() int64

func (*CFeature) TotalFirstWords

func (f *CFeature) TotalFirstWords() int64

func (*CFeature) TotalQuotes

func (f *CFeature) TotalQuotes() int64

func (*CFeature) TotalSecondWords

func (f *CFeature) TotalSecondWords() int64

func (*CFeature) TotalTopics

func (f *CFeature) TotalTopics() int64

func (*CFeature) TotalWords

func (f *CFeature) TotalWords() int64

type Feature

type Feature interface {
	feature.Feature
	feature.PageTypeProcessor

	EQL() feature.QueryIndexFeature

	GetWidFrom(word string) (wid int64, ok bool)
	GetWordFrom(wid int64) (word string, ok bool)

	GetWordInfoFrom(words ...string) (wordList []string, lookupWid map[string]int64, lookupFlat, lookupWord map[string]string)

	GetIndexedBuilderKey(human string) (widString string)
	GetHumanBuilderKey(widString string) (human string)
	GetShortestBuilderKey(full string) (shortest string, ok bool)

	GetBuilderKeyCount(prefix string) (count int, ok bool)
	GetBuilderKeyQuotes(prefix string) (keys []string, quotes []*quote.Quote)
	GetBuilderKeyFor(shasum string) (key string, ok bool)

	GetNextBuilderKeyWords(prefix string) (words []string)

	GetFirstWords(prefix string) (words []string)
	GetSecondWords(prefix string, first int) (words []string)
	GetFirstWordLetters() (letters []string)

	GetWordShasums(word string) (shasums []string)
	GetWordPageStubs(word string) (stubs []*feature.PageStub)
	GetPaginatedWordPageStubs(word string, pg, size int) (stubs []*feature.PageStub, total int)
	GetPaginatedWordShasums(word string, pg, size int) (shasums []string)

	GetAuthorNames(nameOrKey string) (fullName, lastName, key string, ok bool)
	GetAuthorKeyFrom(name string) (key string, ok bool)
	GetAuthorNameFrom(name string) (key string, ok bool)

	GetTopicNames(nameOrKey string) (topic, key string, ok bool)
	GetTopicKeyFrom(nameOrKey string) (key string, ok bool)
	GetTopicNameFrom(nameOrKey string) (key string, ok bool)

	GetRandomWord() (word string)
	GetRandomTopic() (topic string)
	GetRandomAuthor() (name string)
	GetRandomQuote() (shasum string)
	GetRandomQuoteUrl() (url, hash string)

	TotalWords() int64
	TotalQuotes() int64
	TotalTopics() int64
	TotalAuthors() int64
	TotalFirstWords() int64
	TotalSecondWords() int64
}

type MakeFeature

type MakeFeature interface {
	Make() Feature
}

func New

func New() MakeFeature

Jump to

Keyboard shortcuts

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