Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 134 for Marshall (0.21 sec)

  1. cmd/admin-bucket-handlers.go

    		return
    	}
    	tgtBytes, err := json.Marshal(&targets)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    	if _, err = globalBucketMetadataSys.Update(ctx, bucket, bucketTargetsFile, tgtBytes); err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	data, err := json.Marshal(target.Arn)
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  2. internal/store/queuestore.go

    	store.entries[key] = time.Now().UnixNano()
    
    	return nil
    }
    
    // write - writes an item to the directory.
    func (store *QueueStore[I]) write(key string, item I) error {
    	// Marshalls the item.
    	eventData, err := json.Marshal(item)
    	if err != nil {
    		return err
    	}
    
    	path := filepath.Join(store.directory, key+store.fileExt)
    	if err := os.WriteFile(path, eventData, os.FileMode(0o770)); err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  3. cmd/bucket-encryption-handlers.go

    				writeErrorResponse(ctx, w, toAPIError(ctx, errKMSKeyNotFound), r.URL)
    				return
    			}
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	configData, err := xml.Marshal(encConfig)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Store the bucket encryption configuration in the object layer
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. internal/event/name_test.go

    		{ObjectRemovedNoOP, []byte("<Name>s3:ObjectRemoved:NoOP</Name>"), false},
    		{blankName, []byte("<Name></Name>"), false},
    	}
    
    	for i, testCase := range testCases {
    		data, err := xml.Marshal(testCase.name)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/ztunnelserver.go

    	r := &zdsapi.WorkloadRequest{
    		Payload: &zdsapi.WorkloadRequest_Del{
    			Del: &zdsapi.DelWorkload{
    				Uid: uid,
    			},
    		},
    	}
    	data, err := proto.Marshal(r)
    	if err != nil {
    		return err
    	}
    
    	log.Debugf("sending delete pod to ztunnel: %s %v", uid, r)
    
    	var delErr []error
    
    	z.conns.mu.Lock()
    	defer z.conns.mu.Unlock()
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  6. cmd/format-erasure.go

    }
    
    func saveFormatErasure(disk StorageAPI, format *formatErasureV3, healID string) error {
    	if disk == nil || format == nil {
    		return errDiskNotFound
    	}
    
    	// Marshal and write to disk.
    	formatData, err := json.Marshal(format)
    	if err != nil {
    		return err
    	}
    
    	tmpFormat := mustGetUUID()
    
    	// Purge any existing temporary file, okay to ignore errors here.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 23.4K bytes
    - Viewed (0)
  7. istioctl/pkg/util/clusters/wrapper.go

    )
    
    // Wrapper is a wrapper around the Envoy Clusters
    // It has extra helper functions for handling any/struct/marshal protobuf pain
    type Wrapper struct {
    	*admin.Clusters
    }
    
    // MarshalJSON is a custom marshaller to handle protobuf pain
    func (w *Wrapper) MarshalJSON() ([]byte, error) {
    	return protomarshal.Marshal(w)
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Nov 03 08:41:32 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  8. internal/bucket/lifecycle/filter_test.go

    			string: "doc/",
    			set:    true,
    			Unused: struct{}{},
    		},
    		ObjectSizeGreaterThan: 100 * humanize.MiByte,
    		ObjectSizeLessThan:    100 * humanize.GiByte,
    	}
    	b, err := xml.Marshal(f1)
    	if err != nil {
    		t.Fatalf("Failed to marshal %v", f1)
    	}
    	var f2 Filter
    	err = xml.Unmarshal(b, &f2)
    	if err != nil {
    		t.Fatalf("Failed to unmarshal %s", string(b))
    	}
    	if f1.ObjectSizeLessThan != f2.ObjectSizeLessThan {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 27 00:01:20 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  9. cmd/admin-handlers-users.go

    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    	for k, v := range ldapUsers {
    		allCredentials[k] = v
    	}
    
    	// Marshal the response
    	data, err := json.Marshal(allCredentials)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	econfigData, err := madmin.EncryptData(password, data)
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 15:15:02 GMT 2024
    - 76K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/policies.go

    		if r := cmp.Compare(a.Namespace, b.Namespace); r != 0 {
    			return r
    		}
    		return cmp.Compare(a.Name, b.Name)
    	})
    	out, err := json.MarshalIndent(policies, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal policies: %v", err)
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    			return err
    		}
    	}
    	fmt.Fprintln(c.Stdout, string(out))
    	return nil
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top