- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 250 for marshal (0.1 sec)
-
internal/event/target/webhook.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 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.8K bytes - Viewed (0) -
cmd/xl-storage-format-v1.go
Hash string `json:"hash,omitempty"` } // MarshalJSON marshals the ChecksumInfo struct func (c ChecksumInfo) MarshalJSON() ([]byte, error) { info := checksumInfoJSON{ Name: fmt.Sprintf("part.%d", c.PartNumber), Algorithm: c.Algorithm.String(), Hash: hex.EncodeToString(c.Hash), } return json.Marshal(info) } // UnmarshalJSON - custom checksum info unmarshaller
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 8.4K bytes - Viewed (0) -
internal/event/name.go
return nil } // MarshalJSON - encodes to JSON data. func (name Name) MarshalJSON() ([]byte, error) { return json.Marshal(name.String()) } // UnmarshalJSON - decodes JSON data. func (name *Name) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { return err } eventName, err := ParseName(s) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 01:11:10 UTC 2024 - 10.4K bytes - Viewed (0) -
cmd/data-usage_test.go
} } } // equalAsJSON returns whether the values are equal when encoded as JSON. func equalAsJSON(a, b interface{}) bool { aj, err := json.Marshal(a) if err != nil { panic(err) } bj, err := json.Marshal(b) if err != nil { panic(err) } return bytes.Equal(aj, bj)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/handler-utils_test.go
createExpectedRequest := func(req *http.Request, location string) *http.Request { createBucketConfig := createBucketLocationConfiguration{} createBucketConfig.Location = location createBucketConfigBytes, _ := xml.Marshal(createBucketConfig) createBucketConfigBuffer := bytes.NewReader(createBucketConfigBytes) req.Body = io.NopCloser(createBucketConfigBuffer) req.ContentLength = int64(createBucketConfigBuffer.Len()) return req }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 6.1K bytes - Viewed (0) -
internal/config/lambda/target/webhook.go
defer func() { if err != nil { atomic.AddInt64(&target.failedRequests, 1) } }() if err = target.init(); err != nil { return nil, err } data, err := json.Marshal(eventData) if err != nil { return nil, err } req, err := http.NewRequest(http.MethodPost, target.args.Endpoint.String(), bytes.NewReader(data)) if err != nil { return nil, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:39:49 UTC 2024 - 6.7K bytes - Viewed (0) -
internal/event/target/nsq.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 } return target.producer.Publish(target.args.Topic, data) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 7.1K bytes - Viewed (0) -
cmd/batch-handlers.go
ctx context.Context `msg:"-"` } func notifyEndpoint(ctx context.Context, ri *batchJobInfo, endpoint, token string) error { if endpoint == "" { return nil } buf, err := json.Marshal(ri) if err != nil { return err } ctx, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewReader(buf))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 18 15:32:09 UTC 2024 - 62.2K bytes - Viewed (0) -
cmd/bucket-lifecycle-handlers_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 11.3K bytes - Viewed (0) -
internal/config/dns/etcd_dns.go
const etcdPathSeparator = "/" // create a new coredns service record for the bucket. func newCoreDNSMsg(ip string, port string, ttl uint32, t time.Time) ([]byte, error) { return json.Marshal(&SrvRecord{ Host: ip, Port: json.Number(port), TTL: ttl, CreationDate: t, }) } // Close closes the internal etcd client and cannot be used further
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 8K bytes - Viewed (0)