example_example

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AnEnumType_name = map[int32]string{
		0: "AN_ENUM_UNSPECIFIED",
		1: "AN_ENUM_ALPHA",
		2: "AN_ENUM_BRAVO",
	}
	AnEnumType_value = map[string]int32{
		"AN_ENUM_UNSPECIFIED": 0,
		"AN_ENUM_ALPHA":       1,
		"AN_ENUM_BRAVO":       2,
	}
)

Enum value maps for AnEnumType.

View Source
var File_example_proto protoreflect.FileDescriptor

Functions

func BatchCreateThing added in v0.1.21

func BatchCreateThing(ctx context.Context, client *weaviate.Client, records []*Thing) ([]models.ObjectsGetResponse, error)

func BatchCreateThing2 added in v0.1.21

func BatchCreateThing2(ctx context.Context, client *weaviate.Client, records []*Thing2) ([]models.ObjectsGetResponse, error)

func BatchDeleteThing added in v0.1.21

func BatchDeleteThing(ctx context.Context, client *weaviate.Client, records []*Thing) (*models.BatchDeleteResponse, error)

func BatchDeleteThing2 added in v0.1.21

func BatchDeleteThing2(ctx context.Context, client *weaviate.Client, records []*Thing2) (*models.BatchDeleteResponse, error)

func BatchIndexThing added in v0.1.21

func BatchIndexThing(ctx context.Context, client *weaviate.Client, records []*Thing) ([]models.ObjectsGetResponse, *models.BatchDeleteResponse, error)

func BatchIndexThing2 added in v0.1.21

func BatchIndexThing2(ctx context.Context, client *weaviate.Client, records []*Thing2) ([]models.ObjectsGetResponse, *models.BatchDeleteResponse, error)

func EnsureClasses added in v0.1.12

func EnsureClasses(client *weaviate.Client, continueOnError bool) (err error)

Types

type AnEnumType added in v0.1.7

type AnEnumType int32
const (
	AnEnumType_AN_ENUM_UNSPECIFIED AnEnumType = 0
	AnEnumType_AN_ENUM_ALPHA       AnEnumType = 1
	AnEnumType_AN_ENUM_BRAVO       AnEnumType = 2
)

func (AnEnumType) Descriptor added in v0.1.7

func (AnEnumType) Descriptor() protoreflect.EnumDescriptor

func (AnEnumType) Enum added in v0.1.7

func (x AnEnumType) Enum() *AnEnumType

func (AnEnumType) EnumDescriptor deprecated added in v0.1.7

func (AnEnumType) EnumDescriptor() ([]byte, []int)

Deprecated: Use AnEnumType.Descriptor instead.

func (AnEnumType) Number added in v0.1.7

func (x AnEnumType) Number() protoreflect.EnumNumber

func (AnEnumType) String added in v0.1.7

func (x AnEnumType) String() string

func (AnEnumType) Type added in v0.1.7

type Thing

