Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 250 for marshal (0.08 sec)

  1. internal/event/target/amqp.go

    	objectName, err := url.QueryUnescape(eventData.S3.Object.Key)
    	if err != nil {
    		return err
    	}
    	key := eventData.S3.Bucket.Name + "/" + objectName
    
    	data, err := json.Marshal(event.Log{EventName: eventData.EventName, Key: key, Records: []event.Event{eventData}})
    	if err != nil {
    		return err
    	}
    
    	headers := make(amqp091.Table)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. internal/jwt/parser.go

    func (c *MapClaims) Map() map[string]interface{} {
    	if c == nil {
    		return nil
    	}
    	return c.MapClaims
    }
    
    // MarshalJSON marshals the MapClaims struct
    func (c *MapClaims) MarshalJSON() ([]byte, error) {
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	return json.Marshal(c.MapClaims)
    }
    
    // ParseWithStandardClaims - parse the token string, valid methods.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 17 16:45:46 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. cni/pkg/install/install.go

    					cniConfigMap["plugins"] = append(plugins[:i], plugins[i+1:]...)
    					break
    				}
    			}
    
    			cniConfig, err := util.MarshalCNIConfig(cniConfigMap)
    			if err != nil {
    				return fmt.Errorf("failed to marshal CNI config map in file %s: %w", in.cniConfigFilepath, err)
    			}
    			if err = file.AtomicWrite(in.cniConfigFilepath, cniConfig, os.FileMode(0o644)); err != nil {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Aug 09 21:33:51 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  4. cmd/admin-handlers-pools.go

    		writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Rebalance routine is run on the first node of any pool participating in rebalance.
    	pools.StartRebalance()
    
    	b, err := json.Marshal(struct {
    		ID string `json:"id"`
    	}{ID: id})
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	writeSuccessResponseJSON(w, b)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 00:22:30 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. cmd/bucket-handlers.go

    	if err != nil {
    		apiErr := errorCodes.ToAPIErr(ErrInvalidArgument)
    		apiErr.Description = err.Error()
    		writeErrorResponse(ctx, w, apiErr, r.URL)
    		return
    	}
    
    	configData, err := xml.Marshal(config)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Deny object locking configuration settings on existing buckets without object lock enabled.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 63.4K bytes
    - Viewed (0)
  6. internal/logger/target/kafka/kafka.go

    	}
    }
    
    func (h *Target) send(entry interface{}) error {
    	if err := h.initKafkaOnce.Do(h.init); err != nil {
    		return err
    	}
    	logJSON, err := json.Marshal(&entry)
    	if err != nil {
    		return err
    	}
    	msg := sarama.ProducerMessage{
    		Topic: h.kconfig.Topic,
    		Value: sarama.ByteEncoder(logJSON),
    	}
    	_, _, err = h.producer.SendMessage(&msg)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  7. cmd/bucket-metadata-sys.go

    		var cfgData []byte
    		if expiryRuleRemoved {
    			var lcCfg lifecycle.Lifecycle
    			currtime := time.Now()
    			lcCfg.ExpiryUpdatedAt = &currtime
    			cfgData, err = xml.Marshal(lcCfg)
    			if err != nil {
    				return updatedAt, err
    			}
    		}
    		return sys.updateAndParse(ctx, bucket, configFile, cfgData, false)
    	}
    	return sys.updateAndParse(ctx, bucket, configFile, nil, false)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  8. internal/event/target/nats.go

    	objectName, err := url.QueryUnescape(eventData.S3.Object.Key)
    	if err != nil {
    		return err
    	}
    	key := eventData.S3.Bucket.Name + "/" + objectName
    
    	data, err := json.Marshal(event.Log{EventName: eventData.EventName, Key: key, Records: []event.Event{eventData}})
    	if err != nil {
    		return err
    	}
    
    	if target.stanConn != nil {
    		if target.args.Streaming.Async {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  9. cmd/iam-etcd-store.go

    func (ies *IAMEtcdStore) getUsersSysType() UsersSysType {
    	return ies.usersSysType
    }
    
    func (ies *IAMEtcdStore) saveIAMConfig(ctx context.Context, item interface{}, itemPath string, opts ...options) error {
    	data, err := json.Marshal(item)
    	if err != nil {
    		return err
    	}
    	if GlobalKMS != nil {
    		data, err = config.EncryptBytes(GlobalKMS, data, kms.Context{
    			minioMetaBucket: path.Join(minioMetaBucket, itemPath),
    		})
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 01:29:20 UTC 2024
    - 14K bytes
    - Viewed (0)
  10. cmd/xl-storage-format_test.go

    }
    
    // Tests the correctness of constructing XLMetaV1 using jsoniter lib.
    // The result will be compared with the result obtained from json.unMarshal of the byte data.
    func TestGetXLMetaV1Jsoniter1(t *testing.T) {
    	xlMetaJSON := getXLMetaBytes(1)
    
    	var unMarshalXLMeta xlMetaV1Object
    	if err := json.Unmarshal(xlMetaJSON, &unMarshalXLMeta); err != nil {
    		t.Errorf("Unmarshalling failed: %v", err)
    	}
    
    	var jsoniterXLMeta xlMetaV1Object
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top