v1

package
v1.22.1-dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

Conformance tests

These conformance tests are developed in https://github.com/googleapis/conformance-tests/ and then copied here when prompted that new tests are available.

Generating test.pb.go
protoc --go_out=. *.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UrlStyle_name = map[int32]string{
		0: "PATH_STYLE",
		1: "VIRTUAL_HOSTED_STYLE",
		2: "BUCKET_BOUND_HOSTNAME",
	}
	UrlStyle_value = map[string]int32{
		"PATH_STYLE":            0,
		"VIRTUAL_HOSTED_STYLE":  1,
		"BUCKET_BOUND_HOSTNAME": 2,
	}
)

Enum value maps for UrlStyle.

View Source
var (
	Resource_name = map[int32]string{
		0: "BUCKET",
		1: "OBJECT",
		2: "NOTIFICATION",
		3: "HMAC_KEY",
	}
	Resource_value = map[string]int32{
		"BUCKET":       0,
		"OBJECT":       1,
		"NOTIFICATION": 2,
		"HMAC_KEY":     3,
	}
)

Enum value maps for Resource.

Functions

This section is empty.

Types

type ConditionalMatches

type ConditionalMatches struct {
	Expression []string `protobuf:"bytes,1,rep,name=expression,proto3" json:"expression,omitempty"`
	// contains filtered or unexported fields
}

func (*ConditionalMatches) Descriptor deprecated

func (*ConditionalMatches) Descriptor() ([]byte, []int)

Deprecated: Use ConditionalMatches.ProtoReflect.Descriptor instead.

func (*ConditionalMatches) GetExpression

func (x *ConditionalMatches) GetExpression() []string

func (*ConditionalMatches) ProtoMessage

func (*ConditionalMatches) ProtoMessage()

func (*ConditionalMatches) ProtoReflect

func (x *ConditionalMatches) ProtoReflect() protoreflect.Message

func (*ConditionalMatches) Reset

func (x *ConditionalMatches) Reset()

func (*ConditionalMatches) String

func (x *ConditionalMatches) String() string

type InstructionList

type InstructionList struct {
	Instructions []string `protobuf:"bytes,1,rep,name=instructions,proto3" json:"instructions,omitempty"`
	// contains filtered or unexported fields
}

A list of instructions to send as headers to the GCS emulator. Each instruction will force a specified failure for that request.

func (*InstructionList) Descriptor deprecated

func (*InstructionList) Descriptor() ([]byte, []int)

Deprecated: Use InstructionList.ProtoReflect.Descriptor instead.

func (*InstructionList) GetInstructions

func (x *InstructionList) GetInstructions() []string

func (*InstructionList) ProtoMessage

func (*InstructionList) ProtoMessage()

func (*InstructionList) ProtoReflect

func (x *InstructionList) ProtoReflect() protoreflect.Message

func (*InstructionList) Reset

func (x *InstructionList) Reset()

func (*InstructionList) String

func (x *InstructionList) String() string

type Method

