Documentation ¶
Index ¶
- type ClassBasedModuleConfig
- type Provider
- func (p *Provider) AggregateArguments(class *models.Class) map[string]*graphql.ArgumentConfig
- func (p *Provider) BackupBackend(backend string) (modulecapabilities.BackupBackend, error)
- func (p *Provider) CrossClassExtractSearchParams(arguments map[string]interface{}) map[string]interface{}
- func (p *Provider) CrossClassValidateSearchParam(name string, value interface{}) error
- func (p *Provider) CrossClassVectorFromSearchParam(ctx context.Context, param string, params interface{}, ...) ([]float32, error)
- func (p *Provider) ExploreArguments(schema *models.Schema) map[string]*graphql.ArgumentConfig
- func (p *Provider) ExtractAdditionalField(className, name string, params []*ast.Argument) interface{}
- func (p *Provider) ExtractSearchParams(arguments map[string]interface{}, className string) map[string]interface{}
- func (p *Provider) GetAdditionalFields(class *models.Class) map[string]*graphql.Field
- func (p *Provider) GetAll() []modulecapabilities.Module
- func (p *Provider) GetAllExclude(module string) []modulecapabilities.Module
- func (p *Provider) GetArguments(class *models.Class) map[string]*graphql.ArgumentConfig
- func (p *Provider) GetByName(name string) modulecapabilities.Module
- func (p *Provider) GetClassificationFn(className, name string, params modulecapabilities.ClassifyParams) (modulecapabilities.ClassifyItemFn, error)
- func (p *Provider) GetExploreAdditionalExtend(ctx context.Context, in []search.Result, moduleParams map[string]interface{}, ...) ([]search.Result, error)
- func (p *Provider) GetMeta() (map[string]interface{}, error)
- func (p *Provider) GetObjectAdditionalExtend(ctx context.Context, in *search.Result, moduleParams map[string]interface{}) (*search.Result, error)
- func (p *Provider) GraphQLAdditionalFieldNames() []string
- func (p *Provider) HasMultipleVectorizers() bool
- func (p *Provider) Init(ctx context.Context, params moduletools.ModuleInitParams, ...) error
- func (p *Provider) ListExploreAdditionalExtend(ctx context.Context, in []search.Result, moduleParams map[string]interface{}, ...) ([]search.Result, error)
- func (p *Provider) ListObjectsAdditionalExtend(ctx context.Context, in search.Results, moduleParams map[string]interface{}) (search.Results, error)
- func (p *Provider) ParseClassifierSettings(name string, params *models.Classification) error
- func (p *Provider) Register(mod modulecapabilities.Module)
- func (p *Provider) RestApiAdditionalProperties(includeProp string, class *models.Class) map[string]interface{}
- func (p *Provider) SetClassDefaults(class *models.Class)
- func (p *Provider) SetSchemaGetter(sg schemaGetter)
- func (p *Provider) SetSinglePropertyDefaults(class *models.Class, prop *models.Property)
- func (p *Provider) UpdateVector(ctx context.Context, object *models.Object, class *models.Class, ...) error
- func (p *Provider) UsingRef2Vec(className string) bool
- func (p *Provider) ValidateClass(ctx context.Context, class *models.Class) error
- func (p *Provider) ValidateSearchParam(name string, value interface{}, className string) error
- func (p *Provider) ValidateVectorizer(moduleName string) error
- func (p *Provider) VectorFromInput(ctx context.Context, className string, input string) ([]float32, error)
- func (p *Provider) VectorFromSearchParam(ctx context.Context, className string, param string, params interface{}, ...) ([]float32, error)
- func (p *Provider) VectorizerName(className string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassBasedModuleConfig ¶
type ClassBasedModuleConfig struct {
// contains filtered or unexported fields
}
func NewClassBasedModuleConfig ¶
func NewClassBasedModuleConfig(class *models.Class, moduleName string, ) *ClassBasedModuleConfig
func (*ClassBasedModuleConfig) Class ¶
func (cbmc *ClassBasedModuleConfig) Class() map[string]interface{}
func (*ClassBasedModuleConfig) ClassByModuleName ¶
func (cbmc *ClassBasedModuleConfig) ClassByModuleName(moduleName string) map[string]interface{}
func (*ClassBasedModuleConfig) Property ¶
func (cbmc *ClassBasedModuleConfig) Property(propName string) map[string]interface{}
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider() *Provider
func (*Provider) AggregateArguments ¶
AggregateArguments provides GraphQL Aggregate arguments
func (*Provider) BackupBackend ¶
func (p *Provider) BackupBackend(backend string) (modulecapabilities.BackupBackend, error)
func (*Provider) CrossClassExtractSearchParams ¶
func (p *Provider) CrossClassExtractSearchParams(arguments map[string]interface{}) map[string]interface{}
CrossClassExtractSearchParams extracts GraphQL arguments from modules without being specific to any one class and it's configuration. This is used in Explore() { } for example
func (*Provider) CrossClassValidateSearchParam ¶
CrossClassValidateSearchParam validates module parameters without being specific to any one class and it's configuration. This is used in Explore() { } for example
func (*Provider) CrossClassVectorFromSearchParam ¶
func (p *Provider) CrossClassVectorFromSearchParam(ctx context.Context, param string, params interface{}, findVectorFn modulecapabilities.FindVectorFn, ) ([]float32, error)
CrossClassVectorFromSearchParam gets a vector for a given argument without being specific to any one class and it's configuration. This is used in Explore() { } for example
func (*Provider) ExploreArguments ¶
ExploreArguments provides GraphQL Explore arguments
func (*Provider) ExtractAdditionalField ¶
func (p *Provider) ExtractAdditionalField(className, name string, params []*ast.Argument) interface{}
ExtractAdditionalField extracts additional properties from given graphql arguments
func (*Provider) ExtractSearchParams ¶
func (p *Provider) ExtractSearchParams(arguments map[string]interface{}, className string) map[string]interface{}
ExtractSearchParams extracts GraphQL arguments
func (*Provider) GetAdditionalFields ¶
GetAdditionalFields provides GraphQL Get additional fields
func (*Provider) GetAll ¶
func (p *Provider) GetAll() []modulecapabilities.Module
func (*Provider) GetAllExclude ¶
func (p *Provider) GetAllExclude(module string) []modulecapabilities.Module
func (*Provider) GetArguments ¶
GetArguments provides GraphQL Get arguments
func (*Provider) GetClassificationFn ¶
func (p *Provider) GetClassificationFn(className, name string, params modulecapabilities.ClassifyParams, ) (modulecapabilities.ClassifyItemFn, error)
GetClassificationFn returns given module's classification
func (*Provider) GetExploreAdditionalExtend ¶
func (p *Provider) GetExploreAdditionalExtend(ctx context.Context, in []search.Result, moduleParams map[string]interface{}, searchVector []float32, argumentModuleParams map[string]interface{}, ) ([]search.Result, error)
GetExploreAdditionalExtend extends graphql api get queries with additional properties
func (*Provider) GetObjectAdditionalExtend ¶
func (p *Provider) GetObjectAdditionalExtend(ctx context.Context, in *search.Result, moduleParams map[string]interface{}, ) (*search.Result, error)
GetObjectAdditionalExtend extends rest api get queries with additional properties
func (*Provider) GraphQLAdditionalFieldNames ¶
GraphQLAdditionalFieldNames get's all additional field names used in graphql
func (*Provider) HasMultipleVectorizers ¶
func (*Provider) Init ¶
func (p *Provider) Init(ctx context.Context, params moduletools.ModuleInitParams, logger logrus.FieldLogger, ) error
func (*Provider) ListExploreAdditionalExtend ¶
func (p *Provider) ListExploreAdditionalExtend(ctx context.Context, in []search.Result, moduleParams map[string]interface{}, argumentModuleParams map[string]interface{}, ) ([]search.Result, error)
ListExploreAdditionalExtend extends graphql api list queries with additional properties
func (*Provider) ListObjectsAdditionalExtend ¶
func (p *Provider) ListObjectsAdditionalExtend(ctx context.Context, in search.Results, moduleParams map[string]interface{}, ) (search.Results, error)
ListObjectsAdditionalExtend extends rest api list queries with additional properties
func (*Provider) ParseClassifierSettings ¶
func (p *Provider) ParseClassifierSettings(name string, params *models.Classification, ) error
ParseClassifierSettings parses and adds classifier specific settings
func (*Provider) Register ¶
func (p *Provider) Register(mod modulecapabilities.Module)
func (*Provider) RestApiAdditionalProperties ¶
func (p *Provider) RestApiAdditionalProperties(includeProp string, class *models.Class) map[string]interface{}
RestApiAdditionalProperties get's all rest specific additional properties with their default values
func (*Provider) SetClassDefaults ¶
SetClassDefaults sets the module-specific defaults for the class itself, but also for each prop
func (*Provider) SetSchemaGetter ¶
func (p *Provider) SetSchemaGetter(sg schemaGetter)
func (*Provider) SetSinglePropertyDefaults ¶
SetSinglePropertyDefaults can be used when a property is added later, e.g. as part of merging in a ref prop after a class has already been created
func (*Provider) UpdateVector ¶
func (p *Provider) UpdateVector(ctx context.Context, object *models.Object, class *models.Class, objectDiff *moduletools.ObjectDiff, findObjectFn modulecapabilities.FindObjectFn, logger logrus.FieldLogger, ) error
func (*Provider) UsingRef2Vec ¶
func (*Provider) ValidateClass ¶
func (*Provider) ValidateSearchParam ¶
ValidateSearchParam validates module parameters
func (*Provider) ValidateVectorizer ¶
func (*Provider) VectorFromInput ¶
func (*Provider) VectorFromSearchParam ¶
func (p *Provider) VectorFromSearchParam(ctx context.Context, className string, param string, params interface{}, findVectorFn modulecapabilities.FindVectorFn, ) ([]float32, error)
VectorFromSearchParam gets a vector for a given argument. This is used in Get { Class() } for example