Documentation ¶
Index ¶
- Variables
- type ConformanceRequest
- func (*ConformanceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConformanceRequest) GetJsonPayload() string
- func (x *ConformanceRequest) GetJspbEncodingOptions() *JspbEncodingConfig
- func (x *ConformanceRequest) GetJspbPayload() string
- func (x *ConformanceRequest) GetMessageType() string
- func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload
- func (x *ConformanceRequest) GetProtobufPayload() []byte
- func (x *ConformanceRequest) GetRequestedOutputFormat() WireFormat
- func (x *ConformanceRequest) GetTestCategory() TestCategory
- func (x *ConformanceRequest) GetTextPayload() string
- func (*ConformanceRequest) ProtoMessage()
- func (x *ConformanceRequest) ProtoReflect() protoreflect.Message
- func (x *ConformanceRequest) Reset()
- func (x *ConformanceRequest) String() string
- func (m *ConformanceRequest) XXX_Methods() *protoiface.Methods
- func (*ConformanceRequest) XXX_OneofWrappers() []interface{}
- type ConformanceRequest_JsonPayload
- type ConformanceRequest_JspbPayload
- type ConformanceRequest_ProtobufPayload
- type ConformanceRequest_TextPayload
- type ConformanceResponse
- func (*ConformanceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConformanceResponse) GetJsonPayload() string
- func (x *ConformanceResponse) GetJspbPayload() string
- func (x *ConformanceResponse) GetParseError() string
- func (x *ConformanceResponse) GetProtobufPayload() []byte
- func (m *ConformanceResponse) GetResult() isConformanceResponse_Result
- func (x *ConformanceResponse) GetRuntimeError() string
- func (x *ConformanceResponse) GetSerializeError() string
- func (x *ConformanceResponse) GetSkipped() string
- func (x *ConformanceResponse) GetTextPayload() string
- func (*ConformanceResponse) ProtoMessage()
- func (x *ConformanceResponse) ProtoReflect() protoreflect.Message
- func (x *ConformanceResponse) Reset()
- func (x *ConformanceResponse) String() string
- func (m *ConformanceResponse) XXX_Methods() *protoiface.Methods
- func (*ConformanceResponse) XXX_OneofWrappers() []interface{}
- type ConformanceResponse_JsonPayload
- type ConformanceResponse_JspbPayload
- type ConformanceResponse_ParseError
- type ConformanceResponse_ProtobufPayload
- type ConformanceResponse_RuntimeError
- type ConformanceResponse_SerializeError
- type ConformanceResponse_Skipped
- type ConformanceResponse_TextPayload
- type FailureSet
- func (*FailureSet) Descriptor() ([]byte, []int)deprecated
- func (x *FailureSet) GetFailure() []string
- func (*FailureSet) ProtoMessage()
- func (x *FailureSet) ProtoReflect() protoreflect.Message
- func (x *FailureSet) Reset()
- func (x *FailureSet) String() string
- func (m *FailureSet) XXX_Methods() *protoiface.Methods
- type JspbEncodingConfig
- func (*JspbEncodingConfig) Descriptor() ([]byte, []int)deprecated
- func (x *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool
- func (*JspbEncodingConfig) ProtoMessage()
- func (x *JspbEncodingConfig) ProtoReflect() protoreflect.Message
- func (x *JspbEncodingConfig) Reset()
- func (x *JspbEncodingConfig) String() string
- func (m *JspbEncodingConfig) XXX_Methods() *protoiface.Methods
- type TestCategory
- type WireFormat
Constants ¶
This section is empty.
Variables ¶
var File_conformance_conformance_proto protoreflect.FileDescriptor
var TestCategory_name = map[int32]string{
0: "UNSPECIFIED_TEST",
1: "BINARY_TEST",
2: "JSON_TEST",
3: "JSON_IGNORE_UNKNOWN_PARSING_TEST",
4: "JSPB_TEST",
5: "TEXT_FORMAT_TEST",
}
Deprecated: Use TestCategory.Type.Values instead.
var TestCategory_value = map[string]int32{
"UNSPECIFIED_TEST": 0,
"BINARY_TEST": 1,
"JSON_TEST": 2,
"JSON_IGNORE_UNKNOWN_PARSING_TEST": 3,
"JSPB_TEST": 4,
"TEXT_FORMAT_TEST": 5,
}
Deprecated: Use TestCategory.Type.Values instead.
var WireFormat_name = map[int32]string{
0: "UNSPECIFIED",
1: "PROTOBUF",
2: "JSON",
3: "JSPB",
4: "TEXT_FORMAT",
}
Deprecated: Use WireFormat.Type.Values instead.
var WireFormat_value = map[string]int32{
"UNSPECIFIED": 0,
"PROTOBUF": 1,
"JSON": 2,
"JSPB": 3,
"TEXT_FORMAT": 4,
}
Deprecated: Use WireFormat.Type.Values instead.
Functions ¶
This section is empty.
Types ¶
type ConformanceRequest ¶
type ConformanceRequest struct { // The payload (whether protobuf of JSON) is always for a // protobuf_test_messages.proto3.TestAllTypes proto (as defined in // src/google/protobuf/proto3_test_messages.proto). // // TODO(haberman): if/when we expand the conformance tests to support proto2, // we will want to include a field that lets the payload/response be a // protobuf_test_messages.proto2.TestAllTypes message instead. // // Types that are valid to be assigned to Payload: // *ConformanceRequest_ProtobufPayload // *ConformanceRequest_JsonPayload // Google internal only. Opensource testees just skip it. // *ConformanceRequest_JspbPayload // *ConformanceRequest_TextPayload Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` // Which format should the testee serialize its message to? RequestedOutputFormat WireFormat `` /* 155-byte string literal not displayed */ // The full name for the test message to use; for the moment, either: // protobuf_test_messages.proto3.TestAllTypesProto3 or // protobuf_test_messages.proto2.TestAllTypesProto2. MessageType string `protobuf:"bytes,4,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` // Each test is given a specific test category. Some category may need // spedific support in testee programs. Refer to the defintion of TestCategory // for more information. TestCategory TestCategory `` /* 128-byte string literal not displayed */ // Specify details for how to encode jspb. JspbEncodingOptions *JspbEncodingConfig `protobuf:"bytes,6,opt,name=jspb_encoding_options,json=jspbEncodingOptions,proto3" json:"jspb_encoding_options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized protoimpl.UnknownFields `json:"-"` XXX_sizecache protoimpl.SizeCache `json:"-"` }
Represents a single test case's input. The testee should:
- parse this proto (which should always succeed)
- parse the protobuf or JSON payload in "payload" (which may fail)
- if the parse succeeded, serialize the message in the requested format.
func (*ConformanceRequest) Descriptor
deprecated
func (*ConformanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConformanceRequest.ProtoReflect.Type instead.
func (*ConformanceRequest) GetJsonPayload ¶
func (x *ConformanceRequest) GetJsonPayload() string
func (*ConformanceRequest) GetJspbEncodingOptions ¶
func (x *ConformanceRequest) GetJspbEncodingOptions() *JspbEncodingConfig
func (*ConformanceRequest) GetJspbPayload ¶
func (x *ConformanceRequest) GetJspbPayload() string
func (*ConformanceRequest) GetMessageType ¶
func (x *ConformanceRequest) GetMessageType() string
func (*ConformanceRequest) GetPayload ¶
func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload
func (*ConformanceRequest) GetProtobufPayload ¶
func (x *ConformanceRequest) GetProtobufPayload() []byte
func (*ConformanceRequest) GetRequestedOutputFormat ¶
func (x *ConformanceRequest) GetRequestedOutputFormat() WireFormat
func (*ConformanceRequest) GetTestCategory ¶
func (x *ConformanceRequest) GetTestCategory() TestCategory
func (*ConformanceRequest) GetTextPayload ¶
func (x *ConformanceRequest) GetTextPayload() string
func (*ConformanceRequest) ProtoMessage ¶
func (*ConformanceRequest) ProtoMessage()
func (*ConformanceRequest) ProtoReflect ¶
func (x *ConformanceRequest) ProtoReflect() protoreflect.Message
func (*ConformanceRequest) Reset ¶
func (x *ConformanceRequest) Reset()
func (*ConformanceRequest) String ¶
func (x *ConformanceRequest) String() string
func (*ConformanceRequest) XXX_Methods ¶
func (m *ConformanceRequest) XXX_Methods() *protoiface.Methods
func (*ConformanceRequest) XXX_OneofWrappers ¶
func (*ConformanceRequest) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
type ConformanceRequest_JsonPayload ¶
type ConformanceRequest_JsonPayload struct {
JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"`
}
type ConformanceRequest_JspbPayload ¶
type ConformanceRequest_JspbPayload struct {
JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"`
}
type ConformanceRequest_ProtobufPayload ¶
type ConformanceRequest_ProtobufPayload struct {
ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
}
type ConformanceRequest_TextPayload ¶
type ConformanceRequest_TextPayload struct {
TextPayload string `protobuf:"bytes,8,opt,name=text_payload,json=textPayload,proto3,oneof"`
}
type ConformanceResponse ¶
type ConformanceResponse struct { // Types that are valid to be assigned to Result: // This string should be set to indicate parsing failed. The string can // provide more information about the parse error if it is available. // // Setting this string does not necessarily mean the testee failed the // test. Some of the test cases are intentionally invalid input. // *ConformanceResponse_ParseError // If the input was successfully parsed but errors occurred when // serializing it to the requested output format, set the error message in // this field. // *ConformanceResponse_SerializeError // This should be set if some other error occurred. This will always // indicate that the test failed. The string can provide more information // about the failure. // *ConformanceResponse_RuntimeError // If the input was successfully parsed and the requested output was // protobuf, serialize it to protobuf and set it in this field. // *ConformanceResponse_ProtobufPayload // If the input was successfully parsed and the requested output was JSON, // serialize to JSON and set it in this field. // *ConformanceResponse_JsonPayload // For when the testee skipped the test, likely because a certain feature // wasn't supported, like JSON input/output. // *ConformanceResponse_Skipped // If the input was successfully parsed and the requested output was JSPB, // serialize to JSPB and set it in this field. JSPB is google internal only // format. Opensource testees can just skip it. // *ConformanceResponse_JspbPayload // If the input was successfully parsed and the requested output was // TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field. // *ConformanceResponse_TextPayload Result isConformanceResponse_Result `protobuf_oneof:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized protoimpl.UnknownFields `json:"-"` XXX_sizecache protoimpl.SizeCache `json:"-"` }
Represents a single test case's output.
func (*ConformanceResponse) Descriptor
deprecated
func (*ConformanceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConformanceResponse.ProtoReflect.Type instead.
func (*ConformanceResponse) GetJsonPayload ¶
func (x *ConformanceResponse) GetJsonPayload() string
func (*ConformanceResponse) GetJspbPayload ¶
func (x *ConformanceResponse) GetJspbPayload() string
func (*ConformanceResponse) GetParseError ¶
func (x *ConformanceResponse) GetParseError() string
func (*ConformanceResponse) GetProtobufPayload ¶
func (x *ConformanceResponse) GetProtobufPayload() []byte
func (*ConformanceResponse) GetResult ¶
func (m *ConformanceResponse) GetResult() isConformanceResponse_Result
func (*ConformanceResponse) GetRuntimeError ¶
func (x *ConformanceResponse) GetRuntimeError() string
func (*ConformanceResponse) GetSerializeError ¶
func (x *ConformanceResponse) GetSerializeError() string
func (*ConformanceResponse) GetSkipped ¶
func (x *ConformanceResponse) GetSkipped() string
func (*ConformanceResponse) GetTextPayload ¶
func (x *ConformanceResponse) GetTextPayload() string
func (*ConformanceResponse) ProtoMessage ¶
func (*ConformanceResponse) ProtoMessage()
func (*ConformanceResponse) ProtoReflect ¶
func (x *ConformanceResponse) ProtoReflect() protoreflect.Message
func (*ConformanceResponse) Reset ¶
func (x *ConformanceResponse) Reset()
func (*ConformanceResponse) String ¶
func (x *ConformanceResponse) String() string
func (*ConformanceResponse) XXX_Methods ¶
func (m *ConformanceResponse) XXX_Methods() *protoiface.Methods
func (*ConformanceResponse) XXX_OneofWrappers ¶
func (*ConformanceResponse) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
type ConformanceResponse_JsonPayload ¶
type ConformanceResponse_JsonPayload struct {
JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"`
}
type ConformanceResponse_JspbPayload ¶
type ConformanceResponse_JspbPayload struct {
JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"`
}
type ConformanceResponse_ParseError ¶
type ConformanceResponse_ParseError struct {
ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"`
}
type ConformanceResponse_ProtobufPayload ¶
type ConformanceResponse_ProtobufPayload struct {
ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
}
type ConformanceResponse_RuntimeError ¶
type ConformanceResponse_RuntimeError struct {
RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"`
}
type ConformanceResponse_SerializeError ¶
type ConformanceResponse_SerializeError struct {
SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"`
}
type ConformanceResponse_Skipped ¶
type ConformanceResponse_Skipped struct {
Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"`
}
type ConformanceResponse_TextPayload ¶
type ConformanceResponse_TextPayload struct {
TextPayload string `protobuf:"bytes,8,opt,name=text_payload,json=textPayload,proto3,oneof"`
}
type FailureSet ¶
type FailureSet struct { Failure []string `protobuf:"bytes,1,rep,name=failure,proto3" json:"failure,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized protoimpl.UnknownFields `json:"-"` XXX_sizecache protoimpl.SizeCache `json:"-"` }
The conformance runner will request a list of failures as the first request. This will be known by message_type == "conformance.FailureSet", a conformance test should return a serialized FailureSet in protobuf_payload.
func (*FailureSet) Descriptor
deprecated
func (*FailureSet) Descriptor() ([]byte, []int)
Deprecated: Use FailureSet.ProtoReflect.Type instead.
func (*FailureSet) GetFailure ¶
func (x *FailureSet) GetFailure() []string
func (*FailureSet) ProtoMessage ¶
func (*FailureSet) ProtoMessage()
func (*FailureSet) ProtoReflect ¶
func (x *FailureSet) ProtoReflect() protoreflect.Message
func (*FailureSet) Reset ¶
func (x *FailureSet) Reset()
func (*FailureSet) String ¶
func (x *FailureSet) String() string
func (*FailureSet) XXX_Methods ¶
func (m *FailureSet) XXX_Methods() *protoiface.Methods
type JspbEncodingConfig ¶
type JspbEncodingConfig struct { // Encode the value field of Any as jspb array if ture, otherwise binary. UseJspbArrayAnyFormat bool `` /* 131-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized protoimpl.UnknownFields `json:"-"` XXX_sizecache protoimpl.SizeCache `json:"-"` }
Encoding options for jspb format.
func (*JspbEncodingConfig) Descriptor
deprecated
func (*JspbEncodingConfig) Descriptor() ([]byte, []int)
Deprecated: Use JspbEncodingConfig.ProtoReflect.Type instead.
func (*JspbEncodingConfig) GetUseJspbArrayAnyFormat ¶
func (x *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool
func (*JspbEncodingConfig) ProtoMessage ¶
func (*JspbEncodingConfig) ProtoMessage()
func (*JspbEncodingConfig) ProtoReflect ¶
func (x *JspbEncodingConfig) ProtoReflect() protoreflect.Message
func (*JspbEncodingConfig) Reset ¶
func (x *JspbEncodingConfig) Reset()
func (*JspbEncodingConfig) String ¶
func (x *JspbEncodingConfig) String() string
func (*JspbEncodingConfig) XXX_Methods ¶
func (m *JspbEncodingConfig) XXX_Methods() *protoiface.Methods
type TestCategory ¶
type TestCategory int32
const ( TestCategory_UNSPECIFIED_TEST TestCategory = 0 TestCategory_BINARY_TEST TestCategory = 1 TestCategory_JSON_TEST TestCategory = 2 // Similar to JSON_TEST. However, during parsing json, testee should ignore // unknown fields. This feature is optional. Each implementation can descide // whether to support it. See // https://developers.google.com/protocol-buffers/docs/proto3#json_options // for more detail. TestCategory_JSON_IGNORE_UNKNOWN_PARSING_TEST TestCategory = 3 // Test jspb wire format. Google internal only. Opensource testees just skip it. TestCategory_JSPB_TEST TestCategory = 4 // Test text format. For cpp, java and python, testees can already deal with // this type. Testees of other languages can simply skip it. TestCategory_TEXT_FORMAT_TEST TestCategory = 5 )
func (TestCategory) EnumDescriptor
deprecated
func (TestCategory) EnumDescriptor() ([]byte, []int)
Deprecated: Use TestCategory.Type instead.
func (TestCategory) Number ¶
func (x TestCategory) Number() protoreflect.EnumNumber
func (TestCategory) String ¶
func (x TestCategory) String() string
func (TestCategory) Type ¶
func (TestCategory) Type() protoreflect.EnumType
type WireFormat ¶
type WireFormat int32
const ( WireFormat_UNSPECIFIED WireFormat = 0 WireFormat_PROTOBUF WireFormat = 1 WireFormat_JSON WireFormat = 2 WireFormat_JSPB WireFormat = 3 WireFormat_TEXT_FORMAT WireFormat = 4 )
func (WireFormat) EnumDescriptor
deprecated
func (WireFormat) EnumDescriptor() ([]byte, []int)
Deprecated: Use WireFormat.Type instead.
func (WireFormat) Number ¶
func (x WireFormat) Number() protoreflect.EnumNumber
func (WireFormat) String ¶
func (x WireFormat) String() string
func (WireFormat) Type ¶
func (WireFormat) Type() protoreflect.EnumType