elasticsearch

package
v0.0.0-...-63c9352 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndexMappings = `` /* 2273-byte string literal not displayed */

DO NOT delete or update properties Only add new properties

Functions

func CreateIndex

func CreateIndex(es *elasticsearch.Client) error

func DeleteIndex

func DeleteIndex(es *elasticsearch.Client) error

func MakeClient

func MakeClient(elasticsearchURL string) (*elasticsearch.Client, error)

func NewEmptyIdentityConfig

func NewEmptyIdentityConfig() *config.IdentityConfig

func NewLoggerFactory

func NewLoggerFactory() *log.Factory

func UpdateIndex

func UpdateIndex(es *elasticsearch.Client) error

Types

type AppLister

type AppLister struct {
	Handle *globaldb.Handle
	Store  *configsource.Store
}

func NewAppLister

func NewAppLister(ctx context.Context, pool *db.Pool, databaseCredentials *config.DatabaseCredentials) *AppLister

func (*AppLister) ListApps

func (l *AppLister) ListApps() (appIDs []string, err error)

type Item

type Item struct {
	Value  interface{}
	Cursor model.PageCursor
}

type ReindexedTimestamp

type ReindexedTimestamp struct {
	UserID      string
	ReindexedAt time.Time
}

type ReindexedTimestamps

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

func NewReindexedTimestamps

func NewReindexedTimestamps() *ReindexedTimestamps

func (*ReindexedTimestamps) Append

func (r *ReindexedTimestamps) Append(userID string, timestamp time.Time)

func (*ReindexedTimestamps) Flush

func (r *ReindexedTimestamps) Flush(
	dbHandle *appdb.Handle,
	userStore *user.Store) error

type Reindexer

type Reindexer struct {
	Clock               clock.Clock
	Handle              *appdb.Handle
	AppID               config.AppID
	Users               *user.Store
	OAuth               *identityoauth.Store
	LoginID             *identityloginid.Store
	RolesGroups         *rolesgroups.Store
	ReindexedTimestamps *ReindexedTimestamps
}

func NewReindexer

func NewReindexer(ctx context.Context, pool *db.Pool, databaseCredentials *config.DatabaseCredentials, appID config.AppID) *Reindexer

func (*Reindexer) QueryPage

func (q *Reindexer) QueryPage(after model.PageCursor, first uint64) ([]Item, error)

func (*Reindexer) Reindex

func (q *Reindexer) Reindex(es *elasticsearch.Client) (err error)

Jump to

Keyboard shortcuts

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