Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for ISO8601Format (0.24 sec)

  1. cmd/signature-v4_test.go

    				"X-Amz-Date":           now.AddDate(0, 0, -2).Format(iso8601Format),
    				"X-Amz-Content-Sha256": payloadSHA256,
    			},
    			region:   region,
    			expected: ErrExpiredPresignRequest,
    		},
    		// (5) Should error if the signature is incorrect.
    		{
    			queryParams: map[string]string{
    				"X-Amz-Algorithm":      signV4Algorithm,
    				"X-Amz-Date":           now.Format(iso8601Format),
    				"X-Amz-Expires":        "60",
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 10.4K bytes
    - Viewed (1)
  2. cmd/signature-v4.go

    	"github.com/minio/minio/internal/hash/sha256"
    	xhttp "github.com/minio/minio/internal/http"
    )
    
    // AWS Signature Version '4' constants.
    const (
    	signV4Algorithm = "AWS4-HMAC-SHA256"
    	iso8601Format   = "20060102T150405Z"
    	yyyymmdd        = "20060102"
    )
    
    type serviceType string
    
    const (
    	serviceS3  serviceType = "s3"
    	serviceSTS serviceType = "sts"
    )
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  3. internal/amztime/iso8601_time.go

    	iso8601TimeFormatLong = "2006-01-02T15:04:05.000000Z" // Reply date format with nanosecond precision.
    )
    
    // ISO8601Format converts time 't' into ISO8601 time format expected in AWS S3 spec.
    //
    // This function is needed to avoid a Go's float64 precision bug, where Go avoids
    // padding the extra '0' before the timezone.
    func ISO8601Format(t time.Time) string {
    	value := t.Format(iso8601TimeFormat)
    	if len(value) < len(iso8601TimeFormat) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jan 16 23:38:33 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  4. cmd/signature-v4-parser_test.go

    			}
    			// validating presign date field.
    			if testCase.expectedPreSignValues.Date.UTC().Format(iso8601Format) != parsedPreSign.Date.UTC().Format(iso8601Format) {
    				t.Errorf("Test %d: Expected date to be %v, but got %v", i+1, testCase.expectedPreSignValues.Date.UTC().Format(iso8601Format), parsedPreSign.Date.UTC().Format(iso8601Format))
    			}
    		}
    
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 27.4K bytes
    - Viewed (0)
  5. cmd/api-response.go

    		ETag:         "\"" + etag + "\"",
    		LastModified: amztime.ISO8601Format(lastModified.UTC()),
    	}
    }
    
    // generates CopyObjectPartResponse from etag and lastModified time.
    func generateCopyObjectPartResponse(etag string, lastModified time.Time) CopyObjectPartResponse {
    	return CopyObjectPartResponse{
    		ETag:         "\"" + etag + "\"",
    		LastModified: amztime.ISO8601Format(lastModified.UTC()),
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 33.3K bytes
    - Viewed (2)
  6. internal/amztime/iso8601_time_test.go

    			expectedOutput: "2009-11-13T04:51:01.941Z",
    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.expectedOutput, func(t *testing.T) {
    			gotOutput := ISO8601Format(testCase.date)
    			t.Log("Go", testCase.date.Format(iso8601TimeFormat))
    			if gotOutput != testCase.expectedOutput {
    				t.Errorf("Expected %s, got %s", testCase.expectedOutput, gotOutput)
    			}
    		})
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Dec 12 18:28:30 GMT 2022
    - 1.8K bytes
    - Viewed (0)
  7. internal/amztime/parse.go

    package amztime
    
    import (
    	"errors"
    	"net/http"
    	"time"
    )
    
    // Supported amz date formats.
    var amzDateFormats = []string{
    	// Do not change this order, x-amz-date format is usually in
    	// iso8601Format rest are meant for relaxed handling of other
    	// odd SDKs that might be out there.
    	"20060102T150405Z",
    	time.RFC1123,
    	time.RFC1123Z,
    	// Add new AMZ date formats here.
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. cmd/bucket-lifecycle-handlers.go

    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	if withUpdatedAt {
    		w.Header().Set(xhttp.MinIOLifecycleCfgUpdatedAt, updatedAt.Format(iso8601Format))
    	}
    	// Write lifecycle configuration to client.
    	writeSuccessResponseXML(w, configData)
    }
    
    // DeleteBucketLifecycleHandler - This HTTP handler removes bucket lifecycle configuration.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 17:48:06 GMT 2023
    - 7K bytes
    - Viewed (0)
  9. cmd/streaming-signature-v4.go

    	hashedChunk := hex.EncodeToString(cr.chunkSHA256Writer.Sum(nil))
    
    	// Calculate string to sign.
    	alg := signV4ChunkedAlgorithm + "\n"
    	stringToSign := alg +
    		cr.seedDate.Format(iso8601Format) + "\n" +
    		getScope(cr.seedDate, cr.region) + "\n" +
    		cr.seedSignature + "\n" +
    		emptySHA256 + "\n" +
    		hashedChunk
    
    	// Get hmac signing key.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  10. cmd/test-utils_test.go

    	hashedPayload := req.Header.Get("x-amz-content-sha256")
    	if hashedPayload == "" {
    		return "", fmt.Errorf("Invalid hashed payload")
    	}
    
    	// Set x-amz-date.
    	req.Header.Set("x-amz-date", currTime.Format(iso8601Format))
    
    	// Get header map.
    	headerMap := make(map[string][]string)
    	for k, vv := range req.Header {
    		// If request header key is not in ignored headers, then add it.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
Back to top