github.com/weaviate/weaviate@v1.24.6/usecases/objects/validation/fakes_for_test.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  package validation
    13  
    14  import (
    15  	"context"
    16  
    17  	"github.com/go-openapi/strfmt"
    18  	"github.com/weaviate/weaviate/entities/additional"
    19  	"github.com/weaviate/weaviate/entities/models"
    20  	"github.com/weaviate/weaviate/entities/schema"
    21  )
    22  
    23  func testSchema() schema.Schema {
    24  	return schema.Schema{
    25  		Objects: &models.Schema{
    26  			Classes: []*models.Class{
    27  				{
    28  					Class: "Person",
    29  					Properties: []*models.Property{
    30  						{
    31  							Name:         "name",
    32  							DataType:     schema.DataTypeText.PropString(),
    33  							Tokenization: models.PropertyTokenizationWhitespace,
    34  						},
    35  						{
    36  							Name:     "phone",
    37  							DataType: []string{"phoneNumber"},
    38  						},
    39  					},
    40  				},
    41  			},
    42  		},
    43  	}
    44  }
    45  
    46  func fakeExists(context.Context, string, strfmt.UUID, *additional.ReplicationProperties, string) (bool, error) {
    47  	return true, nil
    48  }