settings

package
v1.25.28 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultPropertyIndexed       = true
	DefaultVectorizeClassName    = true
	DefaultVectorizePropertyName = false
)

Variables

This section is empty.

Functions

func ValidateSetting added in v1.25.0

func ValidateSetting[T string | int64](value T, availableValues []T) bool

Types

type BaseClassSettings

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

func NewBaseClassSettings

func NewBaseClassSettings(cfg moduletools.ClassConfig) *BaseClassSettings

func NewBaseClassSettingsWithAltNames added in v1.25.21

func NewBaseClassSettingsWithAltNames(cfg moduletools.ClassConfig,
	moduleName string, altNames []string, customModelParameterName []string,
) *BaseClassSettings

func NewBaseClassSettingsWithCustomModel added in v1.25.25

func NewBaseClassSettingsWithCustomModel(cfg moduletools.ClassConfig, customModelParameterName string) *BaseClassSettings

func (BaseClassSettings) GetNumber added in v1.24.5

func (s BaseClassSettings) GetNumber(in interface{}) (float32, error)

func (BaseClassSettings) GetPropertyAsBool added in v1.24.5

func (s BaseClassSettings) GetPropertyAsBool(name string, defaultValue bool) bool

func (BaseClassSettings) GetPropertyAsInt64 added in v1.24.5

func (s BaseClassSettings) GetPropertyAsInt64(name string, defaultValue *int64) *int64

func (BaseClassSettings) GetPropertyAsString added in v1.24.5

func (s BaseClassSettings) GetPropertyAsString(name, defaultValue string) string

func (BaseClassSettings) GetSettings added in v1.25.21

func (s BaseClassSettings) GetSettings() map[string]interface{}

func (BaseClassSettings) Model added in v1.25.25

func (s BaseClassSettings) Model() string

func (BaseClassSettings) Properties

func (s BaseClassSettings) Properties() []string

func (BaseClassSettings) PropertyIndexed

func (s BaseClassSettings) PropertyIndexed(propName string) bool

func (BaseClassSettings) Validate

func (s BaseClassSettings) Validate(class *models.Class) error

func (BaseClassSettings) ValidateClassSettings added in v1.25.0

func (s BaseClassSettings) ValidateClassSettings() error

func (BaseClassSettings) ValidateIndexState added in v1.25.0

func (s BaseClassSettings) ValidateIndexState(class *models.Class) error

func (BaseClassSettings) VectorizeClassName

func (s BaseClassSettings) VectorizeClassName() bool

func (BaseClassSettings) VectorizePropertyName

func (s BaseClassSettings) VectorizePropertyName(propName string) bool

type PropertyValuesHelper added in v1.24.5

type PropertyValuesHelper interface {
	GetPropertyAsInt(cfg moduletools.ClassConfig, name string, defaultValue *int) *int
	GetPropertyAsIntWithNotExists(cfg moduletools.ClassConfig, name string, defaultValue, notExistsValue *int) *int
	GetPropertyAsInt64(cfg moduletools.ClassConfig, name string, defaultValue *int64) *int64
	GetPropertyAsInt64WithNotExists(cfg moduletools.ClassConfig, name string, defaultValue, notExistsValue *int64) *int64
	GetPropertyAsFloat64(cfg moduletools.ClassConfig, name string, defaultValue *float64) *float64
	GetPropertyAsFloat64WithNotExists(cfg moduletools.ClassConfig, name string, defaultValue, notExistsValue *float64) *float64
	GetPropertyAsString(cfg moduletools.ClassConfig, name, defaultValue string) string
	GetPropertyAsStringWithNotExists(cfg moduletools.ClassConfig, name, defaultValue, notExistsValue string) string
	GetPropertyAsBool(cfg moduletools.ClassConfig, name string, defaultValue bool) bool
	GetPropertyAsBoolWithNotExists(cfg moduletools.ClassConfig, name string, defaultValue, notExistsValue bool) bool
	GetNumber(in interface{}) (float32, error)
}

func NewPropertyValuesHelper added in v1.24.5

func NewPropertyValuesHelper(moduleName string) PropertyValuesHelper

func NewPropertyValuesHelperWithAltNames added in v1.25.21

func NewPropertyValuesHelperWithAltNames(moduleName string, altNames []string) PropertyValuesHelper

Jump to

Keyboard shortcuts

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