- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for parseConfig (0.2 sec)
-
internal/bucket/versioning/versioning.go
// prefixes or if ExcludeFolders is true. func (v Versioning) PrefixesExcluded() bool { return len(v.ExcludedPrefixes) > 0 || v.ExcludeFolders } // ParseConfig - parses data in given reader to VersioningConfiguration. func ParseConfig(reader io.Reader) (*Versioning, error) { var v Versioning if err := xml.NewDecoder(reader).Decode(&v); err != nil { return nil, err } if err := v.Validate(); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.6K bytes - Viewed (0) -
internal/bucket/replication/replication.go
RoleArn string `xml:"Role" json:"Role"` } // Maximum 2MiB size per replication config. const maxReplicationConfigSize = 2 << 20 // ParseConfig parses ReplicationConfiguration from xml func ParseConfig(reader io.Reader) (*Config, error) { config := Config{} if err := xml.NewDecoder(io.LimitReader(reader, maxReplicationConfigSize)).Decode(&config); err != nil { return nil, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 8.9K bytes - Viewed (0) -
internal/event/config.go
type config Config parsedConfig := config{} if err := d.DecodeElement(&parsedConfig, &start); err != nil { return err } // Empty queue list means user wants to delete the notification configuration. if len(parsedConfig.QueueList) > 0 { for i, q1 := range parsedConfig.QueueList[:len(parsedConfig.QueueList)-1] { for _, q2 := range parsedConfig.QueueList[i+1:] {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 16 17:28:29 UTC 2021 - 8.4K bytes - Viewed (0) -
cni/pkg/plugin/plugin.go
K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString // nolint: revive, stylecheck K8S_POD_UID types.UnmarshallableString // nolint: revive, stylecheck } // parseConfig parses the supplied configuration (and prevResult) from stdin. func parseConfig(stdin []byte) (*Config, error) { conf := Config{} if err := json.Unmarshal(stdin, &conf); err != nil { return nil, fmt.Errorf("failed to parse network configuration: %v", err)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Aug 14 19:36:19 UTC 2024 - 10.5K bytes - Viewed (0) -
internal/bucket/versioning/versioning_test.go
excludeFolders: true, }, } for i, tc := range testcases { var v *Versioning var err error v, err = ParseConfig(strings.NewReader(tc.input)) if tc.err != err { t.Fatalf("Test %d: expected %v but got %v", i+1, tc.err, err) } if err != nil { if tc.err == nil { t.Fatalf("Test %d: failed due to %v", i+1, err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun May 08 05:06:44 UTC 2022 - 8.8K bytes - Viewed (0) -
cmd/bucket-notification-handlers.go
// PutBucketNotification always needs a Content-Length. if r.ContentLength <= 0 { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingContentLength), r.URL) return } config, err := event.ParseConfig(io.LimitReader(r.Body, r.ContentLength), globalSite.Region(), globalEventNotifier.targetList) if err != nil { apiErr := errorCodes.ToAPIErr(ErrMalformedXML) if event.IsEventError(err) { apiErr = toAPIError(ctx, err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.1K bytes - Viewed (0) -
internal/bucket/replication/rule_test.go
expectedResult: true, }, } for i, tc := range testCases { tc := tc t.Run(fmt.Sprintf("Test_%d", i+1), func(t *testing.T) { cfg, err := ParseConfig(bytes.NewReader([]byte(tc.inputConfig))) if err != nil { t.Fatalf("Got unexpected error: %v", err) } if got := cfg.Rules[0].MetadataReplicate(tc.opts); got != tc.expectedResult {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.6K bytes - Viewed (0) -
cni/pkg/plugin/plugin_test.go
} } func testCmdAddExpectFail(t *testing.T, stdinData string, objects ...runtime.Object) *mockInterceptRuleMgr { args := buildCmdArgs(stdinData, testPodName, testNSName) conf, err := parseConfig(args.StdinData) if err != nil { t.Fatalf("config parse failed with error: %v", err) } // Create a kube client client := kube.NewFakeClient(objects...) mockRedir := &mockInterceptRuleMgr{}
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 17.3K bytes - Viewed (0) -
cmd/bucket-versioning-handler.go
if s3Error := checkRequestAuthType(ctx, r, policy.PutBucketVersioningAction, bucket, ""); s3Error != ErrNone { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Error), r.URL) return } v, err := versioning.ParseConfig(io.LimitReader(r.Body, maxBucketVersioningConfigSize)) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } if globalSiteReplicationSys.isEnabled() && !v.Enabled() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5K bytes - Viewed (0) -
cmd/bucket-metadata.go
b.versioningConfig, err = versioning.ParseConfig(bytes.NewReader(b.VersioningConfigXML)) if err != nil { return err } } if len(b.QuotaConfigJSON) != 0 { b.quotaConfig, err = parseBucketQuota(b.Name, b.QuotaConfigJSON) if err != nil { return err } } if len(b.ReplicationConfigXML) != 0 { b.replicationConfig, err = replication.ParseConfig(bytes.NewReader(b.ReplicationConfigXML))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 18.2K bytes - Viewed (0)