Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 479 for Bool (0.18 sec)

  1. internal/config/bool-flag.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package config
    
    import (
    	"encoding/json"
    	"fmt"
    	"strconv"
    	"strings"
    )
    
    // BoolFlag - wrapper bool type.
    type BoolFlag bool
    
    // String - returns string of BoolFlag.
    func (bf BoolFlag) String() string {
    	if bf {
    		return "on"
    	}
    
    	return "off"
    }
    
    // MarshalJSON - converts BoolFlag into JSON data.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 07 15:10:40 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  2. internal/config/bool-flag_test.go

    		}
    	}
    }
    
    // Test BoolFlag.UnmarshalJSON()
    func TestBoolFlagUnmarshalJSON(t *testing.T) {
    	testCases := []struct {
    		data           []byte
    		expectedResult BoolFlag
    		expectedErr    bool
    	}{
    		{[]byte(`{}`), BoolFlag(false), true},
    		{[]byte(`["on"]`), BoolFlag(false), true},
    		{[]byte(`"junk"`), BoolFlag(false), true},
    		{[]byte(`""`), BoolFlag(true), false},
    		{[]byte(`"on"`), BoolFlag(true), false},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.5K bytes
    - Viewed (0)
  3. cmd/object-api-interface.go

    	LockEnabled       bool
    	VersioningEnabled bool
    	ForceCreate       bool      // Create buckets even if they are already created.
    	CreatedAt         time.Time // only for site replication
    	NoLock            bool      // does not lock the make bucket call if set to 'true'
    }
    
    // DeleteBucketOptions provides options for DeleteBucket calls.
    type DeleteBucketOptions struct {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  4. internal/http/listener_test.go

    		expectedListenErrs  []bool
    	}{
    		{[]string{"93.184.216.34:65432"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{true}},                           // 1
    		{[]string{"example.org:65432"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{true}},                             // 2
    		{[]string{"unknown-host"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{true}},                                  // 3
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 12 16:09:28 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  5. internal/dsync/drwmutex.go

    		}(index, c)
    	}
    	wg.Wait()
    }
    
    type refreshResult struct {
    	offline   bool
    	refreshed bool
    }
    
    // Refresh the given lock in all nodes, return true to indicate if a lock
    // does not exist in enough quorum nodes.
    func refreshLock(ctx context.Context, ds *Dsync, id, source string, quorum int) (bool, error) {
    	restClnts, _ := ds.GetLockers()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  6. cmd/storage-interface.go

    	// of this function is to know if the "drive" has "format.json" or not
    	// if it has a "format.json" then is it correct "format.json" or not.
    	IsOnline() bool
    
    	// Returns the last time this disk (re)-connected
    	LastConn() time.Time
    
    	// Indicates if disk is local or not.
    	IsLocal() bool
    
    	// Returns hostname if disk is remote.
    	Hostname() string
    
    	// Returns the entire endpoint.
    	Endpoint() Endpoint
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  7. internal/event/targetlist_test.go

    import (
    	"context"
    	"crypto/rand"
    	"errors"
    	"reflect"
    	"testing"
    	"time"
    
    	"github.com/minio/minio/internal/store"
    )
    
    type ExampleTarget struct {
    	id       TargetID
    	sendErr  bool
    	closeErr bool
    }
    
    func (target ExampleTarget) ID() TargetID {
    	return target.id
    }
    
    // Save - Sends event directly without persisting.
    func (target ExampleTarget) Save(eventData Event) error {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Dec 05 10:16:33 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  8. internal/s3select/csv/args.go

    	QuoteEscapeCharacter       string `xml:"QuoteEscapeCharacter"`
    	CommentCharacter           string `xml:"Comments"`
    	AllowQuotedRecordDelimiter bool   `xml:"AllowQuotedRecordDelimiter"`
    	unmarshaled                bool
    }
    
    // IsEmpty - returns whether reader args is empty or not.
    func (args *ReaderArgs) IsEmpty() bool {
    	return !args.unmarshaled
    }
    
    // UnmarshalXML - decodes XML data.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  9. internal/bucket/object/lock/lock.go

    }
    
    // Retention - bucket level retention configuration.
    type Retention struct {
    	Mode        RetMode
    	Validity    time.Duration
    	LockEnabled bool
    }
    
    // Retain - check whether given date is retainable by validity time.
    func (r Retention) Retain(created time.Time) bool {
    	t, err := UTCNowNTP()
    	if err != nil {
    		lockLogIf(context.Background(), err)
    		// Retain
    		return true
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 17.1K bytes
    - Viewed (0)
  10. internal/bucket/lifecycle/lifecycle.go

    	Name             string
    	UserTags         string
    	ModTime          time.Time
    	Size             int64
    	VersionID        string
    	IsLatest         bool
    	DeleteMarker     bool
    	NumVersions      int
    	SuccessorModTime time.Time
    	TransitionStatus string
    	RestoreOngoing   bool
    	RestoreExpires   time.Time
    }
    
    // ExpiredObjectDeleteMarker returns true if an object version referred to by o
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 06:41:22 GMT 2024
    - 17K bytes
    - Viewed (0)
Back to top