Search Options

Results per page
Sort
Preferred Languages
Advance

Results 361 - 370 of 1,025 for FUNC (0.02 sec)

  1. internal/bucket/lifecycle/error.go

    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.err }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.err == nil {
    		return "lifecycle: cause <nil>"
    	}
    	return e.err.Error()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  2. internal/bucket/versioning/error.go

    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.err }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.err == nil {
    		return "versioning: cause <nil>"
    	}
    	return e.err.Error()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  3. internal/arn/arn_test.go

    				ResourceID:   "my-role",
    			},
    			want: "arn:minio::us-east-1::role/my-role",
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.want, func(t *testing.T) {
    			if got := tt.arn.String(); got != tt.want {
    				t.Errorf("ARN.String() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func TestNewIAMRoleARN(t *testing.T) {
    	type args struct {
    		resourceID   string
    		serverRegion string
    	}
    	tests := []struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 08:31:34 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. internal/config/storageclass/storage-class.go

    }
    
    // UnmarshalJSON - Validate SS and RRS parity when unmarshalling JSON.
    func (sCfg *Config) UnmarshalJSON(data []byte) error {
    	type Alias Config
    	aux := &struct {
    		*Alias
    	}{
    		Alias: (*Alias)(sCfg),
    	}
    	return json.Unmarshal(data, &aux)
    }
    
    // IsValid - returns true if input string is a valid
    // storage class kind supported.
    func IsValid(sc string) bool {
    	return sc == RRS || sc == STANDARD
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  5. tests/count_test.go

    	}
    
    	expects = []User{{Name: "count-1", Age: 1}, {Name: "count-2", Age: 1}, {Name: "count-3", Age: 1}}
    	sort.SliceStable(users, func(i, j int) bool {
    		return strings.Compare(users[i].Name, users[j].Name) < 0
    	})
    
    	AssertEqual(t, users, expects)
    
    	var count9 int64
    	if err := DB.Scopes(func(tx *gorm.DB) *gorm.DB {
    		return tx.Table("users")
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. cmd/erasure-common.go

    package cmd
    
    import (
    	"context"
    	"math/rand"
    	"sync"
    	"time"
    )
    
    func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) {
    	disks := er.getDisks()
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	for _, i := range r.Perm(len(disks)) {
    		i := i
    		wg.Add(1)
    		go func() {
    			defer wg.Done()
    			if disks[i] == nil {
    				return
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Aug 12 08:38:15 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. internal/s3select/json/args.go

    type ReaderArgs struct {
    	ContentType string `xml:"Type"`
    	unmarshaled bool
    }
    
    // IsEmpty - returns whether reader args is empty or not.
    func (args *ReaderArgs) IsEmpty() bool {
    	return !args.unmarshaled
    }
    
    // UnmarshalXML - decodes XML data.
    func (args *ReaderArgs) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	// Make subtype to avoid recursive UnmarshalXML().
    	type subReaderArgs ReaderArgs
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  8. tests/tests_test.go

    		db.Logger = db.Logger.LogMode(logger.Silent)
    	}
    
    	return
    }
    
    func RunMigrations() {
    	var err error
    	allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Coupon{}, &CouponProduct{}, &Order{}, &Parent{}, &Child{}, &Tools{}}
    	rand.Seed(time.Now().UnixNano())
    	rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Sep 30 03:21:19 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. cmd/erasure-object_test.go

    	}
    	gr.Close()
    	if !bytes.Equal(output.Bytes(), bigData) {
    		t.Fatalf("Corrupted data found")
    	}
    }
    
    func TestObjectQuorumFromMeta(t *testing.T) {
    	ExecObjectLayerTestWithDirs(t, testObjectQuorumFromMeta)
    }
    
    func testObjectQuorumFromMeta(obj ObjectLayer, instanceType string, dirs []string, t TestErrHandler) {
    	bucket := getRandomBucketName()
    
    	var opts ObjectOptions
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  10. cmd/metacache_test.go

    			prefix: "prefix/prefix2/",
    			want:   "prefix/prefix2/",
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := baseDirFromPrefix(tt.prefix); got != tt.want {
    				t.Errorf("baseDirFromPrefix() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func Test_metacache_finished(t *testing.T) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 08 18:06:45 UTC 2021
    - 6.8K bytes
    - Viewed (0)
Back to top