config

package
v0.0.0-...-98cd694 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ElasticsearchProvider represents the elasticsearch search index provider.
	ElasticsearchProvider = "elasticsearch"
	// AlgoliaProvider represents the algolia search index provider.
	AlgoliaProvider = "algolia"
)

Variables

This section is empty.

Functions

func ProvideIndex

func ProvideIndex[T search.Searchable](ctx context.Context, logger logging.Logger, tracerProvider tracing.TracerProvider, cfg *Config, indexName string) (search.Index[T], error)

ProvideIndex validates a Config struct.

Types

type Config

type Config struct {
	Algolia       *algolia.Config       `json:"algolia"       toml:"algolia,omitempty"`
	Elasticsearch *elasticsearch.Config `json:"elasticsearch" toml:"elasticsearch,omitempty"`
	Provider      string                `json:"provider"      toml:"provider,omitempty"`
	// contains filtered or unexported fields
}

Config contains settings regarding search indices.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

Jump to

Keyboard shortcuts

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