Documentation ¶
Index ¶
- Constants
- func ValidateActionBody(ctx context.Context, action *models.ActionCreate, ...) error
- func ValidateMultipleRef(ctx context.Context, serverConfig *config.WeaviateConfig, ...) error
- func ValidateSchemaInBody(ctx context.Context, weaviateSchema *models.SemanticSchema, object interface{}, ...) error
- func ValidateSingleRef(ctx context.Context, serverConfig *config.WeaviateConfig, ...) error
- func ValidateThingBody(ctx context.Context, thing *models.ThingCreate, ...) error
Constants ¶
View Source
const ( // ErrorMissingActionThings message ErrorMissingActionThings string = "no things, object and subject, are added. Add 'things' by using the 'things' key in the root of the JSON" // ErrorMissingActionThingsObject message ErrorMissingActionThingsObject string = "no object-thing is added. Add the 'object' inside the 'things' part of the JSON" // ErrorMissingActionThingsSubject message ErrorMissingActionThingsSubject string = "no subject-thing is added. Add the 'subject' inside the 'things' part of the JSON" // ErrorMissingActionThingsObjectLocation message ErrorMissingActionThingsObjectLocation string = "no 'locationURL' is found in the object-thing. Add the 'locationURL' inside the 'object-thing' part of the JSON" // ErrorMissingActionThingsObjectType message ErrorMissingActionThingsObjectType string = "no 'type' is found in the object-thing. Add the 'type' inside the 'object-thing' part of the JSON" // ErrorInvalidActionThingsObjectType message ErrorInvalidActionThingsObjectType string = "object-thing requires one of the following values in 'type': '%s', '%s' or '%s'" // ErrorMissingActionThingsSubjectLocation message ErrorMissingActionThingsSubjectLocation string = "no 'locationURL' is found in the subject-thing. Add the 'locationURL' inside the 'subject-thing' part of the JSON" // ErrorMissingActionThingsSubjectType message ErrorMissingActionThingsSubjectType string = "no 'type' is found in the subject-thing. Add the 'type' inside the 'subject-thing' part of the JSON" // ErrorInvalidActionThingsSubjectType message ErrorInvalidActionThingsSubjectType string = "subject-thing requires one of the following values in 'type': '%s', '%s' or '%s'" // ErrorMissingClass message ErrorMissingClass string = "the given class is empty" // ErrorMissingContext message ErrorMissingContext string = "the given context is empty" // ErrorNoExternalCredentials message ErrorNoExternalCredentials string = "no credentials available for the Weaviate instance for %s given in the %s" // ErrorExternalNotFound message ErrorExternalNotFound string = "given statuscode of '%s' is '%d', but 200 was expected for LocationURL given in the %s" // ErrorInvalidCRefType message ErrorInvalidCRefType string = "'cref' type '%s' does not exists" // ErrorNotFoundInDatabase message ErrorNotFoundInDatabase string = "error finding the '%s' in the database: '%s' at %s" )
View Source
const ( // ErrorInvalidSingleRef message ErrorInvalidSingleRef string = "class '%s' with property '%s' requires exactly 1 arguments: '$cref'. Check your input schema, got: %#v" // ErrorMissingSingleRefCRef message ErrorMissingSingleRefCRef string = "" /* 138-byte string literal not displayed */ // ErrorCrefInvalidURI message ErrorCrefInvalidURI string = "class '%s' with property '%s' is not a valid URI: %s" // ErrorCrefInvalidURIPath message ErrorCrefInvalidURIPath string = "class '%s' with property '%s' does not contain a valid path, must have 2 segments: /<kind>/<id>" // ErrorMissingSingleRefLocationURL message ErrorMissingSingleRefLocationURL string = "" /* 144-byte string literal not displayed */ // ErrorMissingSingleRefType message ErrorMissingSingleRefType string = "" /* 137-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func ValidateActionBody ¶
func ValidateActionBody(ctx context.Context, action *models.ActionCreate, databaseSchema schema.WeaviateSchema, dbConnector dbconnector.DatabaseConnector, network network.Network, serverConfig *config.WeaviateConfig, ) error
ValidateActionBody Validates a action body using the 'ActionCreate' object.
func ValidateMultipleRef ¶
func ValidateMultipleRef(ctx context.Context, serverConfig *config.WeaviateConfig, refs *models.MultipleRef, dbConnector dbconnector.DatabaseConnector, network network.Network, errorVal string) error
func ValidateSchemaInBody ¶
func ValidateSchemaInBody(ctx context.Context, weaviateSchema *models.SemanticSchema, object interface{}, refType connutils.RefType, dbConnector dbconnector.DatabaseConnector, network network.Network, serverConfig *config.WeaviateConfig) error
ValidateSchemaInBody Validate the schema in the given body
func ValidateSingleRef ¶
func ValidateSingleRef(ctx context.Context, serverConfig *config.WeaviateConfig, cref *models.SingleRef, dbConnector dbconnector.DatabaseConnector, network network.Network, errorVal string) error
ValidateSingleRef validates a single ref based on location URL and existence of the object in the database
func ValidateThingBody ¶
func ValidateThingBody(ctx context.Context, thing *models.ThingCreate, databaseSchema schema.WeaviateSchema, dbConnector dbconnector.DatabaseConnector, network network.Network, serverConfig *config.WeaviateConfig) error
ValidateThingBody Validates a thing body using the 'ThingCreate' object.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.