- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for sameTarget (0.11 sec)
-
internal/bucket/replication/replication_test.go
) func TestParseAndValidateReplicationConfig(t *testing.T) { testCases := []struct { inputConfig string expectedParsingErr error expectedValidationErr error destBucket string sameTarget bool }{ { // 1 Invalid delete marker status in replication config
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 32.5K bytes - Viewed (0) -
internal/bucket/replication/replication.go
Status: Disabled, } } } return &config, nil } // Validate - validates the replication configuration func (c Config) Validate(bucket string, sameTarget bool) error { // replication config can't have more than 1000 rules if len(c.Rules) > 1000 { return errReplicationTooManyRules } // replication config should have at least one rule if len(c.Rules) == 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 8.9K bytes - Viewed (0) -
cmd/bucket-replication-handlers.go
writeErrorResponse(ctx, w, apiErr, r.URL) return } sameTarget, apiErr := validateReplicationDestination(ctx, bucket, replicationConfig, &validateReplicationDestinationOptions{CheckRemoteBucket: true}) if apiErr != noError { writeErrorResponse(ctx, w, apiErr, r.URL) return } // Validate the received bucket replication config if err = replicationConfig.Validate(bucket, sameTarget); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 23.3K bytes - Viewed (0) -
internal/bucket/replication/rule.go
buf.WriteString("&") } buf.WriteString(t.String()) } return buf.String() } return "" } // Validate - validates the rule element func (r Rule) Validate(bucket string, sameTarget bool) error { if err := r.validateID(); err != nil { return err } if err := r.validateStatus(); err != nil { return err } if err := r.validateFilter(); err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 24 23:22:20 UTC 2022 - 8.3K bytes - Viewed (0) -
cmd/bucket-replication.go
arns = append(arns, rule.Destination.String()) } } var sameTarget bool for _, arnStr := range arns { arn, err := madmin.ParseARN(arnStr) if err != nil { return sameTarget, errorCodes.ToAPIErrWithErr(ErrBucketRemoteArnInvalid, err) } if arn.Type != madmin.ReplicationService { return sameTarget, toAPIError(ctx, BucketRemoteArnTypeInvalid{Bucket: bucket}) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 06:49:55 UTC 2024 - 116.1K bytes - Viewed (0) -
cmd/admin-bucket-handlers.go
if err = json.Unmarshal(reqBytes, &target); err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL) return } sameTarget, _ := isLocalHost(target.URL().Hostname(), target.URL().Port(), globalMinioPort) if sameTarget && bucket == target.TargetBucket { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrBucketRemoteIdenticalToSource), r.URL) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 33.2K bytes - Viewed (0) -
cmd/site-replication.go
if err != nil { return err } sameTarget, apiErr := validateReplicationDestination(ctx, bucket, newReplicationConfig, &validateReplicationDestinationOptions{CheckRemoteBucket: true}) if apiErr != noError { return fmt.Errorf("bucket replication config validation error: %#v", apiErr) } err = newReplicationConfig.Validate(bucket, sameTarget) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 185.1K bytes - Viewed (0)