type Thing struct {

	// @gotags: fake:"{uuid}"
	Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty" fake:"{uuid}"`
	// @gotags: fake:"{price:0.00,1000.00}"
	ADouble float64 `protobuf:"fixed64,2,opt,name=a_double,json=aDouble,proto3" json:"a_double,omitempty" fake:"{price:0.00,1000.00}"`
	// @gotags: fake:"{price:0.00,1000.00}"
	AFloat float32 `protobuf:"fixed32,3,opt,name=a_float,json=aFloat,proto3" json:"a_float,omitempty" fake:"{price:0.00,1000.00}"`
	// @gotags: fake:"{int32}"
	AnInt32 int32 `protobuf:"varint,4,opt,name=an_int32,json=anInt32,proto3" json:"an_int32,omitempty" fake:"{int32}"`
	// @gotags: fake:"{int64}"
	AnInt64 int64 `protobuf:"varint,5,opt,name=an_int64,json=anInt64,proto3" json:"an_int64,omitempty" fake:"{int64}"`
	// @gotags: fake:"{bool}"
	ABool bool `protobuf:"varint,14,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty" fake:"{bool}"`
	// @gotags: fake:"{hackerphrase}"
	AString string `protobuf:"bytes,15,opt,name=a_string,json=aString,proto3" json:"a_string,omitempty" fake:"{hackerphrase}"`
	// @gotags: fake:"skip"
	ABytes []byte `protobuf:"bytes,16,opt,name=a_bytes,json=aBytes,proto3" json:"a_bytes,omitempty" fake:"skip"`
	// @gotags: fake:"{hackerphrase}"
	RepeatedScalarField []string `` /* 143-byte string literal not displayed */
	// @gotags: fake:"skip"
	OptionalScalarField *string `` /* 139-byte string literal not displayed */
	// @gotags: fake:"skip"
	AssociatedThing *Thing2 `protobuf:"bytes,19,opt,name=associated_thing,json=associatedThing,proto3" json:"associated_thing,omitempty" fake:"skip"`
	// @gotags: fake:"skip"
	OptionalAssociatedThing *Thing2 `` /* 151-byte string literal not displayed */
	// @gotags: fake:"skip"
	RepeatedMessages []*Thing2 `protobuf:"bytes,21,rep,name=repeated_messages,json=repeatedMessages,proto3" json:"repeated_messages,omitempty" fake:"skip"`
	// @gotags: fake:"skip"
	ATimestamp *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=a_timestamp,json=aTimestamp,proto3" json:"a_timestamp,omitempty" fake:"skip"`
	// @gotags: fake:"skip"
	AnIgnoredField string `protobuf:"bytes,23,opt,name=an_ignored_field,json=anIgnoredField,proto3" json:"an_ignored_field,omitempty" fake:"skip"`
	// @gotags: fake:"skip"
	AStructField *structpb.Struct `protobuf:"bytes,24,opt,name=a_struct_field,json=aStructField,proto3" json:"a_struct_field,omitempty" fake:"skip"`
	// @gotags: fake:"{number:1,2}"
	AnEnum AnEnumType `protobuf:"varint,25,opt,name=an_enum,json=anEnum,proto3,enum=test.AnEnumType" json:"an_enum,omitempty" fake:"{number:1,2}"`
	// @gotags: fake:"{number: 100,1000}"
	AnOptionalInt *int32 `` /* 136-byte string literal not displayed */
	// @gotags: fake:"skip"
	OptionalTimestamp *timestamppb.Timestamp `` /* 131-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Thing) Descriptor deprecated

func (*Thing) Descriptor() ([]byte, []int)

Deprecated: Use Thing.ProtoReflect.Descriptor instead.

func (*Thing) GetABool

func (x *Thing) GetABool() bool

func (*Thing) GetABytes

func (x *Thing) GetABytes() []byte

func (*Thing) GetADouble

func (x *Thing) GetADouble() float64

func (*Thing) GetAFloat

func (x *Thing) GetAFloat() float32

func (*Thing) GetAString

func (x *Thing) GetAString() string

func (*Thing) GetAStructField added in v0.1.5

func (x *Thing) GetAStructField() *structpb.Struct

func (*Thing) GetATimestamp

func (x *Thing) GetATimestamp() *timestamppb.Timestamp

func (*Thing) GetAnEnum added in v0.1.6

func (x *Thing) GetAnEnum() AnEnumType

func (*Thing) GetAnIgnoredField

func (x *Thing) GetAnIgnoredField() string

func (*Thing) GetAnInt32

func (x *Thing) GetAnInt32() int32

func (*Thing) GetAnInt64

func (x *Thing) GetAnInt64() int64

func (*Thing) GetAnOptionalInt added in v0.1.9

func (x *Thing) GetAnOptionalInt() int32

func (*Thing) GetAssociatedThing

func (x *Thing) GetAssociatedThing() *Thing2

func (*Thing) GetId

func (x *Thing) GetId() string

func (*Thing) GetOptionalAssociatedThing

func (x *Thing) GetOptionalAssociatedThing() *Thing2

func (*Thing) GetOptionalScalarField

func (x *Thing) GetOptionalScalarField() string

func (*Thing) GetOptionalTimestamp added in v0.1.10

func (x *Thing) GetOptionalTimestamp() *timestamppb.Timestamp

func (*Thing) GetRepeatedMessages

func (x *Thing) GetRepeatedMessages() []*Thing2

func (*Thing) GetRepeatedScalarField

func (x *Thing) GetRepeatedScalarField() []string

func (*Thing) MarshalJSON

func (msg *Thing) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Thing) ProtoMessage

func (*Thing) ProtoMessage()

func (*Thing) ProtoReflect

func (x *Thing) ProtoReflect() protoreflect.Message

func (*Thing) Reset

func (x *Thing) Reset()

func (*Thing) String

func (x *Thing) String() string

func (*Thing) ToWeaviateModel

func (s *Thing) ToWeaviateModel() (model *ThingWeaviateModel, err error)

func (*Thing) UnmarshalJSON

func (msg *Thing) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Thing2

type Thing2 struct {

	// @gotags: fake:"{uuid}"
	Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty" fake:"{uuid}"`
	// @gotags: fake:"{name}"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" fake:"{name}"`
	// contains filtered or unexported fields
}

func (*Thing2) Descriptor deprecated

func (*Thing2) Descriptor() ([]byte, []int)

Deprecated: Use Thing2.ProtoReflect.Descriptor instead.

func (*Thing2) GetId

func (x *Thing2) GetId() string

func (*Thing2) GetName

func (x *Thing2) GetName() string

func (*Thing2) MarshalJSON

func (msg *Thing2) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Thing2) ProtoMessage

func (*Thing2) ProtoMessage()

func (*Thing2) ProtoReflect

func (x *Thing2) ProtoReflect() protoreflect.Message

func (*Thing2) Reset

func (x *Thing2) Reset()

func (*Thing2) String

func (x *Thing2) String() string

func (*Thing2) ToWeaviateModel

func (s *Thing2) ToWeaviateModel() (model *Thing2WeaviateModel, err error)

func (*Thing2) UnmarshalJSON

func (msg *Thing2) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Thing2WeaviateModel

type Thing2WeaviateModel struct {

	// @gotags: fake:"{uuid}"
	Id *string `json:"id" fake:"{uuid}"`

	// @gotags: fake:"{name}"
	Name string `json:"name" fake:"{name}"`
}

func (*Thing2WeaviateModel) AllWeaviateClassSchemaProperties added in v0.1.12

func (s *Thing2WeaviateModel) AllWeaviateClassSchemaProperties() []*models.Property

func (*Thing2WeaviateModel) Create

func (s *Thing2WeaviateModel) Create(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*Thing2WeaviateModel) CreateEmptyReference added in v0.1.20

func (s *Thing2WeaviateModel) CreateEmptyReference(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*Thing2WeaviateModel) CreateEmptyReferenceIgnoreExistError added in v0.1.20

func (s *Thing2WeaviateModel) CreateEmptyReferenceIgnoreExistError(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*Thing2WeaviateModel) CrossReferenceWeaviateClassSchema added in v0.1.12

func (s *Thing2WeaviateModel) CrossReferenceWeaviateClassSchema() models.Class

func (*Thing2WeaviateModel) Data

func (s *Thing2WeaviateModel) Data() (map[string]interface{}, error)

func (*Thing2WeaviateModel) Delete

func (s *Thing2WeaviateModel) Delete(ctx context.Context, client *weaviate.Client, consistencyLevel string) error

func (*Thing2WeaviateModel) EnsureClassWithCrossReferences added in v0.1.12

func (s *Thing2WeaviateModel) EnsureClassWithCrossReferences(client *weaviate.Client, continueOnError bool) error

func (*Thing2WeaviateModel) EnsureClassWithoutCrossReferences added in v0.1.12

func (s *Thing2WeaviateModel) EnsureClassWithoutCrossReferences(client *weaviate.Client, continueOnError bool) error

func (*Thing2WeaviateModel) EnsureFullClass added in v0.1.12

func (s *Thing2WeaviateModel) EnsureFullClass(client *weaviate.Client, continueOnError bool) (err error)

func (*Thing2WeaviateModel) FullWeaviateClassSchema added in v0.1.12

func (s *Thing2WeaviateModel) FullWeaviateClassSchema() models.Class

func (*Thing2WeaviateModel) NonCrossReferenceWeaviateClassSchema added in v0.1.12

func (s *Thing2WeaviateModel) NonCrossReferenceWeaviateClassSchema() models.Class

func (*Thing2WeaviateModel) SummaryData added in v0.1.17

func (s *Thing2WeaviateModel) SummaryData() (string, error)

func (*Thing2WeaviateModel) ToProto

func (s *Thing2WeaviateModel) ToProto() (theProto *Thing2, err error)

func (*Thing2WeaviateModel) Update

func (s *Thing2WeaviateModel) Update(ctx context.Context, client *weaviate.Client, consistencyLevel string) (err error)

func (*Thing2WeaviateModel) Upsert added in v0.1.11

func (s *Thing2WeaviateModel) Upsert(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*Thing2WeaviateModel) WeaviateClassName

func (s *Thing2WeaviateModel) WeaviateClassName() string

func (*Thing2WeaviateModel) WeaviateClassSchemaCrossReferenceProperties added in v0.1.12

func (s *Thing2WeaviateModel) WeaviateClassSchemaCrossReferenceProperties() []*models.Property

func (*Thing2WeaviateModel) WeaviateClassSchemaNonCrossReferenceProperties added in v0.1.12

func (s *Thing2WeaviateModel) WeaviateClassSchemaNonCrossReferenceProperties() []*models.Property

type ThingWeaviateModel

type ThingWeaviateModel struct {

	// @gotags: fake:"{uuid}"
	Id *string `json:"id" fake:"{uuid}"`

	// @gotags: fake:"{price:0.00,1000.00}"
	ADouble float64 `json:"aDouble" fake:"{price:0.00,1000.00}"`

	// @gotags: fake:"{price:0.00,1000.00}"
	AFloat float32 `json:"aFloat" fake:"{price:0.00,1000.00}"`

	// @gotags: fake:"{int32}"
	AnInt32 int32 `json:"anInt32" fake:"{int32}"`

	// @gotags: fake:"{int64}"
	AnInt64 int64 `json:"anInt64,string" fake:"{int64}"`

	// @gotags: fake:"{bool}"
	ABool bool `json:"aBool" fake:"{bool}"`

	// @gotags: fake:"{hackerphrase}"
	AString string `json:"aString" fake:"{hackerphrase}"`

	// @gotags: fake:"skip"
	ABytes []byte `json:"aBytes" fake:"skip"`

	// @gotags: fake:"{hackerphrase}"
	RepeatedScalarField []string `json:"repeatedScalarField" fake:"{hackerphrase}"`

	// @gotags: fake:"skip"
	OptionalScalarField *string `json:"optionalScalarField" fake:"skip"`

	// @gotags: fake:"skip"
	AssociatedThing *Thing2WeaviateModel `json:"associatedThing" fake:"skip"`

	// @gotags: fake:"skip"
	OptionalAssociatedThing *Thing2WeaviateModel `json:"optionalAssociatedThing" fake:"skip"`

	// @gotags: fake:"skip"
	RepeatedMessages []*Thing2WeaviateModel `json:"repeatedMessages" fake:"skip"`

	// @gotags: fake:"skip"
	ATimestamp time.Time `json:"aTimestamp" fake:"skip"`

	// @gotags: fake:"skip"
	AStructField string `json:"aStructField" fake:"skip"`

	// @gotags: fake:"{number:1,2}"
	AnEnum AnEnumType `json:"anEnum" fake:"{number:1,2}"`

	// @gotags: fake:"{number: 100,1000}"
	AnOptionalInt *int32 `json:"anOptionalInt" fake:"{number: 100,1000}"`

	// @gotags: fake:"skip"
	OptionalTimestamp *time.Time `json:"optionalTimestamp" fake:"skip"`
}

func (*ThingWeaviateModel) AllWeaviateClassSchemaProperties added in v0.1.12

func (s *ThingWeaviateModel) AllWeaviateClassSchemaProperties() []*models.Property

func (*ThingWeaviateModel) Create

func (s *ThingWeaviateModel) Create(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*ThingWeaviateModel) CreateEmptyReference added in v0.1.20

func (s *ThingWeaviateModel) CreateEmptyReference(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*ThingWeaviateModel) CreateEmptyReferenceIgnoreExistError added in v0.1.20

func (s *ThingWeaviateModel) CreateEmptyReferenceIgnoreExistError(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*ThingWeaviateModel) CrossReferenceWeaviateClassSchema added in v0.1.12

func (s *ThingWeaviateModel) CrossReferenceWeaviateClassSchema() models.Class

func (*ThingWeaviateModel) Data

func (s *ThingWeaviateModel) Data() (map[string]interface{}, error)

func (*ThingWeaviateModel) Delete

func (s *ThingWeaviateModel) Delete(ctx context.Context, client *weaviate.Client, consistencyLevel string) error

func (*ThingWeaviateModel) EnsureClassWithCrossReferences added in v0.1.12

func (s *ThingWeaviateModel) EnsureClassWithCrossReferences(client *weaviate.Client, continueOnError bool) error

func (*ThingWeaviateModel) EnsureClassWithoutCrossReferences added in v0.1.12

func (s *ThingWeaviateModel) EnsureClassWithoutCrossReferences(client *weaviate.Client, continueOnError bool) error

func (*ThingWeaviateModel) EnsureFullClass added in v0.1.12

func (s *ThingWeaviateModel) EnsureFullClass(client *weaviate.Client, continueOnError bool) (err error)

func (*ThingWeaviateModel) FullWeaviateClassSchema added in v0.1.12

func (s *ThingWeaviateModel) FullWeaviateClassSchema() models.Class

func (*ThingWeaviateModel) NonCrossReferenceWeaviateClassSchema added in v0.1.12

func (s *ThingWeaviateModel) NonCrossReferenceWeaviateClassSchema() models.Class

func (*ThingWeaviateModel) SummaryData added in v0.1.17

func (s *ThingWeaviateModel) SummaryData() (string, error)

func (*ThingWeaviateModel) ToProto

func (s *ThingWeaviateModel) ToProto() (theProto *Thing, err error)

func (*ThingWeaviateModel) Update

func (s *ThingWeaviateModel) Update(ctx context.Context, client *weaviate.Client, consistencyLevel string) (err error)

func (*ThingWeaviateModel) Upsert added in v0.1.11

func (s *ThingWeaviateModel) Upsert(ctx context.Context, client *weaviate.Client, consistencyLevel string) (data *data.ObjectWrapper, err error)

func (*ThingWeaviateModel) WeaviateClassName

func (s *ThingWeaviateModel) WeaviateClassName() string

func (*ThingWeaviateModel) WeaviateClassSchemaCrossReferenceProperties added in v0.1.12

func (s *ThingWeaviateModel) WeaviateClassSchemaCrossReferenceProperties() []*models.Property

func (*ThingWeaviateModel) WeaviateClassSchemaNonCrossReferenceProperties added in v0.1.12

func (s *ThingWeaviateModel) WeaviateClassSchemaNonCrossReferenceProperties() []*models.Property

Jump to

Keyboard shortcuts

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