blob: 49e913bff40b3005452ed864decb808f0559ab93 [file] [log] [blame]
// Copyright 2019, Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.conformance.storage.v1;
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.Storage.V1.Tests.Conformance";
option java_package = "com.google.cloud.conformance.storage.v1";
option java_multiple_files = true;
message TestFile {
repeated SigningV4Test signing_v4_tests = 1;
repeated PostPolicyV4Test post_policy_v4_tests = 2;
}
enum UrlStyle {
PATH_STYLE = 0;
VIRTUAL_HOSTED_STYLE = 1;
BUCKET_BOUND_HOSTNAME = 2;
}
message SigningV4Test {
string fileName = 1;
string description = 2;
string bucket = 3;
string object = 4;
string method = 5;
int64 expiration = 6;
google.protobuf.Timestamp timestamp = 7;
string expectedUrl = 8;
map<string, string> headers = 9;
map<string, string> query_parameters = 10;
string scheme = 11;
UrlStyle urlStyle = 12;
string bucketBoundHostname = 13;
string expectedCanonicalRequest = 14;
string expectedStringToSign = 15;
}
message ConditionalMatches {
repeated string expression = 1;
}
message PolicyConditions {
repeated int32 contentLengthRange = 1;
repeated string startsWith = 2;
}
message PolicyInput {
string scheme = 1;
UrlStyle urlStyle = 2;
string bucketBoundHostname = 3;
string bucket = 4;
string object = 5;
int32 expiration = 6;
google.protobuf.Timestamp timestamp = 7;
map<string, string> fields = 8;
PolicyConditions conditions = 9;
}
message PolicyOutput {
string url = 1;
map<string, string> fields = 2;
string expectedDecodedPolicy = 3;
}
message PostPolicyV4Test {
string description = 1;
PolicyInput policyInput = 2;
PolicyOutput policyOutput = 3;
}