MCPcopy
hub / github.com/weaviate/weaviate / Backups

Function Backups

usecases/auth/authorization/types.go:548–564  ·  view source on GitHub ↗

Backups generates a resource string for the given classes. If the backend is an empty string, it defaults to "*". Parameters: - class: the class name (string) Returns: - A string representing the resource path for the given classes. Example outputs: - "backups/*" if the backend is an empty string -

(classes ...string)

Source from the content-addressed store, hash-verified

546// - "backups/*" if the backend is an empty string
547// - "backups/{backend}" for the provided backend
548func Backups(classes ...string) []string {
549 classes = schema.UppercaseClassesNames(classes...)
550 if len(classes) == 0 || (len(classes) == 1 && (classes[0] == "" || classes[0] == "*")) {
551 return []string{fmt.Sprintf("%s/collections/*", BackupsDomain)}
552 }
553
554 resources := make([]string, len(classes))
555 for idx := range classes {
556 if classes[idx] == "" {
557 resources[idx] = fmt.Sprintf("%s/collections/*", BackupsDomain)
558 } else {
559 resources[idx] = fmt.Sprintf("%s/collections/%s", BackupsDomain, classes[idx])
560 }
561 }
562
563 return resources
564}
565
566// Replications generates a replication resource string for a given class and shard.
567//

Callers 15

BackupMethod · 0.92
RestoreMethod · 0.92
authorizeBackupByIDMethod · 0.92
CancelMethod · 0.92
CancelRestoreMethod · 0.92
ListMethod · 0.92
Test_AuthorizationFunction · 0.92
TestCancellingBackupFunction · 0.92
TestCancellingRestoreFunction · 0.92
ExportMethod · 0.92

Calls 1

UppercaseClassesNamesFunction · 0.92

Tested by 5

Test_AuthorizationFunction · 0.74
TestCancellingBackupFunction · 0.74
TestCancellingRestoreFunction · 0.74
TestBackupsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…