Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 147 for Marshal (0.18 sec)

  1. 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 May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  2. tests/scanner_valuer_test.go

    		return errors.New("Cannot scan NamedInt from " + reflect.ValueOf(src).String())
    	}
    	return nil
    }
    
    type StringsSlice []string
    
    func (l StringsSlice) Value() (driver.Value, error) {
    	bytes, err := json.Marshal(l)
    	return string(bytes), err
    }
    
    func (l *StringsSlice) Scan(input interface{}) error {
    	switch value := input.(type) {
    	case string:
    		return json.Unmarshal([]byte(value), l)
    	case []byte:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. cmd/tier-handlers.go

    	ctx := r.Context()
    
    	objAPI, _ := validateAdminReq(ctx, w, r, policy.ListTierAction)
    	if objAPI == nil {
    		return
    	}
    
    	tiers := globalTierConfigMgr.ListTiers()
    	data, err := json.Marshal(tiers)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	w.Header().Set(tierCfgRefreshAtHdr, globalTierConfigMgr.refreshedAt().String())
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 15 19:52:44 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  4. cmd/bucket-policy.go

    	// Return empty BucketAccessPolicy for empty bucket policy.
    	if bucketPolicy == nil {
    		return &miniogopolicy.BucketAccessPolicy{Version: policy.DefaultVersion}, nil
    	}
    
    	data, err := json.Marshal(bucketPolicy)
    	if err != nil {
    		// This should not happen because bucketPolicy is valid to convert to JSON data.
    		return nil, err
    	}
    
    	var policyInfo miniogopolicy.BucketAccessPolicy
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 8K bytes
    - Viewed (0)
  5. istioctl/pkg/util/configdump/wrapper.go

    		return msg.ProtoReflect().Type(), nil
    	}
    	return typ, nil
    }
    
    // Wrapper is a wrapper around the Envoy ConfigDump
    // It has extra helper functions for handling any/struct/marshal protobuf pain
    type Wrapper struct {
    	*admin.ConfigDump
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    func (w *Wrapper) UnmarshalJSON(b []byte) error {
    	cd := &admin.ConfigDump{}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. internal/kms/dek_test.go

    		},
    	},
    }
    
    func TestEncodeDecodeDEK(t *testing.T) {
    	for i, test := range dekEncodeDecodeTests {
    		text, err := test.Key.MarshalText()
    		if err != nil {
    			t.Fatalf("Test %d: failed to marshal DEK: %v", i, err)
    		}
    
    		var key DEK
    		if err = key.UnmarshalText(text); err != nil {
    			t.Fatalf("Test %d: failed to unmarshal DEK: %v", i, err)
    		}
    		if key.Plaintext != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  7. cmd/admin-handlers-site-replication.go

    	status, err := globalSiteReplicationSys.AddPeerClusters(ctx, sites, opts)
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	body, err := json.Marshal(status)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	writeSuccessResponseJSON(w, body)
    }
    
    func getSRAddOptions(r *http.Request) (opts madmin.SRAddOptions) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 15 09:40:39 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  8. cmd/admin-handlers-idp-config.go

    		return
    	}
    
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	data, err := json.Marshal(cfgList)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	econfigData, err := madmin.EncryptData(password, data)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  9. internal/config/lambda/event/targetid.go

    func (tid TargetID) ToARN(region string) ARN {
    	return ARN{TargetID: tid, region: region}
    }
    
    // MarshalJSON - encodes to JSON data.
    func (tid TargetID) MarshalJSON() ([]byte, error) {
    	return json.Marshal(tid.String())
    }
    
    // UnmarshalJSON - decodes JSON data.
    func (tid *TargetID) UnmarshalJSON(data []byte) error {
    	var s string
    	if err := json.Unmarshal(data, &s); err != nil {
    		return err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/connections.go

    		if filter.Namespace != "" && filter.Namespace != state.Info.Namespace {
    			return false
    		}
    		return true
    	})
    	out, err := json.MarshalIndent(workloads, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal workloads: %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 May 01 22:53:12 GMT 2024
    - Last Modified: Mon Apr 22 15:39:28 GMT 2024
    - 3.3K bytes
    - Viewed (0)
Back to top