Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 193 for validate (0.18 sec)

  1. cmd/batch-replicate.go

    }
    
    // BatchJobReplicateResourceType defines the type of batch jobs
    type BatchJobReplicateResourceType string
    
    // Validate validates if the replicate resource type is recognized and supported
    func (t BatchJobReplicateResourceType) Validate() error {
    	switch t {
    	case BatchJobReplicateResourceMinIO:
    	case BatchJobReplicateResourceS3:
    	default:
    		return errInvalidArgument
    	}
    	return nil
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Nov 22 18:51:46 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  2. internal/bucket/replication/and.go

    // isEmpty returns true if Tags field is null
    func (a And) isEmpty() bool {
    	return len(a.Tags) == 0 && a.Prefix == ""
    }
    
    // Validate - validates the And field
    func (a And) Validate() error {
    	if a.ContainsDuplicateTag() {
    		return errDuplicateTagKey
    	}
    	for _, t := range a.Tags {
    		if err := t.Validate(); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.8K bytes
    - Viewed (0)
  3. internal/config/notify/legacy.go

    )
    
    // SetNotifyKafka - helper for config migration from older config.
    func SetNotifyKafka(s config.Config, name string, cfg target.KafkaArgs) error {
    	if !cfg.Enable {
    		return nil
    	}
    
    	if err := cfg.Validate(); err != nil {
    		return err
    	}
    
    	s[config.NotifyKafkaSubSys][name] = config.KVS{
    		config.KV{
    			Key:   config.Enable,
    			Value: config.EnableOn,
    		},
    		config.KV{
    			Key: target.KafkaBrokers,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 04:37:54 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  4. cmd/batch-handlers.go

    	}
    	return madmin.BatchJobType("unknown")
    }
    
    // Validate validates the current job, used by 'save()' before
    // persisting the job request
    func (j BatchJobRequest) Validate(ctx context.Context, o ObjectLayer) error {
    	switch {
    	case j.Replicate != nil:
    		return j.Replicate.Validate(ctx, j, o)
    	case j.KeyRotate != nil:
    		return j.KeyRotate.Validate(ctx, j, o)
    	case j.Expire != nil:
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 14:11:38 GMT 2024
    - 55.2K bytes
    - Viewed (0)
  5. internal/config/policy/plugin/config.go

    	AuthToken   string                `json:"authToken"`
    	Transport   http.RoundTripper     `json:"-"`
    	CloseRespFn func(r io.ReadCloser) `json:"-"`
    }
    
    // Validate - validate opa configuration params.
    func (a *Args) Validate() error {
    	req, err := http.NewRequest(http.MethodPost, a.URL.String(), bytes.NewReader([]byte("")))
    	if err != nil {
    		return err
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  6. cmd/batch-job-common-types.go

    	var tmp retry
    	err := val.Decode(&tmp)
    	if err != nil {
    		return err
    	}
    
    	*r = BatchJobRetry(tmp)
    	r.line, r.col = val.Line, val.Column
    	return nil
    }
    
    // Validate validates input replicate retries.
    func (r BatchJobRetry) Validate() error {
    	if r.Attempts < 0 {
    		return BatchJobYamlErr{
    			line: r.line,
    			col:  r.col,
    			msg:  "Invalid arguments specified",
    		}
    	}
    
    	if r.Delay < 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 01 21:53:26 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/lifecycle.go

    	}
    	return &lc, nil
    }
    
    // Validate - validates the lifecycle configuration
    func (lc Lifecycle) Validate() error {
    	// Lifecycle config can't have more than 1000 rules
    	if len(lc.Rules) > 1000 {
    		return errLifecycleTooManyRules
    	}
    	// Lifecycle config should have at least one rule
    	if len(lc.Rules) == 0 {
    		return errLifecycleNoRule
    	}
    
    	// Validate all the rules in the lifecycle config
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 06:41:22 GMT 2024
    - 17K bytes
    - Viewed (0)
  8. internal/bucket/replication/replication.go

    			config.Rules[i].DeleteReplication = DeleteReplication{
    				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
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  9. internal/bucket/versioning/versioning.go

    	// Requires versioning to be enabled
    	ExcludedPrefixes []ExcludedPrefix `xml:",omitempty"`
    	ExcludeFolders   bool             `xml:",omitempty"`
    }
    
    // Validate - validates the versioning configuration
    func (v Versioning) Validate() error {
    	// Not supported yet
    	// switch v.MFADelete {
    	// case Enabled, Disabled:
    	// default:
    	// 	return Errorf("unsupported MFADelete state %s", v.MFADelete)
    	// }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  10. internal/event/target/nsq_test.go

    		t.Run(tt.name, func(t *testing.T) {
    			n := NSQArgs{
    				Enable:      tt.fields.Enable,
    				NSQDAddress: tt.fields.NSQDAddress,
    				Topic:       tt.fields.Topic,
    			}
    			if err := n.Validate(); (err != nil) != tt.wantErr {
    				t.Errorf("NSQArgs.Validate() error = %v, wantErr %v", err, tt.wantErr)
    			}
    		})
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 2.2K bytes
    - Viewed (0)
Back to top