driver

package
v0.0.0-...-4314f45 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Get(token tokens.Repository) interface{}
	Close() error
}

type SearchClientInterface

type SearchClientInterface interface {
	// CreateIndex implementation must take into consideration creating a search schema for the target search
	// engine. Because we do not want to statically define directly the schema for item types, SearchClients must use
	// reflection utils as necessary to determine how to dynamically define schemas and how to search them. The most
	// important to note is that Item exposes searchable attributes which may be used to define schemas. By default,
	// ponzu Item will only expose item id and string fields as searchable. To extend this functionality extend
	// entity's Searchable interface to expose types you want to search, and implement the appropriate schema
	// in your target search client
	CreateIndex(entityName string, entityType interface{}) error
	UpdateIndex(entityName string, entityType interface{}) error
	Indexes() (map[string]SearchIndexInterface, error)
	GetIndex(entityName string) (SearchIndexInterface, error)
}

type SearchIndexInterface

type SearchIndexInterface interface {
	Update(id string, data interface{}) error
	Delete(id string) error
	Search(query string, count, offset int) ([]interface{}, error)
}

type Searchable

type Searchable interface {
	GetSearchableAttributes() map[string]reflect.Type
	IndexContent() bool
}

type StaticFileSystemInterface

type StaticFileSystemInterface interface {
	Open(name string) (http.File, error)
}

type StorageClientInterface

type StorageClientInterface interface {
	// Save saves a file to storage. Make sure to close file after it's written
	Save(fileName string, file io.ReadCloser) (string, int64, error)
	Delete(path string) error
	Open(name string) (http.File, error)
}

Jump to

Keyboard shortcuts

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