Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 1,124 for Nil (0.01 sec)

  1. cmd/warm-backend-gcs.go

    1. return nil, errors.New("no bucket name was provided")
    2. }
    3.  
    4. credsJSON, err := conf.GetCredentialJSON()
    5. if err != nil {
    6. return nil, err
    7. }
    8.  
    9. client, err := storage.NewClient(context.Background(),
    10. option.WithCredentialsJSON(credsJSON),
    11. option.WithScopes(storage.ScopeReadWrite),
    12. option.WithUserAgent(fmt.Sprintf("gcs-tier-%s", tier)+SlashSeparator+ReleaseTag),
    13. )
    14. if err != nil {
    15. return nil, err
    16. }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. callbacks.go

    1. }
    2.  
    3. // assign model values
    4. if stmt.Model == nil {
    5. stmt.Model = stmt.Dest
    6. } else if stmt.Dest == nil {
    7. stmt.Dest = stmt.Model
    8. }
    9.  
    10. // parse model values
    11. if stmt.Model != nil {
    12. if err := stmt.Parse(stmt.Model); err != nil && (!errors.Is(err, schema.ErrUnsupportedDataType) || (stmt.Table == "" && stmt.TableExpr == nil && stmt.SQL.Len() == 0)) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 26 03:33:36 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. scan.go

    1. if db.Statement.Schema != nil {
    2. for idx, name := range columns {
    3. if field := db.Statement.Schema.LookUpField(name); field != nil {
    4. values[idx] = reflect.New(reflect.PtrTo(field.FieldType)).Interface()
    5. continue
    6. }
    7. values[idx] = new(interface{})
    8. }
    9. } else if len(columnTypes) > 0 {
    10. for idx, columnType := range columnTypes {
    11. if columnType.ScanType() != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 24 09:42:59 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  4. internal/crypto/sse-s3.go

    1. if err != nil {
    2. return nil, err
    3. }
    4. keys = append(keys, key)
    5. }
    6. return keys, nil
    7. }
    8.  
    9. // CreateMetadata encodes the sealed object key into the metadata and returns
    10. // the modified metadata. If the keyID and the kmsKey is not empty it encodes
    11. // both into the metadata as well. It allocates a new metadata map if metadata
    12. // is nil.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. cmd/batch-rotate.go

    1. }
    2. }
    3. return err
    4. }
    5. if GlobalKMS == nil {
    6. return errKMSNotConfigured
    7. }
    8. if err := r.Encryption.Validate(); err != nil {
    9. return err
    10. }
    11.  
    12. for _, tag := range r.Flags.Filter.Tags {
    13. if err := tag.Validate(); err != nil {
    14. return err
    15. }
    16. }
    17.  
    18. for _, meta := range r.Flags.Filter.Metadata {
    19. if err := meta.Validate(); err != nil {
    20. return err
    21. }
    22. }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  6. internal/config/crypto.go

    1. AssociatedData: associatedData,
    2. })
    3. if err != nil {
    4. return nil, err
    5. }
    6. stream, err := metadata.Algorithm.Stream(key)
    7. if err != nil {
    8. return nil, err
    9. }
    10. if stream.NonceSize() != len(metadata.Nonce) {
    11. return nil, sio.NotAuthentic
    12. }
    13. return stream.DecryptReader(ciphertext, metadata.Nonce, nil), nil
    14. }
    15.  
    16. type encryptedObject struct {
    17. KeyID string `json:"keyid"`
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. internal/store/batch_test.go

    1. import (
    2. "context"
    3. "sync"
    4. "testing"
    5. "time"
    6. )
    7.  
    8. func TestBatchCommit(t *testing.T) {
    9. defer func() {
    10. if err := tearDownQueueStore(); err != nil {
    11. t.Fatalf("Failed to tear down store; %v", err)
    12. }
    13. }()
    14. store, err := setUpQueueStore(queueDir, 100)
    15. if err != nil {
    16. t.Fatalf("Failed to create a queue store; %v", err)
    17. }
    18.  
    19. var limit uint32 = 100
    20.  
    21. batch := NewBatch[TestItem](BatchConfig[TestItem]{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. src/bufio/bufio.go

    1. return
    2. }
    3. if b.buf == nil {
    4. b.buf = make([]byte, defaultBufSize)
    5. }
    6. b.err = nil
    7. b.n = 0
    8. b.wr = w
    9. }
    10.  
    11. // Flush writes any buffered data to the underlying [io.Writer].
    12. func (b *Writer) Flush() error {
    13. if b.err != nil {
    14. return b.err
    15. }
    16. if b.n == 0 {
    17. return nil
    18. }
    19. n, err := b.wr.Write(b.buf[0:b.n])
    20. if n < b.n && err == nil {
    21. err = io.ErrShortWrite
    22. }
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  9. cmd/mrf_gen.go

    1. if err != nil {
    2. return
    3. }
    4. err = en.WriteString(z.VersionID)
    5. if err != nil {
    6. err = msgp.WrapError(err, "VersionID")
    7. return
    8. }
    9. // write "Versions"
    10. err = en.Append(0xa8, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
    11. if err != nil {
    12. return
    13. }
    14. err = en.WriteBytes(z.Versions)
    15. if err != nil {
    16. err = msgp.WrapError(err, "Versions")
    17. return
    18. }
    19. // write "SetIndex"
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:26:05 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  10. tests/callbacks_test.go

    1. results: []string{"c5", "c1", "c2", "c3", "c4"},
    2. },
    3. }
    4.  
    5. for idx, data := range datas {
    6. db, err := gorm.Open(nil, nil)
    7. if err != nil {
    8. t.Fatal(err)
    9. }
    10. callbacks := db.Callback()
    11.  
    12. for _, c := range data.callbacks {
    13. var v interface{} = callbacks.Create()
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 26 03:33:36 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top