type Method struct {
	Name      string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // e.g. storage.objects.get
	Resources []Resource ``                                                              /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

A particular storage API method and required resources in order to test it. Methods must be implemented in tests for each language.

func (*Method) Descriptor deprecated

func (*Method) Descriptor() ([]byte, []int)

Deprecated: Use Method.ProtoReflect.Descriptor instead.

func (*Method) GetName

func (x *Method) GetName() string

func (*Method) GetResources

func (x *Method) GetResources() []Resource

func (*Method) ProtoMessage

func (*Method) ProtoMessage()

func (*Method) ProtoReflect

func (x *Method) ProtoReflect() protoreflect.Message

func (*Method) Reset

func (x *Method) Reset()

func (*Method) String

func (x *Method) String() string

type PolicyConditions

type PolicyConditions struct {
	ContentLengthRange []int32  `protobuf:"varint,1,rep,packed,name=contentLengthRange,proto3" json:"contentLengthRange,omitempty"`
	StartsWith         []string `protobuf:"bytes,2,rep,name=startsWith,proto3" json:"startsWith,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyConditions) Descriptor deprecated

func (*PolicyConditions) Descriptor() ([]byte, []int)

Deprecated: Use PolicyConditions.ProtoReflect.Descriptor instead.

func (*PolicyConditions) GetContentLengthRange

func (x *PolicyConditions) GetContentLengthRange() []int32

func (*PolicyConditions) GetStartsWith

func (x *PolicyConditions) GetStartsWith() []string

func (*PolicyConditions) ProtoMessage

func (*PolicyConditions) ProtoMessage()

func (*PolicyConditions) ProtoReflect

func (x *PolicyConditions) ProtoReflect() protoreflect.Message

func (*PolicyConditions) Reset

func (x *PolicyConditions) Reset()

func (*PolicyConditions) String

func (x *PolicyConditions) String() string

type PolicyInput

type PolicyInput struct {

	// http or https
	Scheme              string                 `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`
	UrlStyle            UrlStyle               `protobuf:"varint,2,opt,name=urlStyle,proto3,enum=google.cloud.conformance.storage.v1.UrlStyle" json:"urlStyle,omitempty"`
	BucketBoundHostname string                 `protobuf:"bytes,3,opt,name=bucketBoundHostname,proto3" json:"bucketBoundHostname,omitempty"`
	Bucket              string                 `protobuf:"bytes,4,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Object              string                 `protobuf:"bytes,5,opt,name=object,proto3" json:"object,omitempty"`
	Expiration          int32                  `protobuf:"varint,6,opt,name=expiration,proto3" json:"expiration,omitempty"`
	Timestamp           *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	//
	//fields with strict equivalence which are added into
	//PolicyOutput.expectedDecodedPolicy to generate the
	//signature.
	//Expectations
	//E.1: Order them in lexigraphical order so it's the
	//signature can be verified across different language
	//implementations.
	Fields     map[string]string `` /* 153-byte string literal not displayed */
	Conditions *PolicyConditions `protobuf:"bytes,9,opt,name=conditions,proto3" json:"conditions,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyInput) Descriptor deprecated

func (*PolicyInput) Descriptor() ([]byte, []int)

Deprecated: Use PolicyInput.ProtoReflect.Descriptor instead.

func (*PolicyInput) GetBucket

func (x *PolicyInput) GetBucket() string

func (*PolicyInput) GetBucketBoundHostname

func (x *PolicyInput) GetBucketBoundHostname() string

func (*PolicyInput) GetConditions

func (x *PolicyInput) GetConditions() *PolicyConditions

func (*PolicyInput) GetExpiration

func (x *PolicyInput) GetExpiration() int32

func (*PolicyInput) GetFields

func (x *PolicyInput) GetFields() map[string]string

func (*PolicyInput) GetObject

func (x *PolicyInput) GetObject() string

func (*PolicyInput) GetScheme

func (x *PolicyInput) GetScheme() string

func (*PolicyInput) GetTimestamp

func (x *PolicyInput) GetTimestamp() *timestamppb.Timestamp

func (*PolicyInput) GetUrlStyle

func (x *PolicyInput) GetUrlStyle() UrlStyle

func (*PolicyInput) ProtoMessage

func (*PolicyInput) ProtoMessage()

func (*PolicyInput) ProtoReflect

func (x *PolicyInput) ProtoReflect() protoreflect.Message

func (*PolicyInput) Reset

func (x *PolicyInput) Reset()

func (*PolicyInput) String

func (x *PolicyInput) String() string

type PolicyOutput

type PolicyOutput struct {
	Url                   string            `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Fields                map[string]string `` /* 153-byte string literal not displayed */
	ExpectedDecodedPolicy string            `protobuf:"bytes,3,opt,name=expectedDecodedPolicy,proto3" json:"expectedDecodedPolicy,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyOutput) Descriptor deprecated

func (*PolicyOutput) Descriptor() ([]byte, []int)

Deprecated: Use PolicyOutput.ProtoReflect.Descriptor instead.

func (*PolicyOutput) GetExpectedDecodedPolicy

func (x *PolicyOutput) GetExpectedDecodedPolicy() string

func (*PolicyOutput) GetFields

func (x *PolicyOutput) GetFields() map[string]string

func (*PolicyOutput) GetUrl

func (x *PolicyOutput) GetUrl() string

func (*PolicyOutput) ProtoMessage

func (*PolicyOutput) ProtoMessage()

func (*PolicyOutput) ProtoReflect

func (x *PolicyOutput) ProtoReflect() protoreflect.Message

func (*PolicyOutput) Reset

func (x *PolicyOutput) Reset()

func (*PolicyOutput) String

func (x *PolicyOutput) String() string

type PostPolicyV4Test

type PostPolicyV4Test struct {
	Description  string        `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	PolicyInput  *PolicyInput  `protobuf:"bytes,2,opt,name=policyInput,proto3" json:"policyInput,omitempty"`
	PolicyOutput *PolicyOutput `protobuf:"bytes,3,opt,name=policyOutput,proto3" json:"policyOutput,omitempty"`
	// contains filtered or unexported fields
}

func (*PostPolicyV4Test) Descriptor deprecated

func (*PostPolicyV4Test) Descriptor() ([]byte, []int)

Deprecated: Use PostPolicyV4Test.ProtoReflect.Descriptor instead.

func (*PostPolicyV4Test) GetDescription

func (x *PostPolicyV4Test) GetDescription() string

func (*PostPolicyV4Test) GetPolicyInput

func (x *PostPolicyV4Test) GetPolicyInput() *PolicyInput

func (*PostPolicyV4Test) GetPolicyOutput

func (x *PostPolicyV4Test) GetPolicyOutput() *PolicyOutput

func (*PostPolicyV4Test) ProtoMessage

func (*PostPolicyV4Test) ProtoMessage()

func (*PostPolicyV4Test) ProtoReflect

func (x *PostPolicyV4Test) ProtoReflect() protoreflect.Message

func (*PostPolicyV4Test) Reset

func (x *PostPolicyV4Test) Reset()

func (*PostPolicyV4Test) String

func (x *PostPolicyV4Test) String() string

type Resource

type Resource int32

Test resources that are necessary for a method call. For example, storage.objects.get would require BUCKET and OBJECT.

const (
	Resource_BUCKET       Resource = 0
	Resource_OBJECT       Resource = 1
	Resource_NOTIFICATION Resource = 2
	Resource_HMAC_KEY     Resource = 3
)

func (Resource) Descriptor

func (Resource) Descriptor() protoreflect.EnumDescriptor

func (Resource) Enum

func (x Resource) Enum() *Resource

func (Resource) EnumDescriptor deprecated

func (Resource) EnumDescriptor() ([]byte, []int)

Deprecated: Use Resource.Descriptor instead.

func (Resource) Number

func (x Resource) Number() protoreflect.EnumNumber

func (Resource) String

func (x Resource) String() string

func (Resource) Type

type RetryTest

type RetryTest struct {

	// Scenario number
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Human-readable description of the test case.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// list of emulator instruction sets.
	Cases []*InstructionList `protobuf:"bytes,3,rep,name=cases,proto3" json:"cases,omitempty"`
	// List of API methods to be tested.
	Methods []*Method `protobuf:"bytes,4,rep,name=methods,proto3" json:"methods,omitempty"`
	// Whether a precondition is provided (for conditionally-idempotent methods
	// only).
	PreconditionProvided bool `protobuf:"varint,5,opt,name=preconditionProvided,proto3" json:"preconditionProvided,omitempty"`
	// Whether we expect the method calls to eventually succeed after the client
	// library retries.
	ExpectSuccess bool `protobuf:"varint,6,opt,name=expectSuccess,proto3" json:"expectSuccess,omitempty"`
	// contains filtered or unexported fields
}

Schema for a retry test, corresponding to a single scenario from the design doc.

func (*RetryTest) Descriptor deprecated

func (*RetryTest) Descriptor() ([]byte, []int)

Deprecated: Use RetryTest.ProtoReflect.Descriptor instead.

func (*RetryTest) GetCases

func (x *RetryTest) GetCases() []*InstructionList

func (*RetryTest) GetDescription

func (x *RetryTest) GetDescription() string

func (*RetryTest) GetExpectSuccess

func (x *RetryTest) GetExpectSuccess() bool

func (*RetryTest) GetId

func (x *RetryTest) GetId() int32

func (*RetryTest) GetMethods

func (x *RetryTest) GetMethods() []*Method

func (*RetryTest) GetPreconditionProvided

func (x *RetryTest) GetPreconditionProvided() bool

func (*RetryTest) ProtoMessage

func (*RetryTest) ProtoMessage()

func (*RetryTest) ProtoReflect

func (x *RetryTest) ProtoReflect() protoreflect.Message

func (*RetryTest) Reset

func (x *RetryTest) Reset()

func (*RetryTest) String

func (x *RetryTest) String() string

type RetryTests

type RetryTests struct {
	RetryTests []*RetryTest `protobuf:"bytes,1,rep,name=retryTests,proto3" json:"retryTests,omitempty"`
	// contains filtered or unexported fields
}

func (*RetryTests) Descriptor deprecated

func (*RetryTests) Descriptor() ([]byte, []int)

Deprecated: Use RetryTests.ProtoReflect.Descriptor instead.

func (*RetryTests) GetRetryTests

func (x *RetryTests) GetRetryTests() []*RetryTest

func (*RetryTests) ProtoMessage

func (*RetryTests) ProtoMessage()

func (*RetryTests) ProtoReflect

func (x *RetryTests) ProtoReflect() protoreflect.Message

func (*RetryTests) Reset

func (x *RetryTests) Reset()

func (*RetryTests) String

func (x *RetryTests) String() string

type SigningV4Test

type SigningV4Test struct {
	FileName                 string                 `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"`
	Description              string                 `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Bucket                   string                 `protobuf:"bytes,3,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Object                   string                 `protobuf:"bytes,4,opt,name=object,proto3" json:"object,omitempty"`
	Method                   string                 `protobuf:"bytes,5,opt,name=method,proto3" json:"method,omitempty"`
	Expiration               int64                  `protobuf:"varint,6,opt,name=expiration,proto3" json:"expiration,omitempty"`
	Timestamp                *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	ExpectedUrl              string                 `protobuf:"bytes,8,opt,name=expectedUrl,proto3" json:"expectedUrl,omitempty"`
	Headers                  map[string]string      `` /* 155-byte string literal not displayed */
	QueryParameters          map[string]string      `` /* 195-byte string literal not displayed */
	Scheme                   string                 `protobuf:"bytes,11,opt,name=scheme,proto3" json:"scheme,omitempty"`
	UrlStyle                 UrlStyle               `protobuf:"varint,12,opt,name=urlStyle,proto3,enum=google.cloud.conformance.storage.v1.UrlStyle" json:"urlStyle,omitempty"`
	BucketBoundHostname      string                 `protobuf:"bytes,13,opt,name=bucketBoundHostname,proto3" json:"bucketBoundHostname,omitempty"`
	ExpectedCanonicalRequest string                 `protobuf:"bytes,14,opt,name=expectedCanonicalRequest,proto3" json:"expectedCanonicalRequest,omitempty"`
	ExpectedStringToSign     string                 `protobuf:"bytes,15,opt,name=expectedStringToSign,proto3" json:"expectedStringToSign,omitempty"`
	// contains filtered or unexported fields
}

func (*SigningV4Test) Descriptor deprecated

func (*SigningV4Test) Descriptor() ([]byte, []int)

Deprecated: Use SigningV4Test.ProtoReflect.Descriptor instead.

func (*SigningV4Test) GetBucket

func (x *SigningV4Test) GetBucket() string

func (*SigningV4Test) GetBucketBoundHostname

func (x *SigningV4Test) GetBucketBoundHostname() string

func (*SigningV4Test) GetDescription

func (x *SigningV4Test) GetDescription() string

func (*SigningV4Test) GetExpectedCanonicalRequest

func (x *SigningV4Test) GetExpectedCanonicalRequest() string

func (*SigningV4Test) GetExpectedStringToSign

func (x *SigningV4Test) GetExpectedStringToSign() string

func (*SigningV4Test) GetExpectedUrl

func (x *SigningV4Test) GetExpectedUrl() string

func (*SigningV4Test) GetExpiration

func (x *SigningV4Test) GetExpiration() int64

func (*SigningV4Test) GetFileName

func (x *SigningV4Test) GetFileName() string

func (*SigningV4Test) GetHeaders

func (x *SigningV4Test) GetHeaders() map[string]string

func (*SigningV4Test) GetMethod

func (x *SigningV4Test) GetMethod() string

func (*SigningV4Test) GetObject

func (x *SigningV4Test) GetObject() string

func (*SigningV4Test) GetQueryParameters

func (x *SigningV4Test) GetQueryParameters() map[string]string

func (*SigningV4Test) GetScheme

func (x *SigningV4Test) GetScheme() string

func (*SigningV4Test) GetTimestamp

func (x *SigningV4Test) GetTimestamp() *timestamppb.Timestamp

func (*SigningV4Test) GetUrlStyle

func (x *SigningV4Test) GetUrlStyle() UrlStyle

func (*SigningV4Test) ProtoMessage

func (*SigningV4Test) ProtoMessage()

func (*SigningV4Test) ProtoReflect

func (x *SigningV4Test) ProtoReflect() protoreflect.Message

func (*SigningV4Test) Reset

func (x *SigningV4Test) Reset()

func (*SigningV4Test) String

func (x *SigningV4Test) String() string

type TestFile

type TestFile struct {
	SigningV4Tests    []*SigningV4Test    `protobuf:"bytes,1,rep,name=signing_v4_tests,json=signingV4Tests,proto3" json:"signing_v4_tests,omitempty"`
	PostPolicyV4Tests []*PostPolicyV4Test `protobuf:"bytes,2,rep,name=post_policy_v4_tests,json=postPolicyV4Tests,proto3" json:"post_policy_v4_tests,omitempty"`
	RetryTests        []*RetryTest        `protobuf:"bytes,3,rep,name=retry_tests,json=retryTests,proto3" json:"retry_tests,omitempty"`
	// contains filtered or unexported fields
}

func (*TestFile) Descriptor deprecated

func (*TestFile) Descriptor() ([]byte, []int)

Deprecated: Use TestFile.ProtoReflect.Descriptor instead.

func (*TestFile) GetPostPolicyV4Tests

func (x *TestFile) GetPostPolicyV4Tests() []*PostPolicyV4Test

func (*TestFile) GetRetryTests

func (x *TestFile) GetRetryTests() []*RetryTest

func (*TestFile) GetSigningV4Tests

func (x *TestFile) GetSigningV4Tests() []*SigningV4Test

func (*TestFile) ProtoMessage

func (*TestFile) ProtoMessage()

func (*TestFile) ProtoReflect

func (x *TestFile) ProtoReflect() protoreflect.Message

func (*TestFile) Reset

func (x *TestFile) Reset()

func (*TestFile) String

func (x *TestFile) String() string

type UrlStyle

type UrlStyle int32
const (
	UrlStyle_PATH_STYLE            UrlStyle = 0
	UrlStyle_VIRTUAL_HOSTED_STYLE  UrlStyle = 1
	UrlStyle_BUCKET_BOUND_HOSTNAME UrlStyle = 2
)

func (UrlStyle) Descriptor

func (UrlStyle) Descriptor() protoreflect.EnumDescriptor

func (UrlStyle) Enum

func (x UrlStyle) Enum() *UrlStyle

func (UrlStyle) EnumDescriptor deprecated

func (UrlStyle) EnumDescriptor() ([]byte, []int)

Deprecated: Use UrlStyle.Descriptor instead.

func (UrlStyle) Number

func (x UrlStyle) Number() protoreflect.EnumNumber

func (UrlStyle) String

func (x UrlStyle) String() string

func (UrlStyle) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL