Documentation
¶
Index ¶
Constants ¶
View Source
const (
// WeaviatePackage is the package name for the Weaviate client
WeaviatePackage = "github.com/weaviate/weaviate-go-client/v5"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateCRUDCode ¶
func GenerateCRUDCode(schema *WeaviateSchemaDefinition, outputDir string) (string, error)
GenerateCRUDCode generates CRUD implementation for all Weaviate classes returns the generated package name
func GenerateTypes ¶
Types ¶
type TemplateData ¶
type WeaviateClass ¶
type WeaviateClass struct { Package string `json:"-"` Class string `json:"class"` Description string `json:"description,omitempty"` VectorIndexType string `json:"vectorIndexType,omitempty"` VectorIndexConfig map[string]interface{} `json:"vectorIndexConfig,omitempty"` Properties []WeaviateProperty `json:"properties"` Vectorizer string `json:"vectorizer,omitempty"` ModuleConfig map[string]interface{} `json:"moduleConfig,omitempty"` ShardingConfig map[string]interface{} `json:"shardingConfig,omitempty"` ReplicationConfig map[string]interface{} `json:"replicationConfig,omitempty"` InvertedIndexConfig map[string]interface{} `json:"invertedIndexConfig,omitempty"` }
WeaviateClass represents a Weaviate class schema definition
type WeaviateProperty ¶
type WeaviateProperty struct { Name string `json:"name"` DataType []string `json:"dataType"` Description string `json:"description,omitempty"` Tokenization string `json:"tokenization,omitempty"` IndexFilterable bool `json:"indexFilterable,omitempty"` IndexSearchable bool `json:"indexSearchable,omitempty"` IndexInverted bool `json:"indexInverted,omitempty"` }
WeaviateProperty represents a property in a Weaviate class
type WeaviateSchemaDefinition ¶
type WeaviateSchemaDefinition struct {
Classes []WeaviateClass `json:"classes"`
}
WeaviateSchemaDefinition represents the entire schema
func GenerateWeaviateSchema ¶
func GenerateWeaviateSchema(srcDir string) (*WeaviateSchemaDefinition, error)
GenerateWeaviateSchema processes Go source files and generates Weaviate schema
Click to show internal directories.
Click to hide internal directories.