- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 139 for Marshal (0.05 sec)
-
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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 33.2K bytes - Viewed (0) -
cmd/kms-handlers.go
response.DecryptionErr = "The generated and the decrypted data key do not match" resp, err := json.Marshal(response) if err != nil { writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL) return } writeSuccessResponseJSON(w, resp) return } resp, err := json.Marshal(response) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Aug 18 06:43:03 UTC 2024 - 10.1K bytes - Viewed (0) -
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
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 1.2K bytes - Viewed (0) -
internal/logger/console.go
func (f fatalMsg) json(msg string, args ...interface{}) { var message string if msg != "" { message = fmt.Sprintf(msg, args...) } else { message = fmt.Sprint(args...) } logJSON, err := json.Marshal(&log.Entry{ Level: FatalKind, Message: message, Time: time.Now().UTC(), Trace: &log.Trace{Message: message, Source: []string{getSource(6)}}, }) if err != nil { panic(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 7.5K bytes - Viewed (0) -
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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 27 00:01:20 UTC 2024 - 7.2K bytes - Viewed (0) -
tests/preload_test.go
DB.Preload("Team").Preload("Languages").Preload("Friends").First(&user, "name = ?", user.Name) if r, err := json.Marshal(&user); err != nil { t.Errorf("failed to marshal users, got error %v", err) } else if !regexp.MustCompile(`"Team":\[\],"Languages":\[\],"Friends":\[\]`).MatchString(string(r)) { t.Errorf("json marshal is not empty slice, got %v", string(r)) } var results []User
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
cmd/data-scanner_test.go
NewerNoncurrentVersions: 1, }, }, }, } lcXML, err := xml.Marshal(lc) if err != nil { t.Fatalf("Failed to marshal lifecycle config: %v", err) } vcfg := versioning.Versioning{ Status: "Enabled", } vcfgXML, err := xml.Marshal(vcfg) if err != nil { t.Fatalf("Failed to marshal versioning config: %v", err) } bucket := "bucket" obj := "obj-1" now := time.Now()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 03 11:18:58 UTC 2024 - 6.9K bytes - Viewed (0) -
cmd/admin-handlers.go
Host: client.String(), Err: fmt.Sprintf("server is running the latest version: %s", Version), CurrentVersion: Version, }) } // Marshal API response jsonBytes, err := json.Marshal(updateStatus) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } writeSuccessResponseJSON(w, jsonBytes) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 99.7K bytes - Viewed (0) -
internal/s3select/json/record.go
case nil: columnValue = "" case RawJSON: columnValue = string([]byte(val)) case []interface{}: b, err := json.Marshal(val) if err != nil { return err } columnValue = string(b) default: return fmt.Errorf("Cannot marshal unhandled type: %T", kv.Value) } csvRecord = append(csvRecord, columnValue) } w := csv.NewWriter(writer)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 5.3K bytes - Viewed (0) -
cni/pkg/nodeagent/cni-watcher_test.go
} payload, _ := json.Marshal(valid) addEvent, err := processAddEvent(payload) assert.NoError(t, err) assert.Equal(t, valid, addEvent) } func TestProcessAddEventBadPayload(t *testing.T) { valid := CNIPluginAddEvent{ Netns: "/var/netns/foo", PodName: "pod-bingo", PodNamespace: "funkyns", } payload, _ := json.Marshal(valid) invalid := string(payload) + "funkyjunk"
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 7.6K bytes - Viewed (0)