Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 1,025 for _func (0.04 sec)

  1. schema/constraint.go

    	Constraint string // length(phone) >= 10
    	*Field
    }
    
    func (chk *CheckConstraint) GetName() string { return chk.Name }
    
    func (chk *CheckConstraint) Build() (sql string, vars []interface{}) {
    	return "CONSTRAINT ? CHECK (?)", []interface{}{clause.Column{Name: chk.Name}, clause.Expr{SQL: chk.Constraint}}
    }
    
    // ParseCheckConstraints parse schema check constraints
    func (schema *Schema) ParseCheckConstraints() map[string]CheckConstraint {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Mar 18 07:33:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. internal/http/dial_others.go

    //
    //nolint:unused
    func setTCPParametersFn(opts TCPOptions) func(network, address string, c syscall.RawConn) error {
    	return func(network, address string, c syscall.RawConn) error {
    		return nil
    	}
    }
    
    // DialContext is a function to make custom Dial for internode communications
    type DialContext func(ctx context.Context, network, address string) (net.Conn, error)
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Apr 24 04:08:47 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. cmd/background-newdisks-heal-ops_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsghealingTracker(b *testing.B) {
    	v := healingTracker{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsghealingTracker(b *testing.B) {
    	v := healingTracker{}
    	bts := make([]byte, 0, v.Msgsize())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  4. tests/serializer_test.go

    	}
    	return nil
    }
    
    func (es EncryptedString) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
    	return "hello" + string(es), nil
    }
    
    type CustomSerializer struct {
    	prefix []byte
    }
    
    func NewCustomSerializer(prefix string) *CustomSerializer {
    	return &CustomSerializer{prefix: []byte(prefix)}
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Apr 21 14:09:38 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  5. internal/store/batch_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package store
    
    import (
    	"context"
    	"sync"
    	"testing"
    	"time"
    )
    
    func TestBatchCommit(t *testing.T) {
    	defer func() {
    		if err := tearDownQueueStore(); err != nil {
    			t.Fatalf("Failed to tear down store; %v", err)
    		}
    	}()
    	store, err := setUpQueueStore(queueDir, 100)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  6. internal/bucket/lifecycle/lifecycle.go

    	ActionCount
    )
    
    // DeleteRestored - Returns true if action demands delete on restored objects
    func (a Action) DeleteRestored() bool {
    	return a == DeleteRestoredAction || a == DeleteRestoredVersionAction
    }
    
    // DeleteVersioned - Returns true if action demands delete on a versioned object
    func (a Action) DeleteVersioned() bool {
    	return a == DeleteVersionAction || a == DeleteRestoredVersionAction
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  7. internal/cachevalue/cache_test.go

    	"errors"
    	"testing"
    	"time"
    )
    
    func slowCaller(ctx context.Context) error {
    	sl := time.NewTimer(time.Second)
    	defer sl.Stop()
    
    	select {
    	case <-sl.C:
    	case <-ctx.Done():
    		return ctx.Err()
    	}
    
    	return nil
    }
    
    func TestCacheCtx(t *testing.T) {
    	cache := New[time.Time]()
    	t.Parallel()
    	cache.InitOnce(2*time.Second, Opts{},
    		func(ctx context.Context) (time.Time, error) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 09 00:51:34 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. internal/store/batch.go

    func (b *Batch[I]) Close() error {
    	defer func() {
    		close(b.quitCh)
    	}()
    
    	b.Lock()
    	defer b.Unlock()
    	return b.commit()
    }
    
    // NewBatch creates a new batch
    func NewBatch[I any](config BatchConfig[I]) *Batch[I] {
    	if config.CommitTimeout == 0 {
    		config.CommitTimeout = defaultCommitTimeout
    	}
    	quitCh := make(chan struct{})
    	batch := &Batch[I]{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. internal/bucket/replication/destination.go

    }
    
    func (d Destination) isValidStorageClass() bool {
    	if d.StorageClass == "" {
    		return true
    	}
    	return d.StorageClass == "STANDARD" || d.StorageClass == "REDUCED_REDUNDANCY"
    }
    
    // IsValid - checks whether Destination is valid or not.
    func (d Destination) IsValid() bool {
    	return d.Bucket != "" || !d.isValidStorageClass()
    }
    
    func (d Destination) String() string {
    	return d.ARN
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4K bytes
    - Viewed (0)
  10. cmd/erasure-healing-common.go

    		return checkPartDiskNotFound
    	default:
    		return checkPartUnknown
    	}
    }
    
    func partNeedsHealing(partErrs []int) bool {
    	return slices.IndexFunc(partErrs, func(i int) bool { return i != checkPartSuccess && i != checkPartUnknown }) > -1
    }
    
    func hasPartErr(partErrs []int) bool {
    	return slices.IndexFunc(partErrs, func(i int) bool { return i != checkPartSuccess }) > -1
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top