Documentation ¶
Index ¶
- Constants
- func ParseUUIDArray(in any) ([]uuid.UUID, error)
- type Validator
- func (v *Validator) Object(ctx context.Context, class *models.Class, incoming *models.Object, ...) error
- func (v *Validator) ValidateExistence(ctx context.Context, ref *crossref.Ref, errorVal string, tenant string) error
- func (v *Validator) ValidateMultipleRef(ctx context.Context, refs models.MultipleRef, errorVal string, tenant string) ([]*crossref.Ref, error)
- func (v *Validator) ValidateSingleRef(cref *models.SingleRef) (*crossref.Ref, error)
Constants ¶
View Source
const ( // ErrorMissingActionObjects message ErrorMissingActionObjects string = "no objects, object and subject, are added. Add 'objects' by using the 'objects' key in the root of the JSON" // ErrorMissingActionObjectsObject message ErrorMissingActionObjectsObject string = "no object-thing is added. Add the 'object' inside the 'objects' part of the JSON" // ErrorMissingActionObjectsSubject message ErrorMissingActionObjectsSubject string = "no subject-thing is added. Add the 'subject' inside the 'objects' part of the JSON" // ErrorMissingActionObjectsObjectLocation message ErrorMissingActionObjectsObjectLocation string = "no 'locationURL' is found in the object-thing. Add the 'locationURL' inside the 'object-thing' part of the JSON" // ErrorMissingActionObjectsObjectType message ErrorMissingActionObjectsObjectType string = "no 'type' is found in the object-thing. Add the 'type' inside the 'object-thing' part of the JSON" // ErrorInvalidActionObjectsObjectType message ErrorInvalidActionObjectsObjectType string = "object-thing requires one of the following values in 'type': '%s', '%s' or '%s'" // ErrorMissingActionObjectsSubjectLocation message ErrorMissingActionObjectsSubjectLocation string = "no 'locationURL' is found in the subject-thing. Add the 'locationURL' inside the 'subject-thing' part of the JSON" // ErrorMissingActionObjectsSubjectType message ErrorMissingActionObjectsSubjectType string = "no 'type' is found in the subject-thing. Add the 'type' inside the 'subject-thing' part of the JSON" // ErrorInvalidActionObjectsSubjectType message ErrorInvalidActionObjectsSubjectType string = "subject-thing requires one of the following values in 'type': '%s', '%s' or '%s'" // ErrorMisingObject message ErrorMissingObject = "the given object is empty" // 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 = "%s: no object with id %s found" // ErrorInvalidProperties message ErrorInvalidProperties string = "properties of object %v must be of type map[string]interface" )
View Source
const ( // ErrorInvalidSingleRef message ErrorInvalidSingleRef string = "" /* 189-byte string literal not displayed */ // ErrorMissingSingleRefCRef message ErrorMissingSingleRefCRef string = "" /* 190-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 = "" /* 145-byte string literal not displayed */ // ErrorMissingSingleRefType message ErrorMissingSingleRefType string = "" /* 138-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func New ¶
func New(exists exists, config *config.WeaviateConfig, repl *additional.ReplicationProperties, ) *Validator
func (*Validator) ValidateExistence ¶ added in v1.21.4
func (*Validator) ValidateMultipleRef ¶
Click to show internal directories.
Click to hide internal directories.