v1

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: BSD-3-Clause Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const BEACON_START = "weaviate://localhost/"

Variables

This section is empty.

Functions

func NewBoolValue added in v1.23.0

func NewBoolValue(v bool) *pb.Value

NewBoolValue constructs a new boolean Value.

func NewDateValue added in v1.23.0

func NewDateValue(v string) *pb.Value

NewDateValue constructs a new string Value.

func NewGeoValue added in v1.23.0

func NewGeoValue(v *models.GeoCoordinates) *pb.Value

NewGeoValue constructs a new geo Value.

func NewIntValue added in v1.23.0

func NewIntValue(v int64) *pb.Value

NewIntValue constructs a new number Value.

func NewListValue added in v1.23.0

func NewListValue(v *pb.ListValue) *pb.Value

NewListValue constructs a new list Value.

func NewNestedValue added in v1.23.0

func NewNestedValue[P schema.PropertyInterface](v interface{}, dt schema.DataType, parent P, prop search.SelectProperty) (*pb.Value, error)

func NewNumberValue added in v1.23.0

func NewNumberValue(v float64) *pb.Value

NewNumberValue constructs a new number Value.

func NewObject added in v1.23.0

func NewObject[P schema.PropertyInterface](v map[string]interface{}, parent P, selectProp search.SelectProperty) (*pb.Properties, error)

NewStruct constructs a Struct from a general-purpose Go map. The map keys must be valid UTF-8. The map values are converted using NewValue.

func NewObjectList added in v1.23.0

func NewObjectList[P schema.PropertyInterface](v []interface{}, parent P, selectProp search.SelectProperty) (*pb.ListValue, error)

NewList constructs a ListValue from a general-purpose Go slice. The slice elements are converted using NewValue.

func NewObjectValue added in v1.23.0

func NewObjectValue(v *pb.Properties) *pb.Value

NewObjectValue constructs a new struct Value.

func NewPrimitiveList added in v1.23.0

func NewPrimitiveList[T bool | float64 | string](v []T, dt schema.DataType) (*pb.ListValue, error)

NewList constructs a ListValue from a general-purpose Go slice. The slice elements are converted using NewValue.

func NewPrimitiveValue added in v1.23.0

func NewPrimitiveValue(v interface{}, dt schema.DataType) (*pb.Value, error)

NewValue constructs a Value from a general-purpose Go interface.

╔════════════════════════╤════════════════════════════════════════════╗
║ Go type                │ Conversion                                 ║
╠════════════════════════╪════════════════════════════════════════════╣
║ bool                   │ stored as BoolValue                        ║
║ int, int32, int64      │ stored as NumberValue                      ║
║ uint, uint32, uint64   │ stored as NumberValue                      ║
║ float32, float64       │ stored as NumberValue                      ║
║ geo coordinate         │ stored as GeoCoordinate                    ║
║ string                 │ stored as StringValue; must be valid UTF-8 ║
║ []byte                 │ stored as StringValue; base64-encoded      ║
║ map[string]interface{} │ stored as StructValue                      ║
║ []interface{}          │ stored as ListValue                        ║
╚════════════════════════╧════════════════════════════════════════════╝

When converting an int64 or uint64 to a NumberValue, numeric precision loss is possible since they are stored as a float64.

func NewStringValue added in v1.23.0

func NewStringValue(v string) *pb.Value

NewStringValue constructs a new string Value.

func NewUuidValue added in v1.23.0

func NewUuidValue(v string) *pb.Value

NewUuidValue constructs a new string Value.

Types

type NestedProperty

type NestedProperty struct {
	*models.NestedProperty
}

func (*NestedProperty) GetName

func (p *NestedProperty) GetName() string

func (*NestedProperty) GetNestedProperties

func (p *NestedProperty) GetNestedProperties() []*models.NestedProperty

type Property

type Property struct {
	*models.Property
}

func (*Property) GetName

func (p *Property) GetName() string

func (*Property) GetNestedProperties

func (p *Property) GetNestedProperties() []*models.NestedProperty

type Service

type Service struct {
	pb.UnimplementedWeaviateServer
	// contains filtered or unexported fields
}

func NewService

func NewService(traverser *traverser.Traverser, authComposer composer.TokenFunc,
	allowAnonymousAccess bool, schemaManager *schemaManager.Manager,
	batchManager *objects.BatchManager,
) *Service

func (*Service) BatchObjects

func (s *Service) BatchObjects(ctx context.Context, req *pb.BatchObjectsRequest) (*pb.BatchObjectsReply, error)

func (*Service) Search

func (s *Service) Search(ctx context.Context, req *pb.SearchRequest) (*pb.SearchReply, error)

func (*Service) Watch

Jump to

Keyboard shortcuts

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