option

package
v2.19.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bound

type Bound struct {
	Lower, Upper int64
}

Bound represents a lower and upper bound range for an index. todo: if we would like to provide an upper bound then we would need to deal with ranges, in which case this is why the upper bound attribute is here.

type IndexBy

type IndexBy interface {
	String() string
}

IndexBy defines how the data is being indexed

type IndexByField

type IndexByField string

IndexByField represents the field that's being used to index the data by

func (IndexByField) String

func (ibf IndexByField) String() string

String returns a string representation

type IndexByFunc

type IndexByFunc struct {
	Name string
	Func func(v interface{}) (string, error)
}

IndexByFunc represents a function that's being used to index the data by

func (IndexByFunc) String

func (ibf IndexByFunc) String() string

String returns a string representation

type Option

type Option func(o *Options)

Option defines a single option function.

func CaseInsensitive

func CaseInsensitive(val bool) Option

CaseInsensitive sets the CaseInsensitive field.

func WithBounds

func WithBounds(val *Bound) Option

WithBounds sets the Bounds field.

func WithFilesDir

func WithFilesDir(val string) Option

WithFilesDir sets the option FilesDir.

func WithIndexBy

func WithIndexBy(val IndexBy) Option

WithIndexBy sets the option IndexBy.

func WithTypeName

func WithTypeName(val string) Option

WithTypeName sets the TypeName option.

type Options

type Options struct {
	CaseInsensitive bool
	Bound           *Bound

	TypeName string
	IndexBy  IndexBy
	FilesDir string
	Prefix   string

	Storage metadata.Storage
}

Options defines the available options for this package.

Jump to

Keyboard shortcuts

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