Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for unwrap (0.21 sec)

  1. internal/crypto/error.go

    func Errorf(format string, a ...interface{}) error {
    	e := fmt.Errorf(format, a...)
    	ee := Error{}
    	ee.msg = e.Error()
    	ee.cause = errors.Unwrap(e)
    	return ee
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.cause }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.msg == "" {
    		return "crypto: cause <nil>"
    	}
    	return e.msg
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  2. cmd/object-api-errors.go

    }
    
    // Unwrap the error.
    func (e InsufficientWriteQuorum) Unwrap() error {
    	return errErasureWriteQuorum
    }
    
    // GenericError - generic object layer error.
    type GenericError struct {
    	Bucket    string
    	Object    string
    	VersionID string
    	Err       error
    }
    
    // Unwrap the error to its underlying error.
    func (e GenericError) Unwrap() error {
    	return e.Err
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  3. docs/debugging/xattr/main.go

    		} else {
    			names = append(names, name)
    		}
    		var data [][]string
    		for _, attr := range names {
    			value, err := getxattr(path, attr)
    			if err != nil {
    				data = append(data, []string{attr, errors.Unwrap(err).Error()})
    			} else {
    				data = append(data, []string{attr, fmt.Sprintf("%d", value)})
    			}
    		}
    		table.AppendBulk(data) // Add Bulk Data
    		table.Render()
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 29 23:52:41 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  4. cmd/admin-handlers-config-kv.go

    }
    
    type badConfigErr struct {
    	Err error
    }
    
    // Error - return the error message
    func (bce badConfigErr) Error() string {
    	return bce.Err.Error()
    }
    
    // Unwrap the error to its underlying error.
    func (bce badConfigErr) Unwrap() error {
    	return bce.Err
    }
    
    type setConfigResult struct {
    	Cfg                     config.Config
    	SubSys                  string
    	Dynamic                 bool
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  5. internal/rest/client.go

    type NetworkError struct {
    	Err error
    }
    
    func (n *NetworkError) Error() string {
    	return n.Err.Error()
    }
    
    // Unwrap returns the error wrapped in NetworkError.
    func (n *NetworkError) Unwrap() error {
    	return n.Err
    }
    
    // Client - http based RPC client.
    type Client struct {
    	connected int32 // ref: https://golang.org/pkg/sync/atomic/#pkg-note-BUG
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  6. cmd/api-errors.go

    	// This way downstream context.Canceled will still report ErrRequestTimedout
    	if contextCanceled(ctx) && errors.Is(ctx.Err(), context.Canceled) {
    		return ErrClientDisconnected
    	}
    
    	// Unwrap the error first
    	err = unwrapAll(err)
    
    	switch err {
    	case errInvalidArgument:
    		apiErr = ErrAdminInvalidArgument
    	case errNoSuchPolicy:
    		apiErr = ErrAdminNoSuchPolicy
    	case errNoSuchUser:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 91.4K bytes
    - Viewed (7)
  7. cmd/site-replication.go

    		},
    		configureReplication,
    	)
    
    	if err := errors.Unwrap(makeBucketConcErr); err != nil {
    		return err
    	}
    
    	if err := errors.Unwrap(makeRemotesConcErr); err != nil {
    		return err
    	}
    
    	return nil
    }
    
    // DeleteBucketHook - called during a regular delete bucket call when cluster
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  8. internal/logger/logonce.go

    	}
    }
    
    const unwrapErrsDepth = 3
    
    // unwrapErrs upto the point where errors.Unwrap(err) returns nil
    func unwrapErrs(err error) (leafErr error) {
    	uerr := errors.Unwrap(err)
    	depth := 1
    	for uerr != nil {
    		// Save the current `uerr`
    		leafErr = uerr
    		// continue to look for leaf errors underneath
    		uerr = errors.Unwrap(leafErr)
    		depth++
    		if depth == unwrapErrsDepth {
    			// If we have reached enough depth we
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. cmd/object-multipart-handlers.go

    	if isCompressed {
    		wantEncryption := crypto.Requested(r.Header) || isEncrypted
    		s2c, cb := newS2CompressReader(reader, actualPartSize, wantEncryption)
    		idxCb = cb
    		defer s2c.Close()
    		reader = etag.Wrap(s2c, reader)
    		length = -1
    	}
    
    	srcInfo.Reader, err = hash.NewReader(ctx, reader, length, "", "", actualPartSize)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  10. internal/grid/types.go

    	}()
    	enc := json.NewEncoder(buf)
    	err = enc.Encode(j.val)
    	if err != nil {
    		return b, err
    	}
    	return msgp.AppendBytes(b, buf.Bytes()), nil
    }
    
    // UnmarshalMsg will JSON marshal the value and wrap as a msgp byte array.
    // Nil values are supported.
    func (j *JSON[T]) UnmarshalMsg(bytes []byte) ([]byte, error) {
    	if bytes, err := msgp.ReadNilBytes(bytes); err == nil {
    		if j.val != nil {
    			j.p.pool.Put(j.val)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
Back